6 if (!buffer || !buf_size)
return nullptr;
11 DWORD entry_rva = dir->VirtualAddress;
12 DWORD entry_size = dir->Size;
16 IMAGE_LOAD_CONFIG_DIRECTORY32* ldc =
reinterpret_cast<IMAGE_LOAD_CONFIG_DIRECTORY32*
>((ULONG_PTR)buffer + entry_rva);
17 return reinterpret_cast<BYTE*
>(ldc);
22 if (!buffer || !buf_size || !ld_config_ptr) {
32 const size_t curr_size = smallest->
Size;
Fetching Load Config Directory and recognizing its version.
struct peconv::_IMAGE_LOAD_CONFIG_DIR64_W10 IMAGE_LOAD_CONFIG_DIR64_W10
BYTE * get_load_config_ptr(BYTE *buffer, size_t buf_size)
t_load_config_ver get_load_config_version(BYTE *buffer, size_t buf_size, BYTE *ld_config_ptr)
struct peconv::_IMAGE_LOAD_CONFIG_DIR32_W8 IMAGE_LOAD_CONFIG_DIR32_W8
struct peconv::_IMAGE_LOAD_CONFIG_DIR32_W10 IMAGE_LOAD_CONFIG_DIR32_W10
bool validate_ptr(IN const void *buffer_bgn, IN size_t buffer_size, IN const void *field_bgn, IN size_t field_size)
struct peconv::_IMAGE_LOAD_CONFIG_DIR64_W8 IMAGE_LOAD_CONFIG_DIR64_W8
struct peconv::_IMAGE_LOAD_CONFIG_DIR64_W7 IMAGE_LOAD_CONFIG_DIR64_W7
bool is64bit(IN const BYTE *pe_buffer)
IMAGE_DATA_DIRECTORY * get_directory_entry(IN const BYTE *pe_buffer, IN DWORD dir_id, IN bool allow_empty=false)
struct peconv::_IMAGE_LOAD_CONFIG_DIR32_W7 IMAGE_LOAD_CONFIG_DIR32_W7
Wrappers over various fields in the PE header. Read, write, parse PE headers.