headers
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
flavor.psp.format_2025.pe_utils.headers
¶
PE header utilities.
Provides utilities for working with PE file headers and offset calculations.
Functions¶
rva_to_file_offset
¶
Map a Relative Virtual Address (RVA) to a file offset.
Walks the section table to find which section contains the RVA and calculates the corresponding file offset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
PE executable data |
required |
rva
|
int
|
Relative Virtual Address to map |
required |
Returns:
| Type | Description |
|---|---|
int | None
|
File offset if mapping succeeded, None otherwise |