| 288 | } |
| 289 | |
| 290 | bool PeParser::readPeSectionsFromProcess() |
| 291 | { |
| 292 | bool retValue = true; |
| 293 | DWORD_PTR readOffset = 0; |
| 294 | |
| 295 | listPeSection.reserve(getNumberOfSections()); |
| 296 | |
| 297 | for (WORD i = 0; i < getNumberOfSections(); i++) |
| 298 | { |
| 299 | readOffset = listPeSection[i].sectionHeader.VirtualAddress + moduleBaseAddress; |
| 300 | |
| 301 | listPeSection[i].normalSize = listPeSection[i].sectionHeader.Misc.VirtualSize; |
| 302 | |
| 303 | if (!readSectionFromProcess(readOffset, listPeSection[i])) |
| 304 | { |
| 305 | retValue = false; |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | return retValue; |
| 310 | } |
| 311 | |
| 312 | bool PeParser::readPeSectionsFromFile() |
| 313 | { |
nothing calls this directly
no outgoing calls
no test coverage detected