retdec
Public Member Functions | Private Attributes | List of all members
retdec::fileinfo::PeDetector Class Reference

#include <pe_detector.h>

Inheritance diagram for retdec::fileinfo::PeDetector:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileinfo::PeDetector:
Collaboration graph
[legend]

Public Member Functions

 PeDetector (const std::string &pathToInputFile, const std::string &dllListFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
- Public Member Functions inherited from retdec::fileinfo::FileDetector
 FileDetector (const std::string &pathToInputFile, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags)
 
virtual ~FileDetector ()=default
 
void setConfigFile (retdec::config::Config &config)
 
void getAllInformation ()
 
const retdec::fileformat::FileFormatgetFileParser () const
 

Protected Member Functions

Detection methods
virtual void detectFileClass () override
 
virtual void detectArchitecture () override
 
virtual void detectFileType () override
 
virtual void getAdditionalInfo () override
 
virtual retdec::cpdetect::CompilerDetectorcreateCompilerDetector () const override
 
Pure virtual detection methods

Private Member Functions

Auxiliary detection methods
void getFileFlags ()
 
void getDllFlags ()
 
void getHeaderInfo ()
 
void getCoffSymbols ()
 
void getRelocationTableInfo ()
 
void getDirectories ()
 
void getSections ()
 
void getDotnetInfo ()
 
void getVisualBasicInfo ()
 

Private Attributes

std::shared_ptr< PeWrapperpeParser
 file parser More...
 

Additional Inherited Members

- Protected Attributes inherited from retdec::fileinfo::FileDetector
FileInformationfileInfo
 information about file More...
 
retdec::cpdetect::DetectParamscpParams
 parameters for detection of used compiler More...
 
retdec::config::ConfigfileConfig
 configuration of input file More...
 
std::shared_ptr< retdec::fileformat::FileFormatfileParser
 parser of input file More...
 
retdec::fileformat::LoadFlags loadFlags
 load flags for configurable running More...
 
bool loaded
 internal state of instance More...
 

Detailed Description

PeDetector - find info about PE binary file

Constructor & Destructor Documentation

◆ PeDetector()

retdec::fileinfo::PeDetector::PeDetector ( const std::string &  pathToInputFile,
const std::string &  dllListFile,
FileInformation finfo,
retdec::cpdetect::DetectParams searchPar,
retdec::fileformat::LoadFlags  loadFlags 
)

Constructor

Parameters
pathToInputFilePath to input file
dllListFilePath to text file containing list of OS DLLs
finfoInstance of class for storing information about file
searchParParameters for detection of used compiler (or packer)
loadFlagsLoad flags

Member Function Documentation

◆ createCompilerDetector()

retdec::cpdetect::CompilerDetector * retdec::fileinfo::PeDetector::createCompilerDetector ( ) const
overrideprotectedvirtual

Pointer to detector is dynamically allocated and must be released (otherwise there is a memory leak) More detailed description of this method is in the super class

Implements retdec::fileinfo::FileDetector.

◆ detectArchitecture()

void retdec::fileinfo::PeDetector::detectArchitecture ( )
overrideprotectedvirtual

Detect of target architecture

Implements retdec::fileinfo::FileDetector.

◆ detectFileClass()

void retdec::fileinfo::PeDetector::detectFileClass ( )
overrideprotectedvirtual

Detect class of file

Implements retdec::fileinfo::FileDetector.

◆ detectFileType()

void retdec::fileinfo::PeDetector::detectFileType ( )
overrideprotectedvirtual

Detect of type of file

Implements retdec::fileinfo::FileDetector.

◆ getAdditionalInfo()

void retdec::fileinfo::PeDetector::getAdditionalInfo ( )
overrideprotectedvirtual

Get additional information about file

Implements retdec::fileinfo::FileDetector.

◆ getCoffSymbols()

void retdec::fileinfo::PeDetector::getCoffSymbols ( )
private

Get symbols from COFF symbol table

◆ getDirectories()

void retdec::fileinfo::PeDetector::getDirectories ( )
private

Get information about data directories

◆ getDllFlags()

void retdec::fileinfo::PeDetector::getDllFlags ( )
private

Get DLL flags

◆ getDotnetInfo()

void retdec::fileinfo::PeDetector::getDotnetInfo ( )
private

Get information about .NET

◆ getFileFlags()

void retdec::fileinfo::PeDetector::getFileFlags ( )
private

Get file flags

◆ getHeaderInfo()

void retdec::fileinfo::PeDetector::getHeaderInfo ( )
private

Get information from file headers

◆ getRelocationTableInfo()

void retdec::fileinfo::PeDetector::getRelocationTableInfo ( )
private

Get information about relocation table

◆ getSections()

void retdec::fileinfo::PeDetector::getSections ( )
private

Get information about sections

◆ getVisualBasicInfo()

void retdec::fileinfo::PeDetector::getVisualBasicInfo ( )
private

Get information about .NET

Member Data Documentation

◆ peParser

std::shared_ptr<PeWrapper> retdec::fileinfo::PeDetector::peParser
private

file parser


The documentation for this class was generated from the following files: