LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::PE::LoadConfiguration Class Reference

Class that represents the default PE's LoadConfiguration More...

#include <LoadConfiguration.hpp>

Inheritance diagram for LIEF::PE::LoadConfiguration:
Collaboration diagram for LIEF::PE::LoadConfiguration:

Public Types

enum class  VERSION {
  UNKNOWN = 0 , SEH , WIN_8_1 , WIN_10_0_9879 ,
  WIN_10_0_14286 , WIN_10_0_14383 , WIN_10_0_14901 , WIN_10_0_15002 ,
  WIN_10_0_16237 , WIN_10_0_18362 , WIN_10_0_19534 , WIN_10_0_MSVC_2019 ,
  WIN_10_0_MSVC_2019_16
}
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 LoadConfiguration ()=default
 
template<class T >
 LoadConfiguration (const details::load_configuration< T > &header)
 
LoadConfigurationoperator= (const LoadConfiguration &)=default
 
 LoadConfiguration (const LoadConfiguration &)=default
 
virtual VERSION version () const
 (SDK) Version of the structure
 
uint32_t characteristics () const
 Characteristics of the structure It usually holds its size.
 
uint32_t size () const
 Size of the current structure which is an alias for characteristics.
 
uint32_t timedatestamp () const
 Date and time stamp value.
 
uint16_t major_version () const
 Major Version.
 
uint16_t minor_version () const
 Minor version.
 
uint32_t global_flags_clear () const
 The global loader flags to clear for this process as the loader start the process.
 
uint32_t global_flags_set () const
 The global loader flags to set for this process as the loader starts the process.
 
uint32_t critical_section_default_timeout () const
 The default timeout value to use for this process’s critical sections that are abandoned.
 
uint64_t decommit_free_block_threshold () const
 Memory that must be freed before it is returned to the system, in bytes.
 
uint64_t decommit_total_free_threshold () const
 Total amount of free memory, in bytes.
 
uint64_t lock_prefix_table () const
 The VA of a list of addresses where the LOCK prefix is used so that they can be replaced with NOP on single processor machines.
 
uint64_t maximum_allocation_size () const
 Maximum allocation size, in bytes.
 
uint64_t virtual_memory_threshold () const
 Maximum virtual memory size, in bytes.
 
uint64_t process_affinity_mask () const
 Setting this field to a non-zero value is equivalent to calling SetProcessAffinityMask with this value during process startup (.exe only)
 
uint32_t process_heap_flags () const
 Process heap flags that correspond to the first argument of the HeapCreate function. These flags apply to the process heap that is created during process startup.
 
uint16_t csd_version () const
 The service pack version identifier.
 
uint16_t reserved1 () const
 Must be zero.
 
uint16_t dependent_load_flags () const
 Alias for reserved1.
 
uint32_t editlist () const
 Reserved for use by the system.
 
uint64_t security_cookie () const
 A pointer to a cookie that is used by Visual C++ or GS implementation.
 
void characteristics (uint32_t characteristics)
 
void timedatestamp (uint32_t timedatestamp)
 
void major_version (uint16_t major_version)
 
void minor_version (uint16_t minor_version)
 
void global_flags_clear (uint32_t global_flags_clear)
 
void global_flags_set (uint32_t global_flags_set)
 
void critical_section_default_timeout (uint32_t critical_section_default_timeout)
 
void decommit_free_block_threshold (uint64_t decommit_free_block_threshold)
 
void decommit_total_free_threshold (uint64_t decommit_total_free_threshold)
 
void lock_prefix_table (uint64_t lock_prefix_table)
 
void maximum_allocation_size (uint64_t maximum_allocation_size)
 
void virtual_memory_threshold (uint64_t virtual_memory_threshold)
 
void process_affinity_mask (uint64_t process_affinity_mask)
 
void process_heap_flags (uint32_t process_heap_flagsid)
 
void csd_version (uint16_t csd_version)
 
void reserved1 (uint16_t reserved1)
 
void dependent_load_flags (uint16_t flags)
 
void editlist (uint32_t editlist)
 
void security_cookie (uint64_t security_cookie)
 
 ~LoadConfiguration () override=default
 
void accept (Visitor &visitor) const override
 
virtual std::ostream & print (std::ostream &os) const
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Static Public Member Functions

static bool classof (const LoadConfiguration *)
 
