diff --git a/dependencies/vmprofiler b/dependencies/vmprofiler
index 0cbc83b..c231911 160000
--- a/dependencies/vmprofiler
+++ b/dependencies/vmprofiler
@@ -1 +1 @@
-Subproject commit 0cbc83be3fb0f4293146def0c3735f39608f646b
+Subproject commit c2319117a07d95794f54db970aa7f72e8726349a
diff --git a/src/darkstyle/framelesswindow/framelesswindow.ui b/src/darkstyle/framelesswindow/framelesswindow.ui
index d31de48..4bc3f0d 100644
--- a/src/darkstyle/framelesswindow/framelesswindow.ui
+++ b/src/darkstyle/framelesswindow/framelesswindow.ui
@@ -143,7 +143,7 @@
color:rgb(153,153,153);
- VMProtect 2 - Virtual Instruction Inspector (v1.7 BETA)
+ VMProtect 2 - Virtual Instruction Inspector (v1.8 BETA)
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
diff --git a/src/qvminspector.cpp b/src/qvminspector.cpp
index 6c06bde..3e0b151 100644
--- a/src/qvminspector.cpp
+++ b/src/qvminspector.cpp
@@ -202,38 +202,41 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt
var.setValue( virt_instr );
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 )
{
- virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
- .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
- .arg( code_block->jcc.block_addr[ 1 ], 0, 16 ) );
-
- auto branch_entry1 = new qtree_widget_item_t(), branch_entry2 = new qtree_widget_item_t();
- const auto block1_addr = code_block->jcc.block_addr[ 0 ];
- const auto block2_addr = code_block->jcc.block_addr[ 1 ];
-
- branch_entry1->setText( 0, QString( "%1" ).arg( block1_addr, 0, 16 ) );
- branch_entry1->setText( 3, QString( "; block_%1" ).arg( block1_addr, 0, 16 ) );
-
- branch_entry2->setText( 0, QString( "%1" ).arg( block2_addr, 0, 16 ) );
- branch_entry2->setText( 3, QString( "; block_%1" ).arg( block2_addr, 0, 16 ) );
-
- add_branch_children( branch_entry1, code_block->jcc.block_addr[ 0 ] );
- add_branch_children( branch_entry2, code_block->jcc.block_addr[ 1 ] );
-
- virt_instr_entry->addChildren( { branch_entry1, branch_entry2 } );
- // if its a JMP with branches we want to insert the next code block
- // instructions into the child widget entries...
- item->addChild( 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 ], 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 ] );
+ if ( code_block->jcc.type == vm::instrs::jcc_type::branching )
+ {
+ virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
+ .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
+ .arg( code_block->jcc.block_addr[ 1 ], 0, 16 ) );
+
+ auto branch_entry1 = new qtree_widget_item_t(), branch_entry2 = new qtree_widget_item_t();
+ const auto block1_addr = code_block->jcc.block_addr[ 0 ];
+ const auto block2_addr = code_block->jcc.block_addr[ 1 ];
+
+ branch_entry1->setText( 0, QString( "%1" ).arg( block1_addr, 0, 16 ) );
+ branch_entry1->setText( 3, QString( "; block_%1" ).arg( block1_addr, 0, 16 ) );
+
+ branch_entry2->setText( 0, QString( "%1" ).arg( block2_addr, 0, 16 ) );
+ branch_entry2->setText( 3, QString( "; block_%1" ).arg( block2_addr, 0, 16 ) );
+
+ add_branch_children( branch_entry1, code_block->jcc.block_addr[ 0 ] );
+ add_branch_children( branch_entry2, code_block->jcc.block_addr[ 1 ] );
+
+ virt_instr_entry->addChildren( { branch_entry1, branch_entry2 } );
+ // if its a JMP with branches we want to insert the next code block
+ // instructions into the child widget entries...
+ item->addChild( virt_instr_entry );
+ return;
+ }
+ else
+ {
+ virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 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 ] );
+ }
}
item->addChild( virt_instr_entry );
}
@@ -343,34 +346,36 @@ void qvminspector_t::update_ui()
var.setValue( virt_instr );
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 )
{
- virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
- .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
- .arg( code_block->jcc.block_addr[ 1 ], 0, 16 ) );
-
- auto branch_entry1 = new qtree_widget_item_t(), branch_entry2 = new qtree_widget_item_t();
- const auto block1_addr = code_block->jcc.block_addr[ 0 ];
- const auto block2_addr = code_block->jcc.block_addr[ 1 ];
-
- branch_entry1->setText( 0, QString( "%1" ).arg( block1_addr, 0, 16 ) );
- branch_entry1->setText( 3, QString( "; block_%1" ).arg( block1_addr, 0, 16 ) );
-
- branch_entry2->setText( 0, QString( "%1" ).arg( block2_addr, 0, 16 ) );
- branch_entry2->setText( 3, QString( "; block_%1" ).arg( block2_addr, 0, 16 ) );
-
- add_branch_children( branch_entry1, code_block->jcc.block_addr[ 0 ] );
- add_branch_children( branch_entry2, code_block->jcc.block_addr[ 1 ] );
-
- virt_instr_entry->addChildren( { branch_entry1, branch_entry2 } );
- // if its a JMP with branches we want to insert the next code block
- // instructions into the child widget entries...
- ui.virt_instrs->addTopLevelItem( virt_instr_entry );
- goto finish; // bad code...
+ if ( code_block->jcc.type == vm::instrs::jcc_type::branching )
+ {
+ virt_instr_entry->setText( 3, QString( "; { %1, %2 }" )
+ .arg( code_block->jcc.block_addr[ 0 ], 0, 16 )
+ .arg( code_block->jcc.block_addr[ 1 ], 0, 16 ) );
+
+ auto branch_entry1 = new qtree_widget_item_t(), branch_entry2 = new qtree_widget_item_t();
+ const auto block1_addr = code_block->jcc.block_addr[ 0 ];
+ const auto block2_addr = code_block->jcc.block_addr[ 1 ];
+
+ branch_entry1->setText( 0, QString( "%1" ).arg( block1_addr, 0, 16 ) );
+ branch_entry1->setText( 3, QString( "; block_%1" ).arg( block1_addr, 0, 16 ) );
+
+ branch_entry2->setText( 0, QString( "%1" ).arg( block2_addr, 0, 16 ) );
+ branch_entry2->setText( 3, QString( "; block_%1" ).arg( block2_addr, 0, 16 ) );
+
+ add_branch_children( branch_entry1, code_block->jcc.block_addr[ 0 ] );
+ add_branch_children( branch_entry2, code_block->jcc.block_addr[ 1 ] );
+
+ virt_instr_entry->addChildren( { branch_entry1, branch_entry2 } );
+ // if its a JMP with branches we want to insert the next code block
+ // instructions into the child widget entries...
+ ui.virt_instrs->addTopLevelItem( virt_instr_entry );
+ goto finish; // bad code...
+ }
+ 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 ) );
}
- else if ( virt_instr->mnemonic_t == vm::handler::JMP )
- virt_instr_entry->setText( 3, QString( "; { %1 }" ).arg( code_block->jcc.block_addr[ 0 ], 0, 16 ) );
-
ui.virt_instrs->addTopLevelItem( virt_instr_entry );
}
}