Utility Functions
Memory and Module Utilities
is_valid(std::uintptr_t addr)
Checks if an address is within valid physical memory ranges.
Parameters:
addr
: Address to check
Returns: bool
Example:
init_ranges()
Initializes the physical memory ranges.
Returns: bool
Example:
get_file_header(void* base_addr)
Gets the file header of a module.
Parameters:
base_addr
: Base address of the module
Returns: PIMAGE_FILE_HEADER
Example:
These functions provide utilities for checking memory validity, initializing memory ranges, and accessing module file headers. The is_valid
function is particularly useful for ensuring that memory operations are performed on valid addresses, while init_ranges
sets up the necessary information for memory range checks. The get_file_header
function allows for direct access to a module's file header, which can be useful for analyzing loaded modules or performing advanced memory operations.
Last updated