# QQ.com SFC
# script for QuickBMS http://quickbms.aluigi.org

comtype lz4
idstring "SFC\x1a"
get VER long
if VER == 2
get SFC_SIZE asize
for
    savepos TMP
    if TMP >= SFC_SIZE
        break
    endif
    getdstring DUMMY 8
    get ZSIZE long
    savepos OFFSET
    xmath TMP "OFFSET + ZSIZE"
    goto TMP
    get SIZE long
    clog "" OFFSET ZSIZE SIZE
next
elif VER == 3
get FileCount long
for i = 0 < FileCount
   get UnkData long
   get SIZE1 long  
   get OFFSET long   
       
   savepos InfoPos 

   goto OFFSET
   get ZSIZE long
   savepos DataPos
   savepos TMP
   xmath TMP "DataPos + ZSIZE" 
   goto TMP
   get SIZE long
   goto DataPos
   clog "" DataPos ZSIZE SIZE  
   goto InfoPos
next i 
endif