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.

36 lines
1.1 KiB

#define NOMINMAX
#include <llodctor/llodctor_pe.hpp>
#include <lloiff.hpp>
#include <llosymbol_loader/llosymbol_loader_base.hpp>
int __cdecl main( int argc, const char *argv[] )
{
// read the file path in from cli...
std::string file_name = "test.exe";
// open the image from disk...
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() );
if ( !pe_dctor.generate( iff ) )
{
std::printf( "> failed to generate iff...\n" );
return -1;
}
const auto &iff_sections = iff.get_sections();
for ( auto &section : iff_sections )
{
std::printf( "> section name = %s, section uq hash = 0x%p\n", section.section_name.get_data().c_str(),
section.section_name.get_unique_hash() );
for ( auto &symbol : section.symbols )
{
std::printf( "> symbol type = %d, symbol size = 0x%x\n", symbol.get_type(), symbol.get_size() );
}
}
}