#BMS script for system.res idstring "Pres" get Headersize long get UNK1 long get UNK2 long get datastart long
goto 0x28 get tbloff3 long
goto 0x48 get tbloff2 long
goto 0xE0 savepos tbloff1
xmath files "(tbloff2 - tbloff1) / Headersize"
for i = 0 < files get OFFSET short get UNK3 short get ZSIZE long get noff long savepos tmp
goto noff get namstart long get extstart long get extend long xmath namlength "extstart - namstart - 1" xmath extlength "extend - extstartf - 1"
goto namstart getdstring name namlength
goto extstart getdstring ext extlength
get packname filename string packname += _unpacked/ string packname += name string packname += "." string packname += "ext"
goto tmp get UNK4 long get null longlong get null long get SIZE long
if SIZE == ZSIZE log packname OFFSET SIZE else
string packname p "unknown_compression/%s" packname log packname OFFSET ZSIZE endif
next i
I guess that the number of files in system.res is 96h = 150. And I'm not sure 1D 00 00 00 at 34h is files long. Also don't know about compression. And *.rdp file is a package of idstring "Pres" files. But it's structure is different from system.res file.
In case you can't find the index file I have written a scanner. It works but it's not like having the index file because many names are missing and everything is just "guessed" (guessed means that a small percentage is wrong):
aluigi wrote:In case you can't find the index file I have written a scanner. It works but it's not like having the index file because many names are missing and everything is just "guessed" (guessed means that a small percentage is wrong):
I'm working on an extractor for God Eater/ Gods Eater Burst, and the file structure seems the same. I use system.res as the entry point, and some of it's entries point to the package.rdp(no data.rdp in GE1), which itself contains more .res files. The compression is done using GZip in GE1. Here's a 010 Editor template and a QuickBMS script for .res files: https://mega.co.nz/#F!i9tyAB6B!H8xjOij_uYU53fN0CRhr_Q
I haven't tested the QuickBMS script in a while so idk if it even works. The 010 template seems to work for your system.res file.
What I don't get is how system.res points to the rdp archive, I don't see these references. There are 4 bits in the OFFSET field that are used as flags and must be considered while extracting the files.
Right after header, at offset pointed by int after magicNum is the group table. The group table is divided into 8 filetable offsets and fileCount (= two 32bit uint). Files belonging to groups 0, 1 and 4 are located in package.rdp. The rest of the groups are located inside the .res file that owns the group table. Additionally, offsets in groups 0, 1 and 4 are actually block indexes. Block size is 32768 bytes, so the resulting offset in package.rdp is readInt * 32768. Group 5 contains small table files which I haven't been able to figure out, but their size is noted in 32bit words, so the real size is readInt * 4.
Do you mean fileoffset by OFFSET field? I don't see flags there. All values seem to be stored in positive 32bit uint/int and right after fileoffset there is filesize.
The bms script is unfinished because I couldn't find a way to load two files into QuickBMS. The 010 script works much better, though it doesn't support two files either.
On GE2 you can see the offsets having a 0xc0000000 mask. With quickbms it's possible to load multiple files with the Open command and assigning them a different file number, for example open FDSE "file.txt" get DUMMY long open FDSE "file2.txt" 1 get DUMMY long 1