Gameloft Custompak (obb unpacker)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Chipicao
Posts: 9
Joined: Fri Aug 08, 2014 4:49 am

Gameloft Custompak (obb unpacker)

Post by Chipicao »

Tested with GT Racing 2 and The Dark Knight Rises for Android. For the later it can also extract gla archives.
I understand from GMMan that this format may also have encryption, but that's probably in other games.

Code: Select all

# Gameloft CustomPak extractor
# script for QuickBMS http://quickbms.aluigi.org
# tested with GT Racing 2 and The Dark Knight Rises .obb archives

endian big

get DUMMY long
get DATA_OFF long
get NAMES_OFF long
get FILES long
get BNAME basename

savepos LASTFILE
for i = 0 < FILES
   goto LASTFILE
   get OFFSET long   #relative to file start
   get SIZE long
   get NAME_OFF long   #relative to NAMES_OFF
   get DUMMY long
   savepos LASTFILE

   math NAME_OFF += NAMES_OFF
   goto NAME_OFF
   get NAME string
   set FNAME string BNAME
   string FNAME += /
   string FNAME += NAME

   log FNAME OFFSET SIZE
next i
cyanic
Posts: 13
Joined: Wed Aug 13, 2014 1:44 am

Re: Gameloft Custompak (obb unpacker)

Post by cyanic »

Encryption is typically seen in .gla files where the .obb has been unpacked first. You probably won't see file encryption in .obb CustomPaks, though you may possibly encounter encryption in filenames.