XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Apr 24, 2017 6:21 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Gameloft CustomPak Extractor
PostPosted: Sun Sep 22, 2013 1:28 am 
Offline
veteran
User avatar

Joined: Fri Nov 05, 2010 10:14 pm
Posts: 137
Has thanked: 0 time
Have thanks: 47 times

For housekeeping, this will be the official page for this tool, instead of spreading it across posts on a research thread.

Download at the tools blog. Source code included.

This program is for extracting files from Gameloft games utilizing their Glitch game engine. This archive format has been used in the N.O.V.A., Asphalt, Modern Combat series, and various other games. This program is capable of extracting from both little and big endian versions of the archive, and can decrypt encrypted files and file names.

Usage:
Drag and drop your .gla file on to the extractor. It will extract files to a folder with the pak's name and "_extracted" appended to it. If extraction fails, check the following:
  1. the endianess of the file. Open the file in a hex editor, and look across the first 4 ints (16 bytes). If null bytes comes at the front, the file is big endian. Otherwise, it is little endian. For little endian files, give the extractor argument "/l" on the command line in addition to your pak path.
  2. whether or not file names are encrypted. In older Glitch games, file names are not encrypted. If you go to the offset indicated by the third int, you will see the file name table. If it's in ASCII, specify "/n" on the command line.
  3. whether or not the directory is writable. It usually isn't a problem, but please check.

About GameloftDecryption:
It contains the implementation for ENCODE_XOR32 and DECODE_XOR32 functions. The compiled DLL must be present in the extractor's directory for the extractor to work. (If your pak's file names are not encrypted and there are no encrypted files in the pak, then this DLL do not necessarily need to be present. But that situation is quite rare.) I have not tried compiling this in 64-bits, so there's no guarantee on portability. (But it will work on a 64-bit system when compiled as 32-bits.)

Other notes:
The format is single level, meaning there are no sub-directories. The first int is unknown in its purpose, but as far as I can tell it's not actually being used in the games. Also, file extensions may be missing a few letters. That is not a bug in the extractor; it was packed like that. The source code for the extractor is not in my usual style, since I was trying to make an equivalent implementation to CCustomPakReader found in Gameloft's code. It's not identical, but you'll find that the public methods exposed in Gameloft's code are implemented and should work the same.

New discoveries:
There is now a version of the CustomPak that supports DEFLATE compression, along with a changed encryption key.

Version history
[1.0.2.0 2014-07-23]
  • Added decompression support
  • Added support for new encryption key
[1.0.1.0 2013-09-19]
  • Added "unencrypted file names" option
  • Added "little endian" option
[1.0 2012-10-24]
  • Initial release


You can make the ads go away by registering


_________________
Currently researching: Alpha Prime scripting (AI and mods)
Queued: EE .cache repacking, CustomPak repacking, Gameloft Scrambled Zip multitool, GRAF Extractor Skeleton repacking, Gun Metal filenames CRC


Last edited by GMMan on Wed Jul 23, 2014 4:41 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Gameloft CustomPak Extractor
PostPosted: Mon Sep 23, 2013 6:09 pm 
Offline
veteran
User avatar

Joined: Fri Nov 05, 2010 10:14 pm
Posts: 137
Has thanked: 0 time
Have thanks: 47 times
A GUI version of the program is available on the tools blog.

_________________
Currently researching: Alpha Prime scripting (AI and mods)
Queued: EE .cache repacking, CustomPak repacking, Gameloft Scrambled Zip multitool, GRAF Extractor Skeleton repacking, Gun Metal filenames CRC


Last edited by GMMan on Wed Jul 23, 2014 11:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Gameloft CustomPak Extractor
PostPosted: Wed Jul 23, 2014 4:41 pm 
Offline
veteran
User avatar

Joined: Fri Nov 05, 2010 10:14 pm
Posts: 137
Has thanked: 0 time
Have thanks: 47 times
The program has been updated to have decompression support, and I added a new encryption key.

_________________
Currently researching: Alpha Prime scripting (AI and mods)
Queued: EE .cache repacking, CustomPak repacking, Gameloft Scrambled Zip multitool, GRAF Extractor Skeleton repacking, Gun Metal filenames CRC


Top
 Profile  
 
 Post subject: Re: Gameloft CustomPak Extractor
PostPosted: Wed Jul 23, 2014 7:38 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 428
Has thanked: 29 times
Have thanks: 178 times
GUI also updated check the blog

_________________
Devblog


Top
 Profile  
 
 Post subject: Re: Gameloft CustomPak Extractor
PostPosted: Sat Sep 05, 2015 12:49 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jan 05, 2011 12:41 pm
Posts: 575
Has thanked: 39 times
Have thanks: 583 times
Hello GMMan! Recently, I was trying to extract new Gameloft game - Modern Combat 5: Blackout with your tool, but this game appears to be using new version of .gla archives - .gla2. Could you take a look?
Here's sample .gla2
https://www.sendspace.com/file/x4zp72
Thanks in advance!



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group