diff --git a/src/vminstrs.cpp b/src/vminstrs.cpp index cfeb235..c86e486 100644 --- a/src/vminstrs.cpp +++ b/src/vminstrs.cpp @@ -117,7 +117,9 @@ namespace vm::instrs if ( generic_decrypt_0.mnemonic != ZYDIS_MNEMONIC_INVALID ) { operand = transform::apply( - generic_decrypt_0.operands[ 0 ].size, generic_decrypt_0.mnemonic, operand, + /* this is a hot patch for generic0 transformations which bswap 16bit operands... (they xchg)... */ + generic_decrypt_0.mnemonic == ZYDIS_MNEMONIC_XCHG ? 16 : generic_decrypt_0.operands[ 0 ].size, + generic_decrypt_0.mnemonic, operand, // check to see if this instruction has an IMM... transform::has_imm( &generic_decrypt_0 ) ? generic_decrypt_0.operands[ 1 ].imm.value.u : 0 ); }