The data starts at 0x800, and the first entry points to 0x800. The next one points to 0x9000
So you would think filesize == 0x9000 - 0x800 would be stored somewhere in one of those 4 variables in the file entry, but I don't see it.
Code: Select all
#Lord of the Rings - Conquest BIN unpacker
#Array 0 = Names
#Array 1 = Offsets
#Array 2 = Sizes
#Array 3 = Compressed sizes
get unk1 long
get unk2 long
get NAME_OFS long
get unk3 long
get FILES long
get FILES2 long
get FILE_OFS long
get null long
get unk4 long
get unk5 long
get unk6 long #FILES == unk4 + unk6
#get the entries
goto FILE_OFS
for i = 0 < FILES do
get unk1 long
get OFFSET long
get unk2 long
get unk3 long
get unk4 long
#put offset in array 1 at index i
putarray 1 i OFFSET
next i
#get the names
goto NAME_OFS
for i = 0 < FILES do
get len long
getdstring NAME len
putarray 0 i NAME
next i
#just testing. Grab values from index 0 of arrays
getarray NAME 0 0
getarray OFFSET 1 0
print "%NAME% %OFFSET%"