From 948499baafa72ec18f2e7504993957a1604fd050 Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Tue, 1 Jun 2021 20:56:36 -0700 Subject: [PATCH] fixed vm handler table transformation issue --- src/vmhandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } );