In this situation, the MVGL files are XORed by two table that I was not able to dump correctly (it was also using the XMM registry if I remember correctly), I've decided to make a simple DLL that will decode this files, so could be unpacked.
I've attached a precompiled DLL and the source code (under GPLv3) in the 7zip archive.
Simply inject the DLL after the game has been started and follow the instructions in the console that has been spawned.
The following script made by chrrox will be able to decompressed the decoded files:
Code: Select all
#Chaos Rings 3
#quickbms script by chrrox
#http://www.chaosrings.com/3/
comtype doboz
IDSTRING "MDB1"
get COUNT1 short
get COUNT2 short
get FILES long
get BASE long
get ARCHIVE_SIZE long
for i = 0 < COUNT1
get UNK01 short
get UNK02 short
get UNK03 short
get UNK04 short
putarray 0 i UNK01
putarray 1 i UNK02
putarray 2 i UNK03
putarray 3 i UNK04
next i
for i = 0 < COUNT2
getdstring EXT 4
getdstring NAME 0x3C
putarray 4 i NAME
putarray 5 i EXT
next i
for i = 0 < FILES
get OFFSET long
math OFFSET += BASE
get SIZE long
get ZSIZE long
putarray 6 i OFFSET
putarray 7 i SIZE
putarray 8 i ZSIZE
next i
for i = 0 < COUNT1
getarray VAR1 1 i
if VAR1 != 0xFFFF
getarray NAME 4 i
getarray EXT 5 i
if EXT == "img "
set EXT string "pvr"
endif
string NAME += "."
string NAME += EXT
getarray OFFSET 6 VAR1
getarray SIZE 7 VAR1
getarray ZSIZE 8 VAR1
if ZSIZE == SIZE
log NAME OFFSET ZSIZE
else
clog NAME OFFSET ZSIZE SIZE
endif
endif
next i