MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / normalize_import_va

Method normalize_import_va

pythonmemorymodule/pefile.py:5202–5212  ·  view source on GitHub ↗
(self, va)

Source from the content-addressed store, hash-verified

5200 return ((offset + base + 3) & 0xFFFFFFFC) - (base & 0xFFFFFFFC)
5201
5202 def normalize_import_va(self, va):
5203
5204 # Setup image range
5205 begin_of_image = self.OPTIONAL_HEADER.ImageBase
5206 end_of_image = self.OPTIONAL_HEADER.ImageBase + self.OPTIONAL_HEADER.SizeOfImage
5207
5208 # Try to avoid bogus VAs, which are out of the image.
5209 # This also filters out entries that are zero
5210 if begin_of_image <= va and va < end_of_image:
5211 va -= begin_of_image
5212 return va
5213
5214 def parse_delay_import_directory(self, rva, size):
5215 """Walk and parse the delay import directory."""

Callers 2

get_import_tableMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected