First of all, here's the last 1mb of the archive: http://www90.zippyshare.com/v/YuPHEr6C/file.html
Now, here's part of my script:
Code: Select all
goto 0x24ad957c
get FILES long
for i = 0 < FILES
get OFFSET long
get SIZE long
get ZSIZE long
get CIDENT long # compression identifier
putArray 0 i OFFSET
putArray 1 i SIZE
putArray 2 i ZSIZE
next i
get ENTRIES long
get UNK long
savepos NAMEBIAS
xmath NAMEBIAS "ENTRIES * 8 + NAMEBIAS"
set k -1
set FOLDER "."
for i = 0 < ENTRIES
get NAMEPOS long
get UNK byte
get LAST byte
get IDENT short
savepos MYOFF
math NAMEPOS += NAMEBIAS
goto NAMEPOS
get NAME string
# here comes the name creation
next i
The confusion starts with the fields IDENT and LAST that determine when a name is a folder or a sub-folder. What I understand so far is:
- IDENT == 0 -> NAME = folder name
- IDENT != 0 -> NAME = file name
- LAST == 1 -> NAME is last file in current folder, go one folder level up ("cd ..")
- LAST == 0, IDENT != 0 -> NAME is last file in folder, next NAME is a sub-folder
- LAST == 0, IDENT == 0 -> NAME is folder, next NAME is another sub-folder
- LAST == 1, IDENT == 0 -> ???
I'm not entirely sure if that is how the identifiers work because I'm not even able to program these instructions into a script. Can somebody help me out here? I'd be very thankful!