fixed bugs...

merge-requests/5/merge
_xeroxz 3 years ago
parent ca4e7bc7a9
commit 6932883ec6

@ -1 +1 @@
Subproject commit 0cbc83be3fb0f4293146def0c3735f39608f646b Subproject commit c2319117a07d95794f54db970aa7f72e8726349a

@ -143,7 +143,7 @@
color:rgb(153,153,153);</string> color:rgb(153,153,153);</string>
</property> </property>
<property name="text"> <property name="text">
<string>VMProtect 2 - Virtual Instruction Inspector (v1.7 BETA)</string> <string>VMProtect 2 - Virtual Instruction Inspector (v1.8 BETA)</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>

@ -202,7 +202,9 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
var.setValue( virt_instr ); var.setValue( virt_instr );
virt_instr_entry->setData( 3, Qt::UserRole, var ); virt_instr_entry->setData( 3, Qt::UserRole, var );
if ( virt_instr->mnemonic_t == vm::handler::JMP && code_block->jcc.has_jcc ) if ( virt_instr->mnemonic_t == vm::handler::JMP )
{
if ( code_block->jcc.type == vm::instrs::jcc_type::branching )
{ {
virt_instr_entry->setText( 3, QString( "; { %1, %2 }" ) virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
.arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
@ -227,7 +229,7 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
item->addChild( virt_instr_entry ); item->addChild( virt_instr_entry );
return; return;
} }
else if ( virt_instr->mnemonic_t == vm::handler::JMP ) else
{ {
virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) ); virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) );
@ -235,6 +237,7 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
item->addChild( virt_instr_entry ); item->addChild( virt_instr_entry );
add_branch_children( item, code_block->jcc.block_addr[ 0 ] ); add_branch_children( item, code_block->jcc.block_addr[ 0 ] );
} }
}
item->addChild( virt_instr_entry ); item->addChild( virt_instr_entry );
} }
} }
@ -343,7 +346,9 @@ void qvminspector_t::update_ui()
var.setValue( virt_instr ); var.setValue( virt_instr );
virt_instr_entry->setData( 3, Qt::UserRole, var ); virt_instr_entry->setData( 3, Qt::UserRole, var );
if ( virt_instr->mnemonic_t == vm::handler::JMP && code_block->jcc.has_jcc ) if ( virt_instr->mnemonic_t == vm::handler::JMP )
{
if ( code_block->jcc.type == vm::instrs::jcc_type::branching )
{ {
virt_instr_entry->setText( 3, QString( "; { %1, %2 }" ) virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
.arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
@ -368,9 +373,9 @@ void qvminspector_t::update_ui()
ui.virt_instrs->addTopLevelItem( virt_instr_entry ); ui.virt_instrs->addTopLevelItem( virt_instr_entry );
goto finish; // bad code... goto finish; // bad code...
} }
else if ( virt_instr->mnemonic_t == vm::handler::JMP ) else if ( code_block->jcc.type == vm::instrs::jcc_type::absolute )
virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) ); virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) );
}
ui.virt_instrs->addTopLevelItem( virt_instr_entry ); ui.virt_instrs->addTopLevelItem( virt_instr_entry );
} }
} }

Loading…
Cancel
Save