retdec
|
Typedefs | |
using | AuxVectorEntry = std::pair< std::string, std::uint64_t > |
Functions | |
FileDetector * | createFileDetector (const std::string &pathToInputFile, const std::string &dllListFile, retdec::fileformat::Format fileFormat, FileInformation &finfo, retdec::cpdetect::DetectParams &searchPar, retdec::fileformat::LoadFlags loadFlags) |
std::string | getBinaryRepresentation (unsigned long long number, unsigned long long numberOfBits) |
template<typename N > | |
std::string | getNumberAsString (N number, std::ios_base &(*format)(std::ios_base &)=std::dec) |
template<typename N > | |
bool | indexIsValid (const std::vector< N > &list, std::size_t index) |
std::string | abbvSerialization (const std::vector< std::string > &abbv) |
void | shrinkAndReplaceNonprintable (std::string &str, std::size_t maxLength) |
void | addUniqueValues (std::vector< std::string > ¤tVal, const std::vector< std::string > &newVal) |
Variables | |
const std::size_t | MAX_NAME_LENGTH = 100 |
using retdec::fileinfo::AuxVectorEntry = typedef std::pair<std::string, std::uint64_t> |
std::string retdec::fileinfo::abbvSerialization | ( | const std::vector< std::string > & | abbv | ) |
Serialization of abbreviations
abbv | Vector of abbreviations |
Abbreviations are sorted in order of their storage in abbv
void retdec::fileinfo::addUniqueValues | ( | std::vector< std::string > & | currentVal, |
const std::vector< std::string > & | newVal | ||
) |
To currentVal add values from newVal, which are not stored in currentVal before calling of this function
FileDetector * retdec::fileinfo::createFileDetector | ( | const std::string & | pathToInputFile, |
const std::string & | dllListFile, | ||
retdec::fileformat::Format | fileFormat, | ||
FileInformation & | finfo, | ||
retdec::cpdetect::DetectParams & | searchPar, | ||
retdec::fileformat::LoadFlags | loadFlags | ||
) |
Create file detector
pathToInputFile | Path to input file |
dllListFile | Path to text file containing list of OS DLLs |
fileFormat | Format of input file |
finfo | Instance of class for storing information about input file |
searchPar | Parameters for detection of used compiler or packer |
loadFlags | Load flags |
nullptr
if any errorPointer to detector is dynamically allocated and must be released (otherwise there is a memory leak). If format of input file is not supported, function will return nullptr
.
std::string retdec::fileinfo::getBinaryRepresentation | ( | unsigned long long | number, |
unsigned long long | numberOfBits | ||
) |
Get binary composition of number
number | Number for conversion |
numberOfBits | Required number of bits in result |
std::string retdec::fileinfo::getNumberAsString | ( | N | number, |
std::ios_base &(*)(std::ios_base &) | format = std::dec |
||
) |
Get number as string
number | Number for conversion |
format | Format of result (e.g. std::dec, std::hex) |
For signed numeric types is incorrect value their minimal value (e.g. INT_MIN). For unsigned numeric types is incorrect value their maximal value (e.g. UINT_MAX).
|
inline |
Check vector size
list | Vector for check |
index | Index of element in vector |
true
if index is correct in context of vector, false
otherwise void retdec::fileinfo::shrinkAndReplaceNonprintable | ( | std::string & | str, |
std::size_t | maxLength | ||
) |
Shrink str to max maxLength characters and replace nonprintable characters in str
const std::size_t retdec::fileinfo::MAX_NAME_LENGTH = 100 |