| 113 | } |
| 114 | |
| 115 | DWORD PE::fileOffsetToRva(DWORD offset) |
| 116 | { |
| 117 | // find section rva lies within and calculate rva |
| 118 | for (int i = 0; i < pNtHeader->FileHeader.NumberOfSections; i++) |
| 119 | { |
| 120 | if (offset >= pSectionHeader[i].PointerToRawData && |
| 121 | offset < pSectionHeader[i].PointerToRawData + (pSectionHeader[i].SizeOfRawData)) |
| 122 | { |
| 123 | return (offset - pSectionHeader[i].PointerToRawData) + pSectionHeader[i].PointerToRawData; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | // this should never happen |
| 128 | return 0x0; |
| 129 | } |
| 130 | |
| 131 | bool PE::parseHeaders() |
| 132 | { |
nothing calls this directly
no outgoing calls
no test coverage detected