template<class T >
static const T * cast (const LoadConfiguration *config)
 

Static Public Attributes

static constexpr VERSION WIN_VERSION = VERSION::UNKNOWN
 

Detailed Description

Class that represents the default PE's LoadConfiguration

It's the base class for any future versions of the structure

Member Enumeration Documentation

◆ VERSION

Enumerator
UNKNOWN 
SEH 
WIN_8_1 
WIN_10_0_9879 
WIN_10_0_14286 
WIN_10_0_14383 
WIN_10_0_14901 
WIN_10_0_15002 
WIN_10_0_16237 
WIN_10_0_18362 
WIN_10_0_19534 
WIN_10_0_MSVC_2019 
WIN_10_0_MSVC_2019_16 

Constructor & Destructor Documentation

◆ LoadConfiguration() [1/3]

LIEF::PE::LoadConfiguration::LoadConfiguration ( )
default

◆ LoadConfiguration() [2/3]

template<class T >
LIEF::PE::LoadConfiguration::LoadConfiguration ( const details::load_configuration< T > & header)

◆ LoadConfiguration() [3/3]

LIEF::PE::LoadConfiguration::LoadConfiguration ( const LoadConfiguration & )
default

◆ ~LoadConfiguration()

LIEF::PE::LoadConfiguration::~LoadConfiguration ( )
overridedefault

Member Function Documentation

◆ accept()

◆ cast()

template<class T >
static const T * LIEF::PE::LoadConfiguration::cast ( const LoadConfiguration * config)
inlinestatic

References version().

◆ characteristics() [1/2]

uint32_t LIEF::PE::LoadConfiguration::characteristics ( ) const
inline

Characteristics of the structure It usually holds its size.

See also
LoadConfiguration::version

◆ characteristics() [2/2]

void LIEF::PE::LoadConfiguration::characteristics ( uint32_t characteristics)
inline

◆ classof()

static bool LIEF::PE::LoadConfiguration::classof ( const LoadConfiguration * )
inlinestatic

◆ critical_section_default_timeout() [1/2]

uint32_t LIEF::PE::LoadConfiguration::critical_section_default_timeout ( ) const
inline

The default timeout value to use for this process’s critical sections that are abandoned.

◆ critical_section_default_timeout() [2/2]

void LIEF::PE::LoadConfiguration::critical_section_default_timeout ( uint32_t critical_section_default_timeout)
inline

◆ csd_version() [1/2]

uint16_t LIEF::PE::LoadConfiguration::csd_version ( ) const
inline

The service pack version identifier.

◆ csd_version() [2/2]

void LIEF::PE::LoadConfiguration::csd_version ( uint16_t csd_version)
inline

◆ decommit_free_block_threshold() [1/2]

uint64_t LIEF::PE::LoadConfiguration::decommit_free_block_threshold ( ) const
inline

Memory that must be freed before it is returned to the system, in bytes.

◆ decommit_free_block_threshold() [2/2]

void LIEF::PE::LoadConfiguration::decommit_free_block_threshold ( uint64_t decommit_free_block_threshold)
inline

◆ decommit_total_free_threshold() [1/2]

uint64_t LIEF::PE::LoadConfiguration::decommit_total_free_threshold ( ) const
inline

Total amount of free memory, in bytes.

◆ decommit_total_free_threshold() [2/2]

void LIEF::PE::LoadConfiguration::decommit_total_free_threshold ( uint64_t decommit_total_free_threshold)
inline

◆ dependent_load_flags() [1/2]

uint16_t LIEF::PE::LoadConfiguration::dependent_load_flags ( ) const
inline

Alias for reserved1.

On recent the version of the structure, Microsoft renamed reserved1 to DependentLoadFlags

◆ dependent_load_flags() [2/2]

void LIEF::PE::LoadConfiguration::dependent_load_flags ( uint16_t flags)
inline

◆ editlist() [1/2]

uint32_t LIEF::PE::LoadConfiguration::editlist ( ) const
inline

Reserved for use by the system.

◆ editlist() [2/2]

void LIEF::PE::LoadConfiguration::editlist ( uint32_t editlist)
inline

◆ global_flags_clear() [1/2]

uint32_t LIEF::PE::LoadConfiguration::global_flags_clear ( ) const
inline

The global loader flags to clear for this process as the loader start the process.

◆ global_flags_clear() [2/2]

void LIEF::PE::LoadConfiguration::global_flags_clear ( uint32_t global_flags_clear)
inline

◆ global_flags_set() [1/2]

uint32_t LIEF::PE::LoadConfiguration::global_flags_set ( ) const
inline

The global loader flags to set for this process as the loader starts the process.

◆ global_flags_set() [2/2]

void LIEF::PE::LoadConfiguration::global_flags_set ( uint32_t global_flags_set)
inline

◆ lock_prefix_table() [1/2]

uint64_t LIEF::PE::LoadConfiguration::lock_prefix_table ( ) const
inline

The VA of a list of addresses where the LOCK prefix is used so that they can be replaced with NOP on single processor machines.

Warning
For x86 only

◆ lock_prefix_table() [2/2]

void LIEF::PE::LoadConfiguration::lock_prefix_table ( uint64_t lock_prefix_table)
inline

◆ major_version() [1/2]

uint16_t LIEF::PE::LoadConfiguration::major_version ( ) const
inline

Major Version.

◆ major_version() [2/2]

void LIEF::PE::LoadConfiguration::major_version ( uint16_t major_version)
inline

◆ maximum_allocation_size() [1/2]

uint64_t LIEF::PE::LoadConfiguration::maximum_allocation_size ( ) const
inline

Maximum allocation size, in bytes.

◆ maximum_allocation_size() [2/2]

void LIEF::PE::LoadConfiguration::maximum_allocation_size ( uint64_t maximum_allocation_size)
inline

◆ minor_version() [1/2]

uint16_t LIEF::PE::LoadConfiguration::minor_version ( ) const
inline

Minor version.

◆ minor_version() [2/2]

void LIEF::PE::LoadConfiguration::minor_version ( uint16_t minor_version)
inline

◆ operator=()

LoadConfiguration & LIEF::PE::LoadConfiguration::operator= ( const LoadConfiguration & )
default

◆ print()

◆ process_affinity_mask() [1/2]

uint64_t LIEF::PE::LoadConfiguration::process_affinity_mask ( ) const
inline

Setting this field to a non-zero value is equivalent to calling SetProcessAffinityMask with this value during process startup (.exe only)

◆ process_affinity_mask() [2/2]

void LIEF::PE::LoadConfiguration::process_affinity_mask ( uint64_t process_affinity_mask)
inline

◆ process_heap_flags() [1/2]

uint32_t LIEF::PE::LoadConfiguration::process_heap_flags ( ) const
inline

Process heap flags that correspond to the first argument of the HeapCreate function. These flags apply to the process heap that is created during process startup.

◆ process_heap_flags() [2/2]

void LIEF::PE::LoadConfiguration::process_heap_flags ( uint32_t process_heap_flagsid)
inline

◆ reserved1() [1/2]

uint16_t LIEF::PE::LoadConfiguration::reserved1 ( ) const
inline

Must be zero.

◆ reserved1() [2/2]

void LIEF::PE::LoadConfiguration::reserved1 ( uint16_t reserved1)
inline

◆ security_cookie() [1/2]

uint64_t LIEF::PE::LoadConfiguration::security_cookie ( ) const
inline

A pointer to a cookie that is used by Visual C++ or GS implementation.

◆ security_cookie() [2/2]

void LIEF::PE::LoadConfiguration::security_cookie ( uint64_t security_cookie)
inline

◆ size()

uint32_t LIEF::PE::LoadConfiguration::size ( ) const
inline

Size of the current structure which is an alias for characteristics.

◆ timedatestamp() [1/2]

uint32_t LIEF::PE::LoadConfiguration::timedatestamp ( ) const
inline

Date and time stamp value.

◆ timedatestamp() [2/2]

void LIEF::PE::LoadConfiguration::timedatestamp ( uint32_t timedatestamp)
inline

◆ version()

◆ virtual_memory_threshold() [1/2]

uint64_t LIEF::PE::LoadConfiguration::virtual_memory_threshold ( ) const
inline

Maximum virtual memory size, in bytes.

◆ virtual_memory_threshold() [2/2]

void LIEF::PE::LoadConfiguration::virtual_memory_threshold ( uint64_t virtual_memory_threshold)
inline

Member Data Documentation

◆ WIN_VERSION

VERSION LIEF::PE::LoadConfiguration::WIN_VERSION = VERSION::UNKNOWN
staticconstexpr

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