mirror of
https://github.com/TangentFoxy/love-pe.git
synced 2025-07-28 02:02:16 +00:00
Now parses the sections table
This commit is contained in:
@@ -76,6 +76,34 @@ function icapi.extractIcon(exeFile)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Sections Table
|
--Sections Table
|
||||||
|
local Sections = {}
|
||||||
|
|
||||||
|
for i=1, NumberOfSections do
|
||||||
|
print("Section",i)
|
||||||
|
|
||||||
|
local Section = {}
|
||||||
|
|
||||||
|
Section.Name = ""
|
||||||
|
for i=1,8 do
|
||||||
|
local char = exeFile:read(1)
|
||||||
|
if char ~= "\0" then
|
||||||
|
Section.Name = Section.Name .. char
|
||||||
|
end
|
||||||
|
end
|
||||||
|
print("Name",Section.Name)
|
||||||
|
|
||||||
|
Section.VirtualSize = decodeNumber(exeFile:read(4))
|
||||||
|
Section.VirtualAddress = decodeNumber(exeFile:read(4))
|
||||||
|
Section.SizeOfRawData = decodeNumber(exeFile:read(4))
|
||||||
|
Section.PointerToRawData = decodeNumber(exeFile:read(4))
|
||||||
|
Section.PointerToRelocations = decodeNumber(exeFile:read(4))
|
||||||
|
Section.PointerToLinenumbers = decodeNumber(exeFile:read(4))
|
||||||
|
Section.NumberOfRelocations = decodeNumber(exeFile:read(2))
|
||||||
|
Section.NumberOfLinenumbers = decodeNumber(exeFile:read(2))
|
||||||
|
Section.Characteristics = decodeNumber(exeFile:read(4))
|
||||||
|
|
||||||
|
Sections[i] = Section
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return icapi
|
return icapi
|
Reference in New Issue
Block a user