|
|
|
@ -18,15 +18,13 @@ void qvminspector_t::on_lift_all()
|
|
|
|
|
if ( !first_block || !file_header )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// if there was an older console try and free it..
|
|
|
|
|
FreeConsole();
|
|
|
|
|
|
|
|
|
|
if ( !AllocConsole() )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
freopen_s( reinterpret_cast< FILE ** >( stdin ), "CONIN$", "r", stdin );
|
|
|
|
|
freopen_s( reinterpret_cast< FILE ** >( stdout ), "CONOUT$", "w", stdout );
|
|
|
|
|
SetConsoleTitleA( "[VTIL] - blew the brains out the coupe..." );
|
|
|
|
|
SetConsoleTitleA( "[VTIL] - lifted and optimized output..." );
|
|
|
|
|
|
|
|
|
|
vtil::basic_block *rtn = nullptr, *first = nullptr;
|
|
|
|
|
for ( auto [ code_block, code_block_num ] = std::tuple{ first_block, 0u };
|
|
|
|
@ -54,6 +52,8 @@ void qvminspector_t::on_lift_all()
|
|
|
|
|
auto vinstr = &code_block->vinstr[ idx ];
|
|
|
|
|
if ( vinstr->mnemonic_t == vm::handler::INVALID )
|
|
|
|
|
{
|
|
|
|
|
std::printf( "[WARNING] vm handler #%d is not implimented, the VTIL output may be incorrect!\n",
|
|
|
|
|
vinstr->opcode );
|
|
|
|
|
rtn->nop();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@ -64,6 +64,8 @@ void qvminspector_t::on_lift_all()
|
|
|
|
|
|
|
|
|
|
if ( result == vm::lifters::all.end() )
|
|
|
|
|
{
|
|
|
|
|
std::printf( "[WARNING] vm handler #%d lifter is not implimented, the VTIL output may be incorrect!\n",
|
|
|
|
|
vinstr->opcode );
|
|
|
|
|
rtn->nop();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|