fixed a few bugs... vm::transform::valid and get_rva_decrypt...

merge-requests/10/head
_xeroxz 4 years ago
parent c8ff24a8b4
commit a419fa4633

@ -151,7 +151,7 @@ namespace vm
inline bool valid( zydis_mnemonic_t op ) 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 ) inline void inverse_transforms( transform::map_t &transforms, transform::map_t &inverse )

@ -144,7 +144,7 @@ namespace vm
{ {
result = std::find_if( ++result, vm_entry.end(), []( const zydis_instr_t &instr_data ) -> bool { result = std::find_if( ++result, vm_entry.end(), []( const zydis_instr_t &instr_data ) -> bool {
return vm::transform::valid( instr_data.instr.mnemonic ) && 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; instr_data.instr.operands[ 0 ].reg.value == ZYDIS_REGISTER_ESI;
} ); } );

Loading…
Cancel
Save