Gangstar Vegas - *.g4, compression problem

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Gangstar Vegas - *.g4, compression problem

Post by AlphaTwentyThree »

Hello!
I've just written a script for the g4 archives of Gangstar Vegas (for iOS) but I think the decompression is off. None of the extracted zip archives can be opened or extracted (with Luigi's script). The decompression size is correct but maybe I chose the wrong comp method nevertheless?
Here's my script (I've attached the func_getTYPE.bms):

Code: Select all

include "func_getTYPE.bms"
comtype COMPRLIB_RLE2
idstring "Voxarch2"
get DUMMY long
get VER long
get FILES long
get BNAME basename
goto 0x80
for i = 1 <= FILES
   get CRC long
   get HASH long
   get COMP long
   get SIZE long
   get ZSIZE long
   get OFFSET long
   if COMP == 0
      putVarChr MEMORY_FILE SIZE 0
      log MEMORY_FILE 0 0
      append
      log MEMORY_FILE OFFSET SIZE
      append
   elif COMP == 1
      putVarChr MEMORY_FILE ZSIZE 0
      log MEMORY_FILE 0 0
      append
      clog MEMORY_FILE OFFSET SIZE ZSIZE
      append
   endif
   callfunction getTYPE 1
   string NAME p= "%s_0x%08x%s" BNAME CRC EXT
   get SIZE asize MEMORY_FILE
   if SIZE != 0
      log NAME 0 SIZE MEMORY_FILE
   endif
next i
And here's a sample file: http://*USE_ANOTHER_FILEHOSTING*/04460f4 ... enu_low.7z
Thanks for your help!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Gangstar Vegas - *.g4, compression problem

Post by aluigi »

As far as I can see the alrogithm CRLE (189) is the best one but I don't think is the correct one or the ZIP archives are customized.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Gangstar Vegas - *.g4, compression problem

Post by AlphaTwentyThree »

CRLE crashes with an error. :\
I'll leave it as it is, I already got my hands on the music (MPCK-compressed though). ;)
hackspeedok
Posts: 404
Joined: Mon Oct 06, 2014 6:41 pm

Re: Gangstar Vegas - *.g4, compression problem

Post by hackspeedok »

I hope the completed script for this game :)
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Gangstar Vegas - *.g4, compression problem

Post by AlphaTwentyThree »

hackspeedok wrote:I hope the completed script for this game :)

Well, the above script seems to work but as Luigi said maybe the zip archives are obfuscated.
hackspeedok
Posts: 404
Joined: Mon Oct 06, 2014 6:41 pm

Re: Gangstar Vegas - *.g4, compression problem

Post by hackspeedok »

AlphaTwentyThree wrote:
hackspeedok wrote:I hope the completed script for this game :)

Well, the above script seems to work but as Luigi said maybe the zip archives are obfuscated.

Import ok ? And what's problem with the text files ?? Can you help me ? Thanks.