MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / RVAToFileOffset

Method RVAToFileOffset

view/pe/coffview.cpp:1381–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1379
1380
1381uint64_t COFFView::RVAToFileOffset(uint64_t offset, bool except)
1382{
1383 for (auto& i : m_sections)
1384 {
1385 if ((offset >= i.virtualAddress) &&
1386 (offset < (i.virtualAddress + i.sizeOfRawData)) && (i.virtualSize != 0))
1387 {
1388 uint64_t progOfs = offset - i.virtualAddress;
1389 return i.pointerToRawData + progOfs;
1390 }
1391 }
1392
1393 if (!except)
1394 return offset;
1395
1396 throw COFFFormatException("encountered invalid offset");
1397}
1398
1399
1400uint32_t COFFView::GetRVACharacteristics(uint64_t offset)

Callers

nothing calls this directly

Calls 1

COFFFormatExceptionClass · 0.85

Tested by

no test coverage detected