added some more v2 profiles...

merge-requests/2/head
_xeroxz 3 years ago
parent 80d7180b53
commit c5ace2e7a5

@ -20,7 +20,9 @@ namespace vm
LCONSTQ,
LCONSTBZXW,
LCONSTBSXDW
LCONSTBSXDW,
LCONSTDWSXQ,
LCONSTWSXQ
};
enum extention_t
@ -344,6 +346,76 @@ namespace vm
instr.operands[1].reg.value == ZYDIS_REGISTER_EAX;
}
}
},
vm::handler::extention_t::sign_extend
};
inline vm::handler::profile_t lconstdwsxq =
{
// CDQE
// SUB RBP, 8
// MOV [RBP], RAX
"LCONSTDWSXQ", LCONSTDWSXQ, 32,
{
// CDQE
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_CDQE;
},
// SUB RBP, 8
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_SUB &&
instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER &&
instr.operands[0].reg.value == ZYDIS_REGISTER_RBP &&
instr.operands[1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE &&
instr.operands[1].imm.value.u == 0x8;
},
// MOV [RBP], RAX
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_MOV &&
instr.operands[0].type == ZYDIS_OPERAND_TYPE_MEMORY &&
instr.operands[0].mem.base == ZYDIS_REGISTER_RBP &&
instr.operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER &&
instr.operands[1].reg.value == ZYDIS_REGISTER_RAX;
}
},
vm::handler::extention_t::sign_extend
};
inline vm::handler::profile_t lconstwsxq =
{
// CDQE
// SUB RBP, 8
// MOV [RBP], RAX
"LCONSTWSXQ", LCONSTWSXQ, 16,
{
{
// CDQE
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_CDQE;
},
// SUB RBP, 8
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_SUB &&
instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER &&
instr.operands[0].reg.value == ZYDIS_REGISTER_RBP &&
instr.operands[1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE &&
instr.operands[1].imm.value.u == 0x8;
},
// MOV [RBP], RAX
[](const zydis_decoded_instr_t& instr) -> bool
{
return instr.mnemonic == ZYDIS_MNEMONIC_MOV &&
instr.operands[0].type == ZYDIS_OPERAND_TYPE_MEMORY &&
instr.operands[0].mem.base == ZYDIS_REGISTER_RBP &&
instr.operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER &&
instr.operands[1].reg.value == ZYDIS_REGISTER_RAX;
}
}
}
};
@ -353,7 +425,7 @@ namespace vm
&lregq, &lregdw,
&lconstq, &lconstbzxw, &lconstbsxdw
&lconstq, &lconstbzxw, &lconstbsxdw, &lconstdwsxq, &lconstwsxq
};
}
}

Loading…
Cancel
Save