I've tried to get my first QuickBMS script up and running today (I later found out that there is already a script for an older, slightly different version of the archive type I've been messing with...

Issue a) the last file in an archive doesn't get extracted for some reason.
Issue b) for larger files, I get the "Returned output size is negative (-1)" error and I just don't know why. The structure looks just like the files that work fine (sans issue a).
Here is the script (adapted some stuff from the other one):
Code: Select all
idstring GFAC
get version long
get unknown1 long
get table_offset long
get table_size long
get data_offset long
get data_size long
goto data_offset
idstring GFCP
get unknown2 long
get unknown3 long
get extracted_size long
get compressed_size long
set compressed_offset data_offset
math compressed_offset + 0x14
comtype bpe
clog memory_file compressed_offset compressed_size extracted_size
goto table_offset
get file_count long
savepos read_offset
for i = 0 < file_count
goto read_offset
get unknown4 long
get name_offset long
get file_size long
get file_offset long
savepos read_offset
math file_offset - data_offset
goto name_offset
get file_name string
log file_name file_offset file_size memory_file
next i
Here are some example archives that work and some that don't. https://mega.co.nz/#!JYYXxb7Y!jYpbZa1tT ... ZMLKSpXWH0
I'd really appreciate your help
