| 453 | } |
| 454 | |
| 455 | DWORD PeParser::getSectionHeaderBasedFileSize() |
| 456 | { |
| 457 | DWORD lastRawOffset = 0, lastRawSize = 0; |
| 458 | |
| 459 | //this is needed if the sections aren't sorted by their RawOffset (e.g. Petite) |
| 460 | for (WORD i = 0; i < getNumberOfSections(); i++) |
| 461 | { |
| 462 | if ((listPeSection[i].sectionHeader.PointerToRawData + listPeSection[i].sectionHeader.SizeOfRawData) > (lastRawOffset + lastRawSize)) |
| 463 | { |
| 464 | lastRawOffset = listPeSection[i].sectionHeader.PointerToRawData; |
| 465 | lastRawSize = listPeSection[i].sectionHeader.SizeOfRawData; |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | return (lastRawSize + lastRawOffset); |
| 470 | } |
| 471 | |
| 472 | DWORD PeParser::getSectionHeaderBasedSizeOfImage() |
| 473 | { |
nothing calls this directly
no outgoing calls
no test coverage detected