retdec
|
#include <file_header.h>
Public Member Functions | |
Getters | |
std::string | getTimeStamp () const |
std::string | getFileStatus () const |
std::string | getFileVersion () const |
std::string | getFileHeaderVersion () const |
std::string | getOsAbi () const |
std::string | getOsAbiVersion () const |
unsigned long long | getFileFlagsSize () const |
unsigned long long | getFileFlags () const |
std::string | getFileFlagsStr () const |
std::size_t | getNumberOfFileFlagsDescriptors () const |
void | getFileFlagsDescriptors (std::vector< std::string > &desc, std::vector< std::string > &abb) const |
unsigned long long | getDllFlagsSize () const |
unsigned long long | getDllFlags () const |
std::string | getDllFlagsStr () const |
std::size_t | getNumberOfDllFlagsDescriptors () const |
void | getDllFlagsDescriptors (std::vector< std::string > &desc, std::vector< std::string > &abb) const |
std::string | getNumberOfBitsInByteStr () const |
std::string | getNumberOfBitsInWordStr () const |
std::string | getFileHeaderSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSegmentTableOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSegmentTableEntrySizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSegmentTableSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getNumberOfSegmentsStr () const |
std::string | getSectionTableOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSectionTableEntrySizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSectionTableSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getDeclaredNumberOfSectionsStr () const |
std::string | getCoffFileHeaderSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getOptionalHeaderSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getChecksumStr () const |
std::string | getStackReserveSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getStackCommitSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getHeapReserveSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getHeapCommitSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getNumberOfDataDirectoriesStr () const |
std::string | getNumberOfSymbolTablesStr () const |
std::string | getOverlayOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getOverlaySizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getOverlayEntropyStr (std::ios_base &(*format)(std::ios_base &)) const |
Setters | |
void | setTimeStamp (std::string timestamp) |
void | setFileStatus (std::string status) |
void | setFileVersion (std::string version) |
void | setFileHeaderVersion (std::string version) |
void | setOsAbi (std::string osabi) |
void | setOsAbiVersion (std::string abiversion) |
void | setFileFlagsSize (unsigned long long size) |
void | setFileFlags (unsigned long long flagsArray) |
void | setDllFlagsSize (unsigned long long size) |
void | setDllFlags (unsigned long long flagsArray) |
void | setNumberOfBitsInByte (unsigned long long bitsInByte) |
void | setNumberOfBitsInWord (unsigned long long bitsInWord) |
void | setFileHeaderSize (unsigned long long headerSize) |
void | setSegmentTableOffset (unsigned long long offset) |
void | setSegmentTableEntrySize (unsigned long long entrySize) |
void | setSegmentTableSize (unsigned long long tableSize) |
void | setNumberOfSegments (unsigned long long noOfSegments) |
void | setSectionTableOffset (unsigned long long offset) |
void | setSectionTableEntrySize (unsigned long long entrySize) |
void | setSectionTableSize (unsigned long long tableSize) |
void | setDeclaredNumberOfSections (unsigned long long noOfSections) |
void | setActualNumberOfSections (unsigned long long noOfSections) |
void | setCoffFileHeaderSize (unsigned long long headerSize) |
void | setOptionalHeaderSize (unsigned long long headerSize) |
void | setChecksum (unsigned long long fileChecksum) |
void | setStackReserveSize (unsigned long long size) |
void | setStackCommitSize (unsigned long long size) |
void | setHeapReserveSize (unsigned long long size) |
void | setHeapCommitSize (unsigned long long size) |
void | setNumberOfDataDirectories (unsigned long long directories) |
void | setNumberOfSymbolTables (unsigned long long tables) |
void | setOverlayOffset (unsigned long long offset) |
void | setOverlaySize (unsigned long long size) |
void | setOverlayEntropy (double entr) |
Other methods | |
void | addFileFlagsDescriptor (std::string descriptor, std::string abbreviation) |
void | clearFileFlagsDescriptors () |
void | addDllFlagsDescriptor (std::string descriptor, std::string abbreviation) |
void | clearDllFlagsDescriptors () |
Private Attributes | |
std::string | timeStamp |
time stamp More... | |
std::string | fileStatus |
state of file (e.g. ROM image) More... | |
std::string | fileVersion |
version of file More... | |
std::string | fileHeaderVersion |
version of file header More... | |
std::string | osAbi |
target operation system or ABI More... | |
std::string | osAbiVersion |
version of operation system or ABI More... | |
Flags | fileFlags |
file flags More... | |
Flags | dllFlags |
DLL flags (set only if file is dynamic-link library) More... | |
unsigned long long | numberOfBitsInByte = std::numeric_limits<unsigned long long>::max() |
number of bits in one byte More... | |
unsigned long long | numberOfBitsInWord = std::numeric_limits<unsigned long long>::max() |
number of bits in one word More... | |
unsigned long long | fileHeaderSize = std::numeric_limits<unsigned long long>::max() |
size of this header More... | |
unsigned long long | segmentTableOffset = std::numeric_limits<unsigned long long>::max() |
offset of segment table in file More... | |
unsigned long long | segmentTableEntrySize = std::numeric_limits<unsigned long long>::max() |
size of one entry in segment table More... | |
unsigned long long | segmentTableSize = std::numeric_limits<unsigned long long>::max() |
size of segment table (size of header of segments) More... | |
unsigned long long | numberOfSegments = std::numeric_limits<unsigned long long>::max() |
number of segments in file More... | |
unsigned long long | sectionTableOffset = std::numeric_limits<unsigned long long>::max() |
offset of section table in file More... | |
unsigned long long | sectionTableEntrySize = std::numeric_limits<unsigned long long>::max() |
size of one entry in section table More... | |
unsigned long long | sectionTableSize = std::numeric_limits<unsigned long long>::max() |
size of section table (size of header of sections) More... | |
unsigned long long | declNumberOfSections = std::numeric_limits<unsigned long long>::max() |
declared number of sections in file More... | |
unsigned long long | coffFileHeaderSize = std::numeric_limits<unsigned long long>::max() |
size of COFF file header More... | |
unsigned long long | optionalHeaderSize = std::numeric_limits<unsigned long long>::max() |
size of optional header More... | |
unsigned long long | checksum = std::numeric_limits<unsigned long long>::max() |
file checksum More... | |
unsigned long long | stackReserveSize = std::numeric_limits<unsigned long long>::max() |
size of the stack to reserve More... | |
unsigned long long | stackCommitSize = std::numeric_limits<unsigned long long>::max() |
size of the stack to commit More... | |
unsigned long long | heapReserveSize = std::numeric_limits<unsigned long long>::max() |
size of the local heap space to reserve More... | |
unsigned long long | heapCommitSize = std::numeric_limits<unsigned long long>::max() |
size of the local heap space to commit More... | |
unsigned long long | numberOfDataDirectories = std::numeric_limits<unsigned long long>::max() |
number of data directories More... | |
unsigned long long | numberOfSymbolTables = std::numeric_limits<unsigned long long>::max() |
number of symbol tables More... | |
unsigned long long | overlayOffset = std::numeric_limits<unsigned long long>::max() |
offset of overlay More... | |
unsigned long long | overlaySize = std::numeric_limits<unsigned long long>::max() |
size of overlay More... | |
double | overlayEntropy = std::numeric_limits<double>::min() |
overlay data entropy More... | |
Class for save information from file header(s).
Value std::numeric_limits<unsigned long long>::max() mean unspecified value or error for unsigned integer types.
void retdec::fileinfo::FileHeader::addDllFlagsDescriptor | ( | std::string | descriptor, |
std::string | abbreviation | ||
) |
Add DLL flag descriptor
descriptor | Descriptor (full description of flag) |
abbreviation | Abbreviation (short description of flag) |
void retdec::fileinfo::FileHeader::addFileFlagsDescriptor | ( | std::string | descriptor, |
std::string | abbreviation | ||
) |
Add file flag descriptor
descriptor | Descriptor (full description of flag) |
abbreviation | Abbreviation (short description of flag) |
void retdec::fileinfo::FileHeader::clearDllFlagsDescriptors | ( | ) |
Clear DLL flags descriptors
void retdec::fileinfo::FileHeader::clearFileFlagsDescriptors | ( | ) |
Clear file flags descriptors
std::string retdec::fileinfo::FileHeader::getChecksumStr | ( | ) | const |
Get file checksum
std::string retdec::fileinfo::FileHeader::getCoffFileHeaderSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of COFF file header
std::string retdec::fileinfo::FileHeader::getDeclaredNumberOfSectionsStr | ( | ) | const |
Get declared number of sections
unsigned long long retdec::fileinfo::FileHeader::getDllFlags | ( | ) | const |
Get DLL flags
void retdec::fileinfo::FileHeader::getDllFlagsDescriptors | ( | std::vector< std::string > & | desc, |
std::vector< std::string > & | abb | ||
) | const |
Get DLL flags descriptors and its abbreviations
desc | Vector for save descriptors |
abb | Vector for save abbreviations of descriptors |
It is guaranteed that the number of stored descriptors and abbreviations are the same
unsigned long long retdec::fileinfo::FileHeader::getDllFlagsSize | ( | ) | const |
Get DLL flags size
std::string retdec::fileinfo::FileHeader::getDllFlagsStr | ( | ) | const |
Get DLL flags
unsigned long long retdec::fileinfo::FileHeader::getFileFlags | ( | ) | const |
Get flags
void retdec::fileinfo::FileHeader::getFileFlagsDescriptors | ( | std::vector< std::string > & | desc, |
std::vector< std::string > & | abb | ||
) | const |
Get file flags descriptors and its abbreviations
desc | Vector for save descriptors |
abb | Vector for save abbreviations of descriptors |
It is guaranteed that the number of stored descriptors and abbreviations are the same
unsigned long long retdec::fileinfo::FileHeader::getFileFlagsSize | ( | ) | const |
Get flags size
std::string retdec::fileinfo::FileHeader::getFileFlagsStr | ( | ) | const |
Get flags
std::string retdec::fileinfo::FileHeader::getFileHeaderSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of file header
std::string retdec::fileinfo::FileHeader::getFileHeaderVersion | ( | ) | const |
Get file header version
std::string retdec::fileinfo::FileHeader::getFileStatus | ( | ) | const |
Get file status
std::string retdec::fileinfo::FileHeader::getFileVersion | ( | ) | const |
Get file version
std::string retdec::fileinfo::FileHeader::getHeapCommitSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of the local heap space to commit
std::string retdec::fileinfo::FileHeader::getHeapReserveSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of the local heap space to reserve
std::string retdec::fileinfo::FileHeader::getNumberOfBitsInByteStr | ( | ) | const |
Get number of bits in one byte
std::string retdec::fileinfo::FileHeader::getNumberOfBitsInWordStr | ( | ) | const |
Get number of bits in one word
std::string retdec::fileinfo::FileHeader::getNumberOfDataDirectoriesStr | ( | ) | const |
Get number of data directories
std::size_t retdec::fileinfo::FileHeader::getNumberOfDllFlagsDescriptors | ( | ) | const |
Get number of DLL flags descriptors
std::size_t retdec::fileinfo::FileHeader::getNumberOfFileFlagsDescriptors | ( | ) | const |
Get number of file flags descriptors
std::string retdec::fileinfo::FileHeader::getNumberOfSegmentsStr | ( | ) | const |
Get number of segments
std::string retdec::fileinfo::FileHeader::getNumberOfSymbolTablesStr | ( | ) | const |
Get number of symbol tables
std::string retdec::fileinfo::FileHeader::getOptionalHeaderSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of optional file header
std::string retdec::fileinfo::FileHeader::getOsAbi | ( | ) | const |
Get operating system or ABI extension
std::string retdec::fileinfo::FileHeader::getOsAbiVersion | ( | ) | const |
Get OS or ABI version
std::string retdec::fileinfo::FileHeader::getOverlayEntropyStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get overlay entropy
std::string retdec::fileinfo::FileHeader::getOverlayOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get overlay offset
std::string retdec::fileinfo::FileHeader::getOverlaySizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get overlay size
std::string retdec::fileinfo::FileHeader::getSectionTableEntrySizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get section table one entry size
std::string retdec::fileinfo::FileHeader::getSectionTableOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get section table offset
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileHeader::getSectionTableSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get section table size
std::string retdec::fileinfo::FileHeader::getSegmentTableEntrySizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get segment table one entry size
std::string retdec::fileinfo::FileHeader::getSegmentTableOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get segment table offset
format | Format of resulting string (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileHeader::getSegmentTableSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get segment table size
std::string retdec::fileinfo::FileHeader::getStackCommitSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of the stack to commit
std::string retdec::fileinfo::FileHeader::getStackReserveSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of the stack to reserve
std::string retdec::fileinfo::FileHeader::getTimeStamp | ( | ) | const |
Get time stamp
void retdec::fileinfo::FileHeader::setActualNumberOfSections | ( | unsigned long long | noOfSections | ) |
void retdec::fileinfo::FileHeader::setChecksum | ( | unsigned long long | fileChecksum | ) |
Set file checksum
fileChecksum | Checksum of file |
void retdec::fileinfo::FileHeader::setCoffFileHeaderSize | ( | unsigned long long | headerSize | ) |
Set size of COFF file header
headerSize | Size of COFF file header |
void retdec::fileinfo::FileHeader::setDeclaredNumberOfSections | ( | unsigned long long | noOfSections | ) |
Set declared number of sections
noOfSections | Number of sections in file |
void retdec::fileinfo::FileHeader::setDllFlags | ( | unsigned long long | flagsArray | ) |
Set DLL flags
flagsArray | Bit flags as one number |
void retdec::fileinfo::FileHeader::setDllFlagsSize | ( | unsigned long long | size | ) |
Set DLL flags size
size | Number of DLL flags |
void retdec::fileinfo::FileHeader::setFileFlags | ( | unsigned long long | flagsArray | ) |
Set file flags
flagsArray | Bit flags as one number |
void retdec::fileinfo::FileHeader::setFileFlagsSize | ( | unsigned long long | size | ) |
Set file flags size
size | Number of file flags |
void retdec::fileinfo::FileHeader::setFileHeaderSize | ( | unsigned long long | headerSize | ) |
Set file header size
headerSize | File header size |
void retdec::fileinfo::FileHeader::setFileHeaderVersion | ( | std::string | version | ) |
Set file version
version | Version of file header |
void retdec::fileinfo::FileHeader::setFileStatus | ( | std::string | status | ) |
Set file status
status | Status of file (e.g. ROM image) |
void retdec::fileinfo::FileHeader::setFileVersion | ( | std::string | version | ) |
Set file version
version | Version of file |
void retdec::fileinfo::FileHeader::setHeapCommitSize | ( | unsigned long long | size | ) |
Set size of the local heap space to commit
size | Size of the local heap space to commit |
void retdec::fileinfo::FileHeader::setHeapReserveSize | ( | unsigned long long | size | ) |
Set size of the local heap space to reserve
size | Size of the local heap space to reserve |
void retdec::fileinfo::FileHeader::setNumberOfBitsInByte | ( | unsigned long long | bitsInByte | ) |
Set number of bits in one byte
bitsInByte | Number of bits in one byte |
void retdec::fileinfo::FileHeader::setNumberOfBitsInWord | ( | unsigned long long | bitsInWord | ) |
Set number of bits in one word
bitsInWord | Number of bits in one word |
void retdec::fileinfo::FileHeader::setNumberOfDataDirectories | ( | unsigned long long | directories | ) |
Set number of data directories
directories | Number of data directories |
void retdec::fileinfo::FileHeader::setNumberOfSegments | ( | unsigned long long | noOfSegments | ) |
Set number of segments
noOfSegments | Number of segments in file |
void retdec::fileinfo::FileHeader::setNumberOfSymbolTables | ( | unsigned long long | tables | ) |
Set number of symbol tables
tables | Number of symbol tables |
void retdec::fileinfo::FileHeader::setOptionalHeaderSize | ( | unsigned long long | headerSize | ) |
Set size of optional file header
headerSize | Size of optional file header |
void retdec::fileinfo::FileHeader::setOsAbi | ( | std::string | osabi | ) |
Set operating system or ABI extension
osabi | OS or ABI extension |
void retdec::fileinfo::FileHeader::setOsAbiVersion | ( | std::string | abiversion | ) |
Set OS or ABI version
abiversion | Version of OS or ABI |
void retdec::fileinfo::FileHeader::setOverlayEntropy | ( | double | entr | ) |
Set entropy of overlay
entr | Entropy of overlay |
void retdec::fileinfo::FileHeader::setOverlayOffset | ( | unsigned long long | offset | ) |
Set offset of overlay
offset | Offset of overlay |
void retdec::fileinfo::FileHeader::setOverlaySize | ( | unsigned long long | size | ) |
Set size of overlay
size | Size of overlay |
void retdec::fileinfo::FileHeader::setSectionTableEntrySize | ( | unsigned long long | entrySize | ) |
Set size of one entry in section table
entrySize | Size of one entry in section table |
void retdec::fileinfo::FileHeader::setSectionTableOffset | ( | unsigned long long | offset | ) |
Set section table offset
offset | Section table offset |
void retdec::fileinfo::FileHeader::setSectionTableSize | ( | unsigned long long | tableSize | ) |
Set section table size
tableSize | Size of section table |
void retdec::fileinfo::FileHeader::setSegmentTableEntrySize | ( | unsigned long long | entrySize | ) |
Set size of one entry in segment table
entrySize | Size of one entry in segment table |
void retdec::fileinfo::FileHeader::setSegmentTableOffset | ( | unsigned long long | offset | ) |
Set segment table offset
offset | Segment table offset |
void retdec::fileinfo::FileHeader::setSegmentTableSize | ( | unsigned long long | tableSize | ) |
Set segment table size
tableSize | Size of segment table |
void retdec::fileinfo::FileHeader::setStackCommitSize | ( | unsigned long long | size | ) |
Set size of the stack to commit
size | Size of the stack to commit |
void retdec::fileinfo::FileHeader::setStackReserveSize | ( | unsigned long long | size | ) |
Set size of the stack to reserve
size | Size of the stack to reserve |
void retdec::fileinfo::FileHeader::setTimeStamp | ( | std::string | timestamp | ) |
Set time stamp
timestamp | Time stamp |
|
private |
file checksum
|
private |
size of COFF file header
|
private |
declared number of sections in file
|
private |
DLL flags (set only if file is dynamic-link library)
|
private |
file flags
|
private |
size of this header
|
private |
version of file header
|
private |
state of file (e.g. ROM image)
|
private |
version of file
|
private |
size of the local heap space to commit
|
private |
size of the local heap space to reserve
|
private |
number of bits in one byte
|
private |
number of bits in one word
|
private |
number of data directories
|
private |
number of segments in file
|
private |
number of symbol tables
|
private |
size of optional header
|
private |
target operation system or ABI
|
private |
version of operation system or ABI
|
private |
overlay data entropy
|
private |
offset of overlay
|
private |
size of overlay
|
private |
size of one entry in section table
|
private |
offset of section table in file
|
private |
size of section table (size of header of sections)
|
private |
size of one entry in segment table
|
private |
offset of segment table in file
|
private |
size of segment table (size of header of segments)
|
private |
size of the stack to commit
|
private |
size of the stack to reserve
|
private |
time stamp