| 63 | } |
| 64 | |
| 65 | void TEView::ReadTEImageSectionHeaders(BinaryReader& reader, uint32_t numSections) |
| 66 | { |
| 67 | for (uint32_t i = 0; i < numSections; i++) |
| 68 | { |
| 69 | TEImageSectionHeader section; |
| 70 | section.name = reader.ReadString(8); |
| 71 | section.virtualSize = reader.Read32(); |
| 72 | section.virtualAddress = reader.Read32(); |
| 73 | section.sizeOfRawData = reader.Read32(); |
| 74 | section.pointerToRawData = reader.Read32(); |
| 75 | section.pointerToRelocations = reader.Read32(); |
| 76 | section.pointerToLineNumbers = reader.Read32(); |
| 77 | section.numberOfRelocations = reader.Read16(); |
| 78 | section.numberOfLineNumbers = reader.Read16(); |
| 79 | section.characteristics = reader.Read32(); |
| 80 | |
| 81 | m_logger->LogDebug( |
| 82 | "TEImageSectionHeader[%i]\n" |
| 83 | "\tname: %s\n" |
| 84 | "\tvirtualSize: %08x\n" |
| 85 | "\tvirtualAddress: %08x\n" |
| 86 | "\tsizeOfRawData: %08x\n" |
| 87 | "\tpointerToRawData: %08x\n" |
| 88 | "\tpointerToRelocations: %08x\n" |
| 89 | "\tpointerToLineNumbers: %08x\n" |
| 90 | "\tnumberOfRelocations: %04x\n" |
| 91 | "\tnumberOfLineNumbers: %04x\n" |
| 92 | "\tcharacteristics: %08x\n", |
| 93 | i, |
| 94 | section.name.c_str(), |
| 95 | section.virtualSize, |
| 96 | section.virtualAddress, |
| 97 | section.sizeOfRawData, |
| 98 | section.pointerToRawData, |
| 99 | section.pointerToRelocations, |
| 100 | section.pointerToLineNumbers, |
| 101 | section.numberOfRelocations, |
| 102 | section.numberOfLineNumbers, |
| 103 | section.characteristics |
| 104 | ); |
| 105 | |
| 106 | m_sections.push_back(section); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | void TEView::CreateSections() |
| 111 | { |