retdec
|
#include <dotnet_info.h>
Public Member Functions | |
DotnetInfo () | |
Getters | |
const std::string & | getRuntimeVersion () const |
std::size_t | getNumberOfImportedClasses () const |
std::string | getImportedClassName (std::size_t position) const |
std::string | getImportedClassNestedName (std::size_t position) const |
std::string | getImportedClassNameWithParentClassIndex (std::size_t position) const |
std::string | getImportedClassLibName (std::size_t position) const |
std::string | getImportedClassNameSpace (std::size_t position) const |
bool | getImportedClassIndex (std::size_t position, std::size_t &result) const |
const std::string & | getTypeRefhashCrc32 () const |
const std::string & | getTypeRefhashMd5 () const |
const std::string & | getTypeRefhashSha256 () const |
std::string | getMetadataHeaderAddressStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getMetadataStreamOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getMetadataStreamSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getStringStreamOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getStringStreamSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getBlobStreamOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getBlobStreamSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getGuidStreamOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getGuidStreamSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getUserStringStreamOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getUserStringStreamSizeStr (std::ios_base &(*format)(std::ios_base &)) const |
const std::string & | getModuleVersionId () const |
const std::string & | getTypeLibId () const |
const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > & | getDefinedClassList () const |
const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > & | getImportedClassList () const |
Setters | |
void | setUsed (bool set) |
void | setRuntimeVersion (std::uint64_t majorVersion, std::uint64_t minorVersion) |
void | setMetadataHeaderAddress (std::uint64_t address) |
void | setMetadataStreamInfo (std::uint64_t offset, std::uint64_t size) |
void | setStringStreamInfo (std::uint64_t offset, std::uint64_t size) |
void | setBlobStreamInfo (std::uint64_t offset, std::uint64_t size) |
void | setGuidStreamInfo (std::uint64_t offset, std::uint64_t size) |
void | setUserStringStreamInfo (std::uint64_t offset, std::uint64_t size) |
void | setModuleVersionId (const std::string &id) |
void | setTypeLibId (const std::string &id) |
void | setDefinedClassList (const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass >> &dotnetClassList) |
void | setImportedClassList (const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass >> &dotnetClassList) |
void | setTypeRefhashCrc32 (const std::string &crc32) |
void | setTypeRefhashMd5 (const std::string &md5) |
void | setTypeRefhashSha256 (const std::string &sha256) |
Detection | |
bool | isUsed () const |
bool | hasMetadataStream () const |
bool | hasStringStream () const |
bool | hasBlobStream () const |
bool | hasGuidStream () const |
bool | hasUserStringStream () const |
bool | hasTypeLibId () const |
bool | hasImportedClassListRecords () const |
Private Attributes | |
bool | used |
std::string | runtimeVersion |
std::uint64_t | metadataHeaderAddress |
StreamInfo | metadataStream |
StreamInfo | stringStream |
StreamInfo | blobStream |
StreamInfo | guidStream |
StreamInfo | userStringStream |
std::string | moduleVersionId |
std::string | typeLibId |
std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > | definedClassList |
std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > | importedClassList |
std::string | typeRefHashCrc32 |
std::string | typeRefHashMd5 |
std::string | typeRefHashSha256 |
Class for information about .NET
retdec::fileinfo::DotnetInfo::DotnetInfo | ( | ) |
Constructor.
std::string retdec::fileinfo::DotnetInfo::getBlobStreamOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the blob stream offset in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getBlobStreamSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the blob stream size in string representation with specified format.
format | Format. |
const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > & retdec::fileinfo::DotnetInfo::getDefinedClassList | ( | ) | const |
Returns defined class list.
std::string retdec::fileinfo::DotnetInfo::getGuidStreamOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the GUID stream offset in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getGuidStreamSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the GUID stream size in string representation with specified format.
format | Format. |
bool retdec::fileinfo::DotnetInfo::getImportedClassIndex | ( | std::size_t | position, |
std::size_t & | result | ||
) | const |
Get imported class typeref index
position | Index of selected imported class from typeref table (indexed from 0) |
result | Variable to store the result to |
true
if result is valid, otherwise false
. std::string retdec::fileinfo::DotnetInfo::getImportedClassLibName | ( | std::size_t | position | ) | const |
Get imported class library name
position | Index of selected imported class from typeref table (indexed from 0) |
const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass > > & retdec::fileinfo::DotnetInfo::getImportedClassList | ( | ) | const |
Returns imported class list.
std::string retdec::fileinfo::DotnetInfo::getImportedClassName | ( | std::size_t | position | ) | const |
Get imported class name
position | Index of selected imported class from typeref table (indexed from 0) |
std::string retdec::fileinfo::DotnetInfo::getImportedClassNameSpace | ( | std::size_t | position | ) | const |
Get imported class namespace
position | Index of selected imported class from typeref table (indexed from 0) |
std::string retdec::fileinfo::DotnetInfo::getImportedClassNameWithParentClassIndex | ( | std::size_t | position | ) | const |
Get imported class name with parent class presentation index
position | Index of selected imported class from typeref table (indexed from 0) |
std::string retdec::fileinfo::DotnetInfo::getImportedClassNestedName | ( | std::size_t | position | ) | const |
Get imported class nested name
position | Index of selected imported class from typeref table (indexed from 0) |
std::string retdec::fileinfo::DotnetInfo::getMetadataHeaderAddressStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the metadata header address in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getMetadataStreamOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the metadata stream offset in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getMetadataStreamSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the metadata stream size in string representation with specified format.
format | Format. |
const std::string & retdec::fileinfo::DotnetInfo::getModuleVersionId | ( | ) | const |
Returns the module version ID.
std::size_t retdec::fileinfo::DotnetInfo::getNumberOfImportedClasses | ( | ) | const |
Get number of imported classes in typeref table
const std::string & retdec::fileinfo::DotnetInfo::getRuntimeVersion | ( | ) | const |
Returns the runtime version.
std::string retdec::fileinfo::DotnetInfo::getStringStreamOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the string stream offset in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getStringStreamSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the string stream size in string representation with specified format.
format | Format. |
const std::string & retdec::fileinfo::DotnetInfo::getTypeLibId | ( | ) | const |
Returns type lib ID.
const std::string & retdec::fileinfo::DotnetInfo::getTypeRefhashCrc32 | ( | ) | const |
Get typeRefhash as CRC32
const std::string & retdec::fileinfo::DotnetInfo::getTypeRefhashMd5 | ( | ) | const |
Get typeRefhash as MD5
const std::string & retdec::fileinfo::DotnetInfo::getTypeRefhashSha256 | ( | ) | const |
Get typeRefhash as SHA256
std::string retdec::fileinfo::DotnetInfo::getUserStringStreamOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the user string stream offset in string representation with specified format.
format | Format. |
std::string retdec::fileinfo::DotnetInfo::getUserStringStreamSizeStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Returns the user string stream size in string representation with specified format.
format | Format. |
bool retdec::fileinfo::DotnetInfo::hasBlobStream | ( | ) | const |
Checks whether .NET information contains blob stream.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::hasGuidStream | ( | ) | const |
Checks whether .NET information contains GUID stream.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::hasImportedClassListRecords | ( | ) | const |
Find out if there are any imported class records
true
if there are some imported class records, false
otherwise bool retdec::fileinfo::DotnetInfo::hasMetadataStream | ( | ) | const |
Checks whether .NET information contains metadata stream.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::hasStringStream | ( | ) | const |
Checks whether .NET information contains string stream.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::hasTypeLibId | ( | ) | const |
Checks whether .NET information contains type lib ID.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::hasUserStringStream | ( | ) | const |
Checks whether .NET information contains user string stream.
true
if contains, otherwise false
. bool retdec::fileinfo::DotnetInfo::isUsed | ( | ) | const |
Checks whether .NET information are used.
true
if used, otherwise false
. void retdec::fileinfo::DotnetInfo::setBlobStreamInfo | ( | std::uint64_t | offset, |
std::uint64_t | size | ||
) |
Sets the blob stream information.
offset | Blob stream offset. |
size | Blob stream size. |
void retdec::fileinfo::DotnetInfo::setDefinedClassList | ( | const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass >> & | dotnetClassList | ) |
Sets defined class list.
dotnetClassList | Defined classes. |
void retdec::fileinfo::DotnetInfo::setGuidStreamInfo | ( | std::uint64_t | offset, |
std::uint64_t | size | ||
) |
Sets the GUID stream information.
offset | GUID stream offset. |
size | GUID stream size. |
void retdec::fileinfo::DotnetInfo::setImportedClassList | ( | const std::vector< std::shared_ptr< retdec::fileformat::DotnetClass >> & | dotnetClassList | ) |
Sets imported class list.
dotnetClassList | Imported classes. |
void retdec::fileinfo::DotnetInfo::setMetadataHeaderAddress | ( | std::uint64_t | address | ) |
Sets the metadata header address.
address | Metadata header address. |
void retdec::fileinfo::DotnetInfo::setMetadataStreamInfo | ( | std::uint64_t | offset, |
std::uint64_t | size | ||
) |
Sets the metadata stream information.
offset | Metadata stream offset. |
size | Metadata stream size. |
void retdec::fileinfo::DotnetInfo::setModuleVersionId | ( | const std::string & | id | ) |
Sets the module version ID.
id | Module version ID. |
void retdec::fileinfo::DotnetInfo::setRuntimeVersion | ( | std::uint64_t | majorVersion, |
std::uint64_t | minorVersion | ||
) |
Sets the runtime version.
majorVersion | Major runtime version. |
minorVersion | Minor runtime version. |
void retdec::fileinfo::DotnetInfo::setStringStreamInfo | ( | std::uint64_t | offset, |
std::uint64_t | size | ||
) |
Sets the string stream information.
offset | String stream offset. |
size | String stream size. |
void retdec::fileinfo::DotnetInfo::setTypeLibId | ( | const std::string & | id | ) |
Sets the type lib ID.
id | Type lib ID. |
void retdec::fileinfo::DotnetInfo::setTypeRefhashCrc32 | ( | const std::string & | crc32 | ) |
Sets typeref table hash as CRC32.
crc32 | Hash as CRC32. |
void retdec::fileinfo::DotnetInfo::setTypeRefhashMd5 | ( | const std::string & | md5 | ) |
Sets typeref table hash as MD5.
md5 | Hash as MD5. |
void retdec::fileinfo::DotnetInfo::setTypeRefhashSha256 | ( | const std::string & | sha256 | ) |
Sets typeref table hash as SHA256.
sha256 | Hash as SHA256. |
void retdec::fileinfo::DotnetInfo::setUsed | ( | bool | set | ) |
Sets whether .NET info is used.
set | true if used, false otherwise. |
void retdec::fileinfo::DotnetInfo::setUserStringStreamInfo | ( | std::uint64_t | offset, |
std::uint64_t | size | ||
) |
Sets the user string stream information.
offset | User string stream offset. |
size | User string stream size. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |