You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
927 B
32 lines
927 B
#define NOMINMAX
|
|
#include <fcml_common.hpp>
|
|
#include <fcml_intel_dialect.hpp>
|
|
#include <llodctor_pe.hpp>
|
|
#include <lloiff.hpp>
|
|
|
|
int __cdecl main( int argc, const char *argv[] )
|
|
{
|
|
std::string file_name = "test.exe";
|
|
std::vector< std::uint8_t > image;
|
|
|
|
llo::lloiff_t iff( file_name );
|
|
llo::s1::dctor_pe_t pe_dctor( image );
|
|
|
|
std::printf( "> iff name = %s, hash = 0x%p\n", iff.get_name().get_data().c_str(), iff.get_name().get_hash() );
|
|
|
|
fcml_st_dialect *dialect;
|
|
fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect );
|
|
|
|
fcml_st_disassembler *disassembler;
|
|
fcml_fn_disassembler_init( dialect, &disassembler );
|
|
|
|
fcml_st_disassembler_result result;
|
|
fcml_st_disassembler_context context = { 0 };
|
|
fcml_fn_disassembler_result_prepare( &result );
|
|
|
|
if ( !pe_dctor.generate( iff ) )
|
|
{
|
|
std::printf( "> failed to generate iff...\n" );
|
|
return -1;
|
|
}
|
|
} |