comtype LZSS0
savepos BASE
findloc FILES string "\x00\x00\x00\x00"
math FILES / 4
print "%FILES%"
for i = 0 < FILES
get OFFSET long
math OFFSET - 0x1D00000
putarray 0 i OFFSET
next i
get SIZE asize
putarray 0 FILES SIZE
# math FILES - 1
for i = 0 < FILES
set j i
math j + 1
getarray OFFSET 0 i
getarray SIZE 0 j
math SIZE - OFFSET
if SIZE > 0
  math OFFSET + BASE
  log MEMORY_FILE OFFSET SIZE
  get TSIZE long MEMORY_FILE
  get SIZE asize MEMORY_FILE
  print "%TSIZE%"
  if TSIZE > 0x1FFFFF || TSIZE < 0x100 || i < 4 || i = 7
    log "" 0 SIZE MEMORY_FILE
  else
    math SIZE - 4
    clog "" 4 SIZE TSIZE MEMORY_FILE
  endif
else
  log "" 0 0
endif
next i
