diff --git a/src/vmhandler.cpp b/src/vmhandler.cpp index f0987d5..426b161 100644 --- a/src/vmhandler.cpp +++ b/src/vmhandler.cpp @@ -90,7 +90,7 @@ namespace vm::handler vm_handler.address = ( decrypt_val - image_base ) + module_base; vm_handler.instrs = vm_handler_instrs; - vm_handler.imm_size = imm_size.value(); + vm_handler.imm_size = imm_size.has_value() ? imm_size.value() : 0u; vm_handler.transforms = transforms; vm_handler.profile = vm::handler::get_profile( vm_handler ); vm_handlers.push_back( vm_handler ); diff --git a/src/vmutils.cpp b/src/vmutils.cpp index 35b3fdf..69d519c 100644 --- a/src/vmutils.cpp +++ b/src/vmutils.cpp @@ -75,7 +75,7 @@ namespace vm::util for ( auto [ instr, raw, addr ] : routine ) { ZydisFormatterFormatInstruction( &formatter, &instr, buffer, sizeof( buffer ), addr ); - std::printf( "> 0x%p %s", addr, buffer ); + std::printf( "> 0x%p %s\n", addr, buffer ); } }