Gunslinger Stratos Reloaded / Rise of immortals

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Gunslinger Stratos Reloaded / Rise of immortals

Post by chrrox »

It appears all games using this engine share the same name hashing generator.
i have made model importers for these games but I can not name files because the hash generation is unknown.
I have the full program here
https://www.myairbridge.com/en/?dl=1#!/ ... R46GK9JFEC (Gunslinger Stratos)
also if you want the steam game it is here.
http://store.steampowered.com/app/258160/ (Rise of incarnates)
I noticed while trying to debug this that if i set breakpoints on set file pointer after the 5th one it loads
GxArchivedTable000 at offset 0x7FFF0138 is the hash for it followed by the extension hash.

Code: Select all

#Gunslinger Stratos Reloaded PC
#quickbms script by chrrox
endian big
open FDDE CSH 0
open FDDE DAT 1
goto 0x80
idstring "BILZ"
get SIZE long
get ZSIZE long
get COMTYPE long
clog MEMORY_FILE 0x90 ZSIZE SIZE
goto 8 MEMORY_FILE
get FILES long MEMORY_FILE
print "%FILES%"
savepos TMP MEMORY_FILE
for i = 0 < FILES
goto TMP MEMORY_FILE
get HASHOFF long MEMORY_FILE
get UNK00 long MEMORY_FILE
get FILEID long MEMORY_FILE
get UNK01 long MEMORY_FILE
savepos TMP MEMORY_FILE
goto HASHOFF MEMORY_FILE
get FILEHASH long MEMORY_FILE
get FLDRHASH long MEMORY_FILE
goto FILEID MEMORY_FILE
get FILENUM long MEMORY_FILE
putarray 0 i FILEHASH
putarray 1 i FLDRHASH
putarray 2 i FILENUM
next i

endian little
get MAGIC long 1
get FILES long 1
for i = 0 < FILES
get OFFSET long 1
get SIZE long 1
getarray FILEHASH 0 i
getarray FLDRHASH 1 i
getarray FILENUM  2 i
print "%FILEHASH|x% _ %FLDRHASH|x% _ %FILENUM|x%"
string NAME p= "%08X" FLDRHASH
if NAME == "FC397BB3"
set EXT "tex"
elif NAME == "FA61C1D7"
set EXT "mdl"
elif NAME == "B37FE199"
set EXT "m3r"
elif NAME == "ADD2E39F"
set EXT "csh"
elif NAME == "2283660F"
set EXT "unl"
elif NAME == "547560EF"
set EXT "dat"
elif NAME == "497AC17A"
set EXT "rtd"
elif NAME == "5E12DE0D"
set EXT "mdc"
elif NAME == "3A4305EC"
set EXT "mpk"
elif NAME == "0E1057D3"
set EXT "eff"
elif NAME == "0A04B496"
set EXT "mtsq"
elif NAME == "0B20C6BB"
set EXT "hkx"
elif NAME == "2E81A70D"
set EXT "rss"
elif NAME == "3CE77FBD"
set EXT "spk"
elif NAME == "4D6F1F2D"
set EXT "nut"
elif NAME == "7ED3312C"
set EXT "rsc"
elif NAME == "78EE6CEF"
set EXT "csd"
elif NAME == "466FDED3"
set EXT "xml"
elif NAME == "524A23F3"
set EXT "vsb"
elif NAME == "767EFC95"
set EXT "fpb"
elif NAME == "75573CF7"
set EXT "hka"
elif NAME == "217597F8"
set EXT "tvtx"
elif NAME == "A0B392DF"
set EXT "psb"
elif NAME == "C3D0AC23"
set EXT "cbxd"
elif NAME == "C3D0AD70"
set EXT "cbxd2"
elif NAME == "C3D0AE4E"
set EXT "cbxd3"
elif NAME == "DDE6C1B6"
set EXT "msqp"
else
set EXT NAME
endif
string FILE p= "%08X" FILEHASH
string NAME += \
string NAME += FILE
string NAME += .
string NAME += EXT
log MEMORY_FILE2 OFFSET SIZE 1
if SIZE > 0x80
endian big
goto 0x80 MEMORY_FILE2
getdstring TEST 4 MEMORY_FILE2
if TEST == "BILZ"
get SIZE long MEMORY_FILE2
get ZSIZE long MEMORY_FILE2
get COMTYPE long MEMORY_FILE2
if ZSIZE == SIZE
log NAME 0x90 ZSIZE MEMORY_FILE2
else
clog NAME 0x90 ZSIZE SIZE MEMORY_FILE2
endif
else
log NAME 0 SIZE MEMORY_FILE2
endif
endian little
else
log NAME 0 SIZE MEMORY_FILE2
endif
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Gunslinger Stratos Reloaded / Rise of immortals

Post by aluigi »

Just a tip about the assigning of extensions.
Considering how quickbms handles variables and strings at the same way ("var" and VAR are the same) probably it's suggested to specify extensions with the dot to avoid collisions with other variables.
So ".res" is better than "res", just in case there is a variable called RES and we don't notice it.
raykingnihong
Posts: 71
Joined: Fri Oct 24, 2014 3:13 pm

Re: Gunslinger Stratos Reloaded / Rise of immortals

Post by raykingnihong »

Hi chrrox
My friend Thanks for your great work