retdec
Public Member Functions | Private Attributes | List of all members
PeLib::TlsDirectory Class Reference

Class that handles the TLS directory. More...

#include <TlsDirectory.h>

Collaboration diagram for PeLib::TlsDirectory:
Collaboration graph
[legend]

Public Member Functions

int read (ImageLoader &imageLoader)
 Reads a file's TLS directory. More...
 
void rebuild (std::vector< std::uint8_t > &vBuffer) const
 Rebuilds the TLS directory. More...
 
unsigned int size () const
 Returns the size of the TLS Directory. More...
 
int write (const std::string &strFilename, unsigned int dwOffset) const
 Writes the TLS directory to a file. More...
 
const std::vector< std::uint64_t > & getCallbacks () const
 Returns vector of TLS callbacks. More...
 
std::uint64_t getStartAddressOfRawData () const
 Returns the StartAddressOfRawData value of the TLS header. More...
 
std::uint64_t getEndAddressOfRawData () const
 Returns the EndAddressOfRawData value of the TLS header. More...
 
std::uint64_t getAddressOfIndex () const
 Returns the AddressOfIndex value of the TLS header. More...
 
std::uint64_t getAddressOfCallBacks () const
 Returns the AddressOfCallBacks value of the TLS header. More...
 
std::uint32_t getSizeOfZeroFill () const
 Returns the SizeOfZeroFill value of the TLS header. More...
 
std::uint32_t getCharacteristics () const
 Returns the Characteristics value of the TLS header. More...
 
void setStartAddressOfRawData (std::uint64_t value)
 Sets the StartAddressOfRawData value of the TLS header. More...
 
void setEndAddressOfRawData (std::uint64_t value)
 Sets the EndAddressOfRawData value of the TLS header. More...
 
void setAddressOfIndex (std::uint64_t value)
 Sets the AddressOfIndex value of the TLS header. More...
 
void setAddressOfCallBacks (std::uint64_t value)
 Sets the AddressOfCallBacks value of the TLS header. More...
 
void setSizeOfZeroFill (std::uint32_t dwValue)
 Sets the SizeOfZeroFill value of the TLS header. More...
 
void setCharacteristics (std::uint32_t dwValue)
 Sets the Characteristics value of the TLS header. More...
 

Private Attributes

PELIB_IMAGE_TLS_DIRECTORY m_tls
 Structure that holds all information about the directory. More...
 
std::vector< uint64_t > m_Callbacks
 
std::size_t pointerSize
 

Detailed Description

Class that handles the TLS directory.

This class handles the TLS (Thread Local Storage) directory.

Member Function Documentation

◆ getAddressOfCallBacks()

std::uint64_t PeLib::TlsDirectory::getAddressOfCallBacks ( ) const
inline

Returns the AddressOfCallBacks value of the TLS header.

Returns
The AddressOfCallBacks value of the TLS directory.

◆ getAddressOfIndex()

std::uint64_t PeLib::TlsDirectory::getAddressOfIndex ( ) const
inline

Returns the AddressOfIndex value of the TLS header.

Returns
The AddressOfIndex value of the TLS directory.

◆ getCallbacks()

const std::vector< std::uint64_t > & PeLib::TlsDirectory::getCallbacks ( ) const
inline

Returns vector of TLS callbacks.

Returns
The vector of TLS callbacks

◆ getCharacteristics()

std::uint32_t PeLib::TlsDirectory::getCharacteristics ( ) const
inline

Returns the Characteristics value of the TLS header.

Returns
The Characteristics value of the TLS directory.

◆ getEndAddressOfRawData()

std::uint64_t PeLib::TlsDirectory::getEndAddressOfRawData ( ) const
inline

Returns the EndAddressOfRawData value of the TLS header.

Returns
The EndAddressOfRawData value of the TLS directory.

◆ getSizeOfZeroFill()

std::uint32_t PeLib::TlsDirectory::getSizeOfZeroFill ( ) const
inline

Returns the SizeOfZeroFill value of the TLS header.

Returns
The SizeOfZeroFill value of the TLS directory.

◆ getStartAddressOfRawData()

std::uint64_t PeLib::TlsDirectory::getStartAddressOfRawData ( ) const
inline

Returns the StartAddressOfRawData value of the TLS header.

Returns
The StartAddressOfRawData value of the TLS directory.

◆ read()

int PeLib::TlsDirectory::read ( ImageLoader imageLoader)
inline

Reads a file's TLS directory.

Reads a file's TLS directory.

Parameters
imageLoaderReferenve to a valid PE image loader.

◆ rebuild()

void PeLib::TlsDirectory::rebuild ( std::vector< std::uint8_t > &  vBuffer) const
inline

Rebuilds the TLS directory.

Rebuilds the current TLS Directory.

Parameters
vBufferBuffer where the TLS directory will be written to.

◆ setAddressOfCallBacks()

void PeLib::TlsDirectory::setAddressOfCallBacks ( std::uint64_t  value)
inline

Sets the AddressOfCallBacks value of the TLS header.

Parameters
valueThe new AddressOfCallBacks value of the TLS directory.

◆ setAddressOfIndex()

void PeLib::TlsDirectory::setAddressOfIndex ( std::uint64_t  value)
inline

Sets the AddressOfIndex value of the TLS header.

Parameters
valueThe new AddressOfIndex value of the TLS directory.

◆ setCharacteristics()

void PeLib::TlsDirectory::setCharacteristics ( std::uint32_t  dwValue)
inline

Sets the Characteristics value of the TLS header.

Parameters
dwValueThe new Characteristics value of the TLS directory.

◆ setEndAddressOfRawData()

void PeLib::TlsDirectory::setEndAddressOfRawData ( std::uint64_t  value)
inline

Sets the EndAddressOfRawData value of the TLS header.

Parameters
valueThe new EndAddressOfRawData value of the TLS directory.

◆ setSizeOfZeroFill()

void PeLib::TlsDirectory::setSizeOfZeroFill ( std::uint32_t  dwValue)
inline

Sets the SizeOfZeroFill value of the TLS header.

Parameters
dwValueThe new SizeOfZeroFill value of the TLS directory.

◆ setStartAddressOfRawData()

void PeLib::TlsDirectory::setStartAddressOfRawData ( std::uint64_t  value)
inline

Sets the StartAddressOfRawData value of the TLS header.

Parameters
valueThe new StartAddressOfRawData value of the TLS directory.

◆ size()

unsigned int PeLib::TlsDirectory::size ( ) const
inline

Returns the size of the TLS Directory.

Returns the size of the TLS directory. Due to the static nature of this structure the return value will always be 24.

Returns
Size in bytes.

◆ write()

int PeLib::TlsDirectory::write ( const std::string &  strFilename,
unsigned int  dwOffset 
) const
inline

Writes the TLS directory to a file.

Parameters
strFilenameName of the file.
dwOffsetFile offset the TLS Directory will be written to.

Member Data Documentation

◆ m_Callbacks

std::vector<uint64_t> PeLib::TlsDirectory::m_Callbacks
private

◆ m_tls

PELIB_IMAGE_TLS_DIRECTORY PeLib::TlsDirectory::m_tls
private

Structure that holds all information about the directory.

◆ pointerSize

std::size_t PeLib::TlsDirectory::pointerSize
private

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