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.
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:
- 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.
- 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.
- whether or not the directory is writable. It usually isn't a problem, but please check.
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.)
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.
There is now a version of the CustomPak that supports DEFLATE compression, along with a changed encryption key.
- Added decompression support
- Added support for new encryption key
- Added "unencrypted file names" option
- Added "little endian" option
- Initial release