Hey guys, I'm ThatTrueStruggle. You might know me from VG-Resource, but enough of that. I've come in searching of knowledge for finishing a script. Right now, I have a script written to extract CGFX files from those BIN files. However what's giving me grief is a format called the BGRS format. I'm assuming it's a type of subfile for BCH files. Also since BCH files don't have a set file size, I can't use the same method on the CGFX files. But yeah any knowledge you guys have, It'd be amazing. Here's my current script for use with QuickBMS.
idstring "FARC"
get Size asize
callfunction CGFXExtract
goto 0
callfunction BCHExtract
startfunction CGFXExtract
for i = 0
get PATH basename
SavePos Position
if Position == SIZE
break
endif
FindLoc Offset string "CGFX" 0 "noCGFX"
if Offset == "noCGFX"
break
endif
goto Offset
idstring "CGFX"
get Endianness short
get Length short
get Revision long
get FileLength long
goto Offset
goto FileLength 0 SEEK_CUR
string PATH += i
string PATH += ".cgfx"
log PATH Offset fileLength
next i
endfunction
startfunction BCHExtract
endfunction