You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
897 B
37 lines
897 B
3 years ago
|
#include "../../include/vmprofiler.hpp"
|
||
|
|
||
|
namespace vm
|
||
|
{
|
||
|
namespace handler
|
||
|
{
|
||
|
namespace profile
|
||
|
{
|
||
|
vm::handler::profile_t vmexit =
|
||
|
{
|
||
|
// MOV RAX, RBP
|
||
|
// POPFQ
|
||
|
// RET
|
||
|
"VMEXIT", VMEXIT, NULL,
|
||
|
{
|
||
|
{
|
||
|
// MOV RAX, RBP
|
||
|
[](const zydis_decoded_instr_t& instr) -> bool
|
||
|
{
|
||
|
return instr.mnemonic == ZYDIS_MNEMONIC_MOV &&
|
||
|
instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER &&
|
||
|
instr.operands[0].reg.value == ZYDIS_REGISTER_RAX &&
|
||
|
instr.operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER &&
|
||
|
instr.operands[1].reg.value == ZYDIS_REGISTER_RBP;
|
||
|
},
|
||
|
// POPFQ
|
||
|
[](const zydis_decoded_instr_t& instr) -> bool
|
||
|
{ return instr.mnemonic == ZYDIS_MNEMONIC_POPFQ; },
|
||
|
// RET
|
||
|
[](const zydis_decoded_instr_t& instr) -> bool
|
||
|
{ return instr.mnemonic == ZYDIS_MNEMONIC_RET; }
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|