diff --git a/include/transform.hpp b/include/transform.hpp index f0a4624..56c9578 100644 --- a/include/transform.hpp +++ b/include/transform.hpp @@ -151,7 +151,7 @@ namespace vm inline bool valid( zydis_mnemonic_t op ) { - return transforms< std::uint8_t >.find( op ) != transforms< std::uint8_t >.end(); + return transforms< std::uint64_t >.find( op ) != transforms< std::uint64_t >.end(); } inline void inverse_transforms( transform::map_t &transforms, transform::map_t &inverse ) diff --git a/src/vminstrs.cpp b/src/vminstrs.cpp index ace5985..58f0b6f 100644 --- a/src/vminstrs.cpp +++ b/src/vminstrs.cpp @@ -144,7 +144,7 @@ namespace vm { result = std::find_if( ++result, vm_entry.end(), []( const zydis_instr_t &instr_data ) -> bool { return vm::transform::valid( instr_data.instr.mnemonic ) && - instr_data.instr.operands[ 0 ].actions == ZYDIS_OPERAND_ACTION_WRITE && + instr_data.instr.operands[ 0 ].actions & ZYDIS_OPERAND_ACTION_WRITE && instr_data.instr.operands[ 0 ].reg.value == ZYDIS_REGISTER_ESI; } );