From 8824a45dc4a6e8716dcb1552ea9814354e84ef9e Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Thu, 3 Jun 2021 23:05:35 -0700 Subject: [PATCH] idk what i did --- src/qvminspector.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qvminspector.cpp b/src/qvminspector.cpp index 49078fd..af44093 100644 --- a/src/qvminspector.cpp +++ b/src/qvminspector.cpp @@ -231,6 +231,11 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt } else if ( virt_instr->mnemonic_t == vm::handler::JMP ) { + virt_instr_entry->setText( 3, QString( "; { %1 }" ) + .arg( ( code_block->jcc.block_addr[ 0 ] - file_header->module_base ) + + file_header->image_base, + 0, 16 ) ); + // else if this jmp doesnt have two branches add the next code block to it... item->addChild( virt_instr_entry ); add_branch_children( item, code_block->jcc.block_addr[ 0 ] ); @@ -248,6 +253,7 @@ void qvminspector_t::update_ui() // block above the virtual instructions... if the code block has a JCC (with two branches) // then make a child repeating this for loop... + ui.virt_instrs->clear(); // clear old virtual instructions out since we are updating the UI... for ( auto [ code_block, code_block_num ] = std::tuple{ first_block, 0u }; code_block_num < file_header->code_block_count; code_block = reinterpret_cast< vmp2::v3::code_block_t * >( reinterpret_cast< std::uintptr_t >( code_block ) + @@ -340,6 +346,11 @@ void qvminspector_t::update_ui() ui.virt_instrs->addTopLevelItem( virt_instr_entry ); return; } + else if ( virt_instr->mnemonic_t == vm::handler::JMP ) + virt_instr_entry->setText( 3, QString( "; { %1 }" ) + .arg( ( code_block->jcc.block_addr[ 0 ] - file_header->module_base ) + + file_header->image_base, + 0, 16 ) ); ui.virt_instrs->addTopLevelItem( virt_instr_entry ); }