From e339db327d7881e8513553313394d01f7aaa2f8d Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Sat, 22 May 2021 19:10:28 -0700 Subject: [PATCH] fixed a switch case... --- src/vmemu_t.cpp | 9 ++++++--- src/vmemu_t.hpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vmemu_t.cpp b/src/vmemu_t.cpp index ed42950..de6e834 100644 --- a/src/vmemu_t.cpp +++ b/src/vmemu_t.cpp @@ -40,7 +40,10 @@ namespace vm std::printf("[!] failed to get all vm handlers...\n"); return false; } + 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... @@ -221,14 +224,14 @@ namespace vm { switch (jmp_reg) { - ZYDIS_REGISTER_RDX: + case ZYDIS_REGISTER_RDX: uc_reg_read(uc, UC_X86_REG_RDX, ®_val); break; - ZYDIS_REGISTER_RCX: + case ZYDIS_REGISTER_RCX: uc_reg_read(uc, UC_X86_REG_RCX, ®_val); break; default: - std::printf("[!] invalid jump register...\n"); + std::printf("[!] invalid jump register... = %d\n", jmp_reg); exit(0); } diff --git a/src/vmemu_t.hpp b/src/vmemu_t.hpp index 5a6de31..6aff94a 100644 --- a/src/vmemu_t.hpp +++ b/src/vmemu_t.hpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace vm {