diff --git a/include/vmutils.hpp b/include/vmutils.hpp index d66d7dc..e0bd3bd 100644 --- a/include/vmutils.hpp +++ b/include/vmutils.hpp @@ -72,6 +72,8 @@ bool is_jmp(const zydis_decoded_instr_t& instr); bool is_32_bit_gp(const ZydisRegister reg); +bool is_64_bit_gp(const ZydisRegister reg); + /// /// used by profiles to see if an instruction is a MOV/SX/ZX... /// diff --git a/src/vmutils.cpp b/src/vmutils.cpp index f6b9ce3..06cfff7 100644 --- a/src/vmutils.cpp +++ b/src/vmutils.cpp @@ -33,6 +33,11 @@ bool is_32_bit_gp(const ZydisRegister reg) return reg >= ZYDIS_REGISTER_EAX && reg <= ZYDIS_REGISTER_R15D; } +bool is_64_bit_gp(const ZydisRegister reg) +{ + return reg >= ZYDIS_REGISTER_RAX && reg <= ZYDIS_REGISTER_R15; +} + bool flatten(zydis_rtn_t& routine, std::uintptr_t routine_addr, bool keep_jmps,