diff --git a/src/vmhandler.cpp b/src/vmhandler.cpp index 0fec67c..0d67547 100644 --- a/src/vmhandler.cpp +++ b/src/vmhandler.cpp @@ -286,7 +286,8 @@ namespace vm // the register is determined by the vm handler fetch above... auto handler_transform = std::find_if( handler_fetch, vm_entry.end(), [ & ]( const zydis_instr_t &instr_data ) -> bool { - return instr_data.instr.operands[ 0 ].reg.value == + return vm::transform::valid( instr_data.instr.mnemonic ) && + instr_data.instr.operands[ 0 ].reg.value == handler_fetch->instr.operands[ 0 ].reg.value && instr_data.instr.operands[ 0 ].actions & ZYDIS_OPERAND_ACTION_WRITE; } );