LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_LOAD_CONFIGURATION_H
17#define LIEF_PE_LOAD_CONFIGURATION_H
50 WIN_10_0_MSVC_2019_16,
53 static constexpr VERSION WIN_VERSION = VERSION::UNKNOWN;
60 LoadConfiguration&
operator=(
const LoadConfiguration&) =
default;
62 virtual VERSION
version()
const {
73 return characteristics_;
75 uint32_t
size()
const {
78 return characteristics_;
83 return timedatestamp_;
88 return major_version_;
93 return minor_version_;
99 return global_flags_clear_;
105 return global_flags_set_;
111 return critical_section_default_timeout_;
117 return decommit_free_block_threshold_;
123 return decommit_total_free_threshold_;
133 return lock_prefix_table_;
138 return maximum_allocation_size_;
143 return virtual_memory_threshold_;
149 return process_affinity_mask_;
156 return process_heap_flags_;
184 return security_cookie_;
189 characteristics_ = characteristics;
193 timedatestamp_ = timedatestamp;
197 major_version_ = major_version;
201 minor_version_ = minor_version;
205 global_flags_clear_ = global_flags_clear;
209 global_flags_set_ = global_flags_set;
213 critical_section_default_timeout_ = critical_section_default_timeout;
217 decommit_free_block_threshold_ = decommit_free_block_threshold;
221 decommit_total_free_threshold_ = decommit_total_free_threshold;
225 lock_prefix_table_ = lock_prefix_table;
229 maximum_allocation_size_ = maximum_allocation_size;
233 virtual_memory_threshold_ = virtual_memory_threshold;
237 process_affinity_mask_ = process_affinity_mask;
241 process_heap_flags_ = process_heap_flagsid;
245 csd_version_ = csd_version;
249 reserved1_ = reserved1;
257 editlist_ = editlist;
261 security_cookie_ = security_cookie;
266 static bool classof(
const LoadConfiguration* ) {
273 static const T*
cast(
const LoadConfiguration* config) {
274 if (config->
version() >= T::WIN_VERSION) {
275 return static_cast<const T*
>(config);
280 void accept(Visitor& visitor)
const override;
282 virtual std::ostream&
print(std::ostream& os)
const;
287 uint32_t characteristics_ = 0;
288 uint32_t timedatestamp_ = 0;
290 uint16_t major_version_ = 0;
291 uint16_t minor_version_ = 0;
293 uint32_t global_flags_clear_ = 0;
294 uint32_t global_flags_set_ = 0;
296 uint32_t critical_section_default_timeout_ = 0;
298 uint64_t decommit_free_block_threshold_ = 0;
299 uint64_t decommit_total_free_threshold_ = 0;
301 uint64_t lock_prefix_table_ = 0;
302 uint64_t maximum_allocation_size_ = 0;
303 uint64_t virtual_memory_threshold_ = 0;
304 uint64_t process_affinity_mask_ = 0;
305 uint32_t process_heap_flags_ = 0;
306 uint16_t csd_version_ = 0;
307 uint16_t reserved1_ = 0;
308 uint64_t editlist_ = 0;
309 uint64_t security_cookie_ = 0;
Class that represents the default PE's LoadConfiguration
Definition LoadConfiguration.hpp:35
uint32_t editlist() const
Reserved for use by the system.
Definition LoadConfiguration.hpp:177
void virtual_memory_threshold(uint64_t virtual_memory_threshold)
Definition LoadConfiguration.hpp:232
void lock_prefix_table(uint64_t lock_prefix_table)
Definition LoadConfiguration.hpp:224
void editlist(uint32_t editlist)
Definition LoadConfiguration.hpp:256
LoadConfiguration()=default
void characteristics(uint32_t characteristics)
Definition LoadConfiguration.hpp:188
uint32_t characteristics() const
Characteristics of the structure It usually holds its size.
Definition LoadConfiguration.hpp:72
uint32_t critical_section_default_timeout() const
The default timeout value to use for this process’s critical sections that are abandoned.
Definition LoadConfiguration.hpp:110
static bool classof(const LoadConfiguration *)
Definition LoadConfiguration.hpp:266
uint64_t security_cookie() const
A pointer to a cookie that is used by Visual C++ or GS implementation.
Definition LoadConfiguration.hpp:183
uint64_t decommit_free_block_threshold() const
Memory that must be freed before it is returned to the system, in bytes.
Definition LoadConfiguration.hpp:116
void dependent_load_flags(uint16_t flags)
Definition LoadConfiguration.hpp:252
LoadConfiguration(const details::load_configuration< T > &header)
void reserved1(uint16_t reserved1)
Definition LoadConfiguration.hpp:248
uint64_t process_affinity_mask() const
Setting this field to a non-zero value is equivalent to calling SetProcessAffinityMask with this valu...
Definition LoadConfiguration.hpp:148
void global_flags_set(uint32_t global_flags_set)
Definition LoadConfiguration.hpp:208
uint64_t maximum_allocation_size() const
Maximum allocation size, in bytes.
Definition LoadConfiguration.hpp:137
LoadConfiguration & operator=(const LoadConfiguration &)=default
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
virtual std::ostream & print(std::ostream &os) const
uint16_t minor_version() const
Minor version.
Definition LoadConfiguration.hpp:92
LoadConfiguration(const LoadConfiguration &)=default
uint32_t timedatestamp() const
Date and time stamp value.
Definition LoadConfiguration.hpp:82
uint32_t size() const
Size of the current structure which is an alias for characteristics.
Definition LoadConfiguration.hpp:77
uint16_t csd_version() const
The service pack version identifier.
Definition LoadConfiguration.hpp:160
uint32_t global_flags_set() const
The global loader flags to set for this process as the loader starts the process.
Definition LoadConfiguration.hpp:104
uint64_t virtual_memory_threshold() const
Maximum virtual memory size, in bytes.
Definition LoadConfiguration.hpp:142
void accept(Visitor &visitor) const override
void critical_section_default_timeout(uint32_t critical_section_default_timeout)
Definition LoadConfiguration.hpp:212
void decommit_free_block_threshold(uint64_t decommit_free_block_threshold)
Definition LoadConfiguration.hpp:216
void maximum_allocation_size(uint64_t maximum_allocation_size)
Definition LoadConfiguration.hpp:228
uint64_t decommit_total_free_threshold() const
Total amount of free memory, in bytes.
Definition LoadConfiguration.hpp:122
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 ...
Definition LoadConfiguration.hpp:132
void process_heap_flags(uint32_t process_heap_flagsid)
Definition LoadConfiguration.hpp:240
static const T * cast(const LoadConfiguration *config)
Definition LoadConfiguration.hpp:273
uint32_t global_flags_clear() const
The global loader flags to clear for this process as the loader start the process.
Definition LoadConfiguration.hpp:98
void security_cookie(uint64_t security_cookie)
Definition LoadConfiguration.hpp:260
uint16_t major_version() const
Major Version.
Definition LoadConfiguration.hpp:87
void major_version(uint16_t major_version)
Definition LoadConfiguration.hpp:196
uint32_t process_heap_flags() const
Process heap flags that correspond to the first argument of the HeapCreate function....
Definition LoadConfiguration.hpp:155
uint16_t dependent_load_flags() const
Alias for reserved1.
Definition LoadConfiguration.hpp:172
friend std::ostream & operator<<(std::ostream &os, const LoadConfiguration &config)
void minor_version(uint16_t minor_version)
Definition LoadConfiguration.hpp:200
VERSION
Definition LoadConfiguration.hpp:37
~LoadConfiguration() override=default
uint16_t reserved1() const
Must be zero.
Definition LoadConfiguration.hpp:165
void decommit_total_free_threshold(uint64_t decommit_total_free_threshold)
Definition LoadConfiguration.hpp:220
void global_flags_clear(uint32_t global_flags_clear)
Definition LoadConfiguration.hpp:204
void csd_version(uint16_t csd_version)
Definition LoadConfiguration.hpp:244
void timedatestamp(uint32_t timedatestamp)
Definition LoadConfiguration.hpp:192
void process_affinity_mask(uint64_t process_affinity_mask)
Definition LoadConfiguration.hpp:236
Definition CodeIntegrity.hpp:26
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(DataDirectory::TYPES e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
Definition LoadConfiguration.hpp:29
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42