fixed a switch case...

merge-requests/1/head
_xeroxz 4 years ago
parent b5a20f922b
commit e339db327d

@ -40,7 +40,10 @@ namespace vm
std::printf("[!] failed to get all vm handlers...\n"); std::printf("[!] failed to get all vm handlers...\n");
return false; return false;
} }
std::printf("> got all vm handlers...\n"); std::printf("> got all vm handlers...\n");
for (const vm::handler_t& vm_handler : vm_handlers)
std::printf(">>> handler addr = 0x%p\n", vm_handler.address);
// //
// unicorn init stuff... // unicorn init stuff...
@ -221,14 +224,14 @@ namespace vm
{ {
switch (jmp_reg) switch (jmp_reg)
{ {
ZYDIS_REGISTER_RDX: case ZYDIS_REGISTER_RDX:
uc_reg_read(uc, UC_X86_REG_RDX, &reg_val); uc_reg_read(uc, UC_X86_REG_RDX, &reg_val);
break; break;
ZYDIS_REGISTER_RCX: case ZYDIS_REGISTER_RCX:
uc_reg_read(uc, UC_X86_REG_RCX, &reg_val); uc_reg_read(uc, UC_X86_REG_RCX, &reg_val);
break; break;
default: default:
std::printf("[!] invalid jump register...\n"); std::printf("[!] invalid jump register... = %d\n", jmp_reg);
exit(0); exit(0);
} }

@ -7,6 +7,7 @@
#include <functional> #include <functional>
#include <mutex> #include <mutex>
#include <vmp2.hpp> #include <vmp2.hpp>
#include <Zydis/Zydis.h>
namespace vm namespace vm
{ {

Loading…
Cancel
Save