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

Method ReadTEImageSectionHeaders

view/pe/teview.cpp:65–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void 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
110void TEView::CreateSections()
111{

Callers

nothing calls this directly

Calls 6

LogDebugMethod · 0.80
c_strMethod · 0.80
push_backMethod · 0.80
ReadStringMethod · 0.45
Read32Method · 0.45
Read16Method · 0.45

Tested by

no test coverage detected