retdec
Public Member Functions | Protected Attributes | List of all members
retdec::fileformat::PeFormatParser Class Reference

#include <pe_format_parser.h>

Collaboration diagram for retdec::fileformat::PeFormatParser:
Collaboration graph
[legend]

Public Member Functions

 PeFormatParser (const FileFormat *fInputFile, PeLib::PeFileT *inputPeFile)
 
virtual ~PeFormatParser ()=default
 
Detection methods
std::uint32_t getPointerSize () const
 
std::uint32_t getPeHeaderOffset () const
 
std::uint32_t getImageBitability () const
 
std::uint32_t getDeclaredNumberOfSections () const
 
std::uint32_t getStoredNumberOfSections () const
 
std::uint32_t getMachineType () const
 
std::uint64_t getImageBaseAddress () const
 
std::uint32_t getCoffSymbolTableOffset () const
 
std::uint32_t getNumberOfCoffSymbols () const
 
std::uint32_t getMajorLinkerVersion () const
 
std::uint32_t getMinorLinkerVersion () const
 
std::uint32_t getFileFlags () const
 
std::uint32_t getTimeStamp () const
 
std::uint32_t getOptionalHeaderSize () const
 
bool isSizeOfHeaderMultipleOfFileAlignment () const
 
std::uint32_t getFileAlignment () const
 
std::uint32_t getSectionAlignment () const
 
std::uint32_t getSizeOfHeaders () const
 
std::uint32_t getSizeOfImage () const
 
std::uint32_t getChecksum () const
 
std::uint64_t getSizeOfStackReserve () const
 
std::uint64_t getSizeOfStackCommit () const
 
std::uint64_t getSizeOfHeapReserve () const
 
std::uint64_t getSizeOfHeapCommit () const
 
std::uint32_t getSizeOfPeSignature () const
 
std::uint32_t getLoadedSizeOfNtHeaders () const
 
std::uint32_t getAllocatedSizeOfNtHeaders () const
 
std::uint32_t getDeclaredNumberOfDataDirectories () const
 
std::uint32_t getStoredNumberOfDataDirectories () const
 
std::uint32_t getNumberOfImportedLibraries () const
 
std::uint32_t getNumberOfDelayImportedLibraries () const
 
bool isDll () const
 
bool getEpAddress (std::uint64_t &epAddress) const
 
bool getEpOffset (std::uint64_t &epOffset) const
 
bool getSectionType (const PeLib::PELIB_SECTION_HEADER *pSectionHeader, PeCoffSection::Type &secType) const
 
bool getSection (std::size_t secIndex, PeCoffSection &section) const
 
bool getDllFlags (unsigned long long &dllFlags) const
 
bool getDataDirectoryRelative (unsigned long long index, unsigned long long &relAddr, unsigned long long &size) const
 
bool getDataDirectoryAbsolute (unsigned long long index, unsigned long long &absAddr, unsigned long long &size) const
 
bool getImportedLibraryFileName (std::uint32_t index, std::string &fileName) const
 
bool getDelayImportedLibraryFileName (unsigned long long index, std::string &fileName) const
 
std::unique_ptr< PeImportgetImport (unsigned long long fileIndex, unsigned long long importIndex) const
 
std::unique_ptr< PeImportgetDelayImport (unsigned long long fileIndex, unsigned long long importIndex) const
 
std::uint32_t getNumberOfExportedFunctions () const
 
bool getExportedFunction (unsigned long long index, Export &exportedFunction) const
 
std::uint32_t getNumberOfDebugEntries () const
 
bool getDebugEntryData (unsigned long long index, std::vector< std::uint8_t > &data) const
 
bool getDebugEntryTimeDateStamp (unsigned long long index, unsigned long long &timeDateStamp) const
 
bool getDebugEntryPointerToRawData (unsigned long long index, unsigned long long &pointerToRawData) const
 
std::uint32_t getResourceDirectoryOffset () const
 
const PeLib::ResourceNodegetResourceTreeRoot () const
 
std::uint64_t getTlsStartAddressOfRawData () const
 
std::uint64_t getTlsEndAddressOfRawData () const
 
std::uint64_t getTlsAddressOfIndex () const
 
const std::vector< uint64_t > & getCallbacks () const
 
std::uint64_t getTlsAddressOfCallBacks () const
 
std::uint32_t getTlsSizeOfZeroFill () const
 
std::uint32_t getTlsCharacteristics () const
 
std::unique_ptr< CLRHeadergetClrHeader () const
 
std::uint32_t getNumberOfRelocations () const
 
std::uint32_t getNumberOfRelocationData (std::uint32_t index) const
 
std::uint64_t getChecksumFileOffset () const
 
std::uint64_t getSecurityDirFileOffset () const
 
std::uint32_t getSecurityDirRva () const
 
std::uint32_t getSecurityDirSize () const
 
retdec::common::RangeContainer< std::uint64_t > getImportDirectoryOccupiedAddresses () const
 
retdec::common::RangeContainer< std::uint64_t > getExportDirectoryOccupiedAddresses () const
 
retdec::common::RangeContainer< std::uint64_t > getDebugDirectoryOccupiedAddresses () const
 
retdec::common::RangeContainer< std::uint64_t > getResourceDirectoryOccupiedAddresses () const
 

Protected Attributes

const FileFormatinputFile = nullptr
 pointer to input file More...
 
PeLib::PeFileTpeFile = nullptr
 32-bit PE file More...
 

Constructor & Destructor Documentation

◆ PeFormatParser()

retdec::fileformat::PeFormatParser::PeFormatParser ( const FileFormat fInputFile,
PeLib::PeFileT inputPeFile 
)
inline

◆ ~PeFormatParser()

virtual retdec::fileformat::PeFormatParser::~PeFormatParser ( )
virtualdefault

Member Function Documentation

◆ getAllocatedSizeOfNtHeaders()

std::uint32_t retdec::fileformat::PeFormatParser::getAllocatedSizeOfNtHeaders ( ) const
inline

◆ getCallbacks()

const std::vector<uint64_t>& retdec::fileformat::PeFormatParser::getCallbacks ( ) const
inline

◆ getChecksum()

std::uint32_t retdec::fileformat::PeFormatParser::getChecksum ( ) const
inline

◆ getChecksumFileOffset()

std::uint64_t retdec::fileformat::PeFormatParser::getChecksumFileOffset ( ) const
inline

◆ getClrHeader()

std::unique_ptr<CLRHeader> retdec::fileformat::PeFormatParser::getClrHeader ( ) const
inline

◆ getCoffSymbolTableOffset()

std::uint32_t retdec::fileformat::PeFormatParser::getCoffSymbolTableOffset ( ) const
inline

◆ getDataDirectoryAbsolute()

bool retdec::fileformat::PeFormatParser::getDataDirectoryAbsolute ( unsigned long long  index,
unsigned long long &  absAddr,
unsigned long long &  size 
) const
inline

◆ getDataDirectoryRelative()

bool retdec::fileformat::PeFormatParser::getDataDirectoryRelative ( unsigned long long  index,
unsigned long long &  relAddr,
unsigned long long &  size 
) const
inline

◆ getDebugDirectoryOccupiedAddresses()

retdec::common::RangeContainer<std::uint64_t> retdec::fileformat::PeFormatParser::getDebugDirectoryOccupiedAddresses ( ) const
inline

◆ getDebugEntryData()

bool retdec::fileformat::PeFormatParser::getDebugEntryData ( unsigned long long  index,
std::vector< std::uint8_t > &  data 
) const
inline

◆ getDebugEntryPointerToRawData()

bool retdec::fileformat::PeFormatParser::getDebugEntryPointerToRawData ( unsigned long long  index,
unsigned long long &  pointerToRawData 
) const
inline

◆ getDebugEntryTimeDateStamp()

bool retdec::fileformat::PeFormatParser::getDebugEntryTimeDateStamp ( unsigned long long  index,
unsigned long long &  timeDateStamp 
) const
inline

◆ getDeclaredNumberOfDataDirectories()

std::uint32_t retdec::fileformat::PeFormatParser::getDeclaredNumberOfDataDirectories ( ) const
inline

◆ getDeclaredNumberOfSections()

std::uint32_t retdec::fileformat::PeFormatParser::getDeclaredNumberOfSections ( ) const
inline

◆ getDelayImport()

std::unique_ptr<PeImport> retdec::fileformat::PeFormatParser::getDelayImport ( unsigned long long  fileIndex,
unsigned long long  importIndex 
) const
inline

◆ getDelayImportedLibraryFileName()

bool retdec::fileformat::PeFormatParser::getDelayImportedLibraryFileName ( unsigned long long  index,
std::string &  fileName 
) const
inline

◆ getDllFlags()

bool retdec::fileformat::PeFormatParser::getDllFlags ( unsigned long long &  dllFlags) const
inline

◆ getEpAddress()

bool retdec::fileformat::PeFormatParser::getEpAddress ( std::uint64_t &  epAddress) const
inline

◆ getEpOffset()

bool retdec::fileformat::PeFormatParser::getEpOffset ( std::uint64_t &  epOffset) const
inline

◆ getExportDirectoryOccupiedAddresses()

retdec::common::RangeContainer<std::uint64_t> retdec::fileformat::PeFormatParser::getExportDirectoryOccupiedAddresses ( ) const
inline

◆ getExportedFunction()

bool retdec::fileformat::PeFormatParser::getExportedFunction ( unsigned long long  index,
Export exportedFunction 
) const
inline

◆ getFileAlignment()

std::uint32_t retdec::fileformat::PeFormatParser::getFileAlignment ( ) const
inline

◆ getFileFlags()

std::uint32_t retdec::fileformat::PeFormatParser::getFileFlags ( ) const
inline

◆ getImageBaseAddress()

std::uint64_t retdec::fileformat::PeFormatParser::getImageBaseAddress ( ) const
inline

◆ getImageBitability()

std::uint32_t retdec::fileformat::PeFormatParser::getImageBitability ( ) const
inline

◆ getImport()

std::unique_ptr<PeImport> retdec::fileformat::PeFormatParser::getImport ( unsigned long long  fileIndex,
unsigned long long  importIndex 
) const
inline

◆ getImportDirectoryOccupiedAddresses()

retdec::common::RangeContainer<std::uint64_t> retdec::fileformat::PeFormatParser::getImportDirectoryOccupiedAddresses ( ) const
inline

◆ getImportedLibraryFileName()

bool retdec::fileformat::PeFormatParser::getImportedLibraryFileName ( std::uint32_t  index,
std::string &  fileName 
) const
inline

◆ getLoadedSizeOfNtHeaders()

std::uint32_t retdec::fileformat::PeFormatParser::getLoadedSizeOfNtHeaders ( ) const
inline

◆ getMachineType()

std::uint32_t retdec::fileformat::PeFormatParser::getMachineType ( ) const
inline

◆ getMajorLinkerVersion()

std::uint32_t retdec::fileformat::PeFormatParser::getMajorLinkerVersion ( ) const
inline

◆ getMinorLinkerVersion()

std::uint32_t retdec::fileformat::PeFormatParser::getMinorLinkerVersion ( ) const
inline

◆ getNumberOfCoffSymbols()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfCoffSymbols ( ) const
inline

◆ getNumberOfDebugEntries()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfDebugEntries ( ) const
inline

◆ getNumberOfDelayImportedLibraries()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfDelayImportedLibraries ( ) const
inline

◆ getNumberOfExportedFunctions()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfExportedFunctions ( ) const
inline

◆ getNumberOfImportedLibraries()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfImportedLibraries ( ) const
inline

◆ getNumberOfRelocationData()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfRelocationData ( std::uint32_t  index) const
inline

◆ getNumberOfRelocations()

std::uint32_t retdec::fileformat::PeFormatParser::getNumberOfRelocations ( ) const
inline

◆ getOptionalHeaderSize()

std::uint32_t retdec::fileformat::PeFormatParser::getOptionalHeaderSize ( ) const
inline

◆ getPeHeaderOffset()

std::uint32_t retdec::fileformat::PeFormatParser::getPeHeaderOffset ( ) const
inline

◆ getPointerSize()

std::uint32_t retdec::fileformat::PeFormatParser::getPointerSize ( ) const
inline

◆ getResourceDirectoryOccupiedAddresses()

retdec::common::RangeContainer<std::uint64_t> retdec::fileformat::PeFormatParser::getResourceDirectoryOccupiedAddresses ( ) const
inline

◆ getResourceDirectoryOffset()

std::uint32_t retdec::fileformat::PeFormatParser::getResourceDirectoryOffset ( ) const
inline

◆ getResourceTreeRoot()

const PeLib::ResourceNode* retdec::fileformat::PeFormatParser::getResourceTreeRoot ( ) const
inline

◆ getSection()

bool retdec::fileformat::PeFormatParser::getSection ( std::size_t  secIndex,
PeCoffSection section 
) const
inline

◆ getSectionAlignment()

std::uint32_t retdec::fileformat::PeFormatParser::getSectionAlignment ( ) const
inline

◆ getSectionType()

bool retdec::fileformat::PeFormatParser::getSectionType ( const PeLib::PELIB_SECTION_HEADER pSectionHeader,
PeCoffSection::Type secType 
) const
inline

◆ getSecurityDirFileOffset()

std::uint64_t retdec::fileformat::PeFormatParser::getSecurityDirFileOffset ( ) const
inline

◆ getSecurityDirRva()

std::uint32_t retdec::fileformat::PeFormatParser::getSecurityDirRva ( ) const
inline

◆ getSecurityDirSize()

std::uint32_t retdec::fileformat::PeFormatParser::getSecurityDirSize ( ) const
inline

◆ getSizeOfHeaders()

std::uint32_t retdec::fileformat::PeFormatParser::getSizeOfHeaders ( ) const
inline

◆ getSizeOfHeapCommit()

std::uint64_t retdec::fileformat::PeFormatParser::getSizeOfHeapCommit ( ) const
inline

◆ getSizeOfHeapReserve()

std::uint64_t retdec::fileformat::PeFormatParser::getSizeOfHeapReserve ( ) const
inline

◆ getSizeOfImage()

std::uint32_t retdec::fileformat::PeFormatParser::getSizeOfImage ( ) const
inline

◆ getSizeOfPeSignature()

std::uint32_t retdec::fileformat::PeFormatParser::getSizeOfPeSignature ( ) const
inline

◆ getSizeOfStackCommit()

std::uint64_t retdec::fileformat::PeFormatParser::getSizeOfStackCommit ( ) const
inline

◆ getSizeOfStackReserve()

std::uint64_t retdec::fileformat::PeFormatParser::getSizeOfStackReserve ( ) const
inline

◆ getStoredNumberOfDataDirectories()

std::uint32_t retdec::fileformat::PeFormatParser::getStoredNumberOfDataDirectories ( ) const
inline

◆ getStoredNumberOfSections()

std::uint32_t retdec::fileformat::PeFormatParser::getStoredNumberOfSections ( ) const
inline

◆ getTimeStamp()

std::uint32_t retdec::fileformat::PeFormatParser::getTimeStamp ( ) const
inline

◆ getTlsAddressOfCallBacks()

std::uint64_t retdec::fileformat::PeFormatParser::getTlsAddressOfCallBacks ( ) const
inline

◆ getTlsAddressOfIndex()

std::uint64_t retdec::fileformat::PeFormatParser::getTlsAddressOfIndex ( ) const
inline

◆ getTlsCharacteristics()

std::uint32_t retdec::fileformat::PeFormatParser::getTlsCharacteristics ( ) const
inline

◆ getTlsEndAddressOfRawData()

std::uint64_t retdec::fileformat::PeFormatParser::getTlsEndAddressOfRawData ( ) const
inline

◆ getTlsSizeOfZeroFill()

std::uint32_t retdec::fileformat::PeFormatParser::getTlsSizeOfZeroFill ( ) const
inline

◆ getTlsStartAddressOfRawData()

std::uint64_t retdec::fileformat::PeFormatParser::getTlsStartAddressOfRawData ( ) const
inline

◆ isDll()

bool retdec::fileformat::PeFormatParser::isDll ( ) const
inline

◆ isSizeOfHeaderMultipleOfFileAlignment()

bool retdec::fileformat::PeFormatParser::isSizeOfHeaderMultipleOfFileAlignment ( ) const
inline

Member Data Documentation

◆ inputFile

const FileFormat* retdec::fileformat::PeFormatParser::inputFile = nullptr
protected

pointer to input file

◆ peFile

PeLib::PeFileT* retdec::fileformat::PeFormatParser::peFile = nullptr
protected

32-bit PE file


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