READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

The Dark Knight Rises .gla

Read or post about compression. And decompression. Or ask questions how to decompress your files.
pepsiguy2
beginner
Posts: 24
Joined: Tue Apr 17, 2012 3:08 am
Been thanked: 1 time

The Dark Knight Rises .gla

Post by pepsiguy2 » Fri Jul 20, 2012 4:43 pm

Gameloft has used this format for almost all of their mobile games since NOVA, and now it's most notable as an archive in TDKR. The textures and almost everything else are held up in .gla archives I can't seem to extract. I can PM a file sample if needed.

Thanks

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Tue Jul 31, 2012 3:31 am

I'm interested too anyone?

dragbody
veteran
Posts: 126
Joined: Tue Sep 20, 2011 4:33 am
Has thanked: 137 times
Been thanked: 9 times

Re: The Dark Knight Rises .gla

Post by dragbody » Sat Aug 04, 2012 12:55 am

Agreed. A QuickBMS script to unpack those gla files would be very handy.

JayK
veteran
Posts: 122
Joined: Fri Jun 01, 2012 10:08 am
Has thanked: 31 times
Been thanked: 66 times

Re: The Dark Knight Rises .gla

Post by JayK » Sat Sep 22, 2012 10:42 am

here is a quickbms code I wrote to extract .bdae files from the actors.gla file.

Code: Select all

endian BIG
get UNK long
get START long
get BDAEOFFSET long
get FILES long
for i = 0 < FILES
get OFFSET long 
get SIZE long
get CURSET long
Math CURSET + BDAEOFFSET
savepos END 
goto CURSET
getdstring NAME 0x32
goto END
get UNK2 long


log NAME OFFSET SIZE
next i
the bdae files seem to contain the textures and 3ds max files, they have the header BRES.
Last edited by JayK on Sun Sep 23, 2012 12:33 pm, edited 1 time in total.

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Sat Sep 22, 2012 12:42 pm

rman2 wrote:here is a quickbms code I wrote to extract .bdae files from the actors.gla file.

Code: Select all

endian BIG
get UNK long
get START long
get BDAEOFFSET long
get FILES long
for i = 0 < FILES
get OFFSET long 
get SIZE long
get CURSET long
Math CURSET + BDAEOFFSET
savepos END 
goto CURSET
getdstring NAME 0x32
goto END
get UNK long


log NAME OFFSET SIZE
next i
the bdae files seem to contain the textures and 3ds max files, they have the header BRES.
Excellent work! now how do we unpack those .bdae files

JayK
veteran
Posts: 122
Joined: Fri Jun 01, 2012 10:08 am
Has thanked: 31 times
Been thanked: 66 times

Re: The Dark Knight Rises .gla

Post by JayK » Sat Sep 22, 2012 12:47 pm

I'll have a look at it but I'm new to this, this is the first thing I've ever written :s

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Sat Sep 22, 2012 12:49 pm

rman2 wrote:I'll have a look at it but I'm new to this, this is the first thing I've ever written :s
well its good to have you trying out man! I have been wanting to extract these gameloft game data files since 2010
If you ever need any files Im here to provide them

dragbody
veteran
Posts: 126
Joined: Tue Sep 20, 2011 4:33 am
Has thanked: 137 times
Been thanked: 9 times

Re: The Dark Knight Rises .gla

Post by dragbody » Sun Sep 23, 2012 12:39 am

rman - Great work on the script. It extracts the gla archives perfectly.

I look forward to someone examining the bdae files. Also, the textures are extracted to tga format, but they are not standard tgas and are not recognized by Noesis or any other image editing program I have.

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Sun Sep 23, 2012 8:11 am

Can anyone try extracting the Modern Combat 3 files?

The Raw unencrypted files from gameloft looks like this

Image

I still have the old unencrypted Modern combat sandstorm .ipa file before they started encrypting them

Gameloft MC3 1003233780.sobfs

.sobfs files can be opend in vlc player

They are just .WAV files but renamed .sobfs

User avatar
GMMan
veteran
Posts: 139
Joined: Fri Nov 05, 2010 10:14 pm
Been thanked: 54 times

Re: The Dark Knight Rises .gla

Post by GMMan » Wed Oct 24, 2012 2:54 am

I have a GLA extractor on hand with decryption implemented. I just disassembled the NOVA3 code, and it contains better code flow than what I derived from NOVA2, so I'll be tidying up the code a bit.

Note: for DDS files you need The Decompressonator to convert to a standard DDS.
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

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Wed Oct 24, 2012 3:16 am

GMMan wrote:I have a GLA extractor on hand with decryption implemented. I just disassembled the NOVA3 code, and it contains better code flow than what I derived from NOVA2, so I'll be tidying up the code a bit.

Note: for DDS files you need The Decompressonator to convert to a standard DDS.
Oh great when will you release?

User avatar
GMMan
veteran
Posts: 139
Joined: Fri Nov 05, 2010 10:14 pm
Been thanked: 54 times

Re: The Dark Knight Rises .gla

Post by GMMan » Wed Oct 24, 2012 11:50 pm

I'm done tidying up my code, so it's time for a release. Attached you will find the extractor build, extractor source, and encryption algorithm source. This program is written in C#, with the encryption implemented in C++ because it's easier to deal with arbitrary amounts of bytes and shifting and what not in C++ than C#. Anyway, just drag and drop the .gla file over the extractor executable and it'll extract the files into a folder with the same name as the .gla file with "_extracted" appended to it. In the extractor is an implementation of CCustomPakFileReader, which is the pak reader used in Gameloft games. It's not identical (I'm too lazy to go try to emulate it exactly), but its methods should return more or less what you would expect from the corresponding methods in Gameloft's games. The extractor can be included as a referenced assembly if anyone wants to use it as a reader in their Gameloft game modding program.

A pak writer is not implemented, though a quick test with the ENCODE_XOR32 method seems to produce the correct encrypted files.

Please note there are many types of archives used by Gameloft games. There's one used for their older games (I have a quickly whipped up extractor called GameloftCrapEngineExtract, because the games made with their old engine are crap (Assassin's Creed: Altair's Chronicles, anybody?)), this one, scrambled ZIP (used in Asphalt 6 for audio, can be converted with a quick binary search and replace plus recovering byte patterns that has been mistakenly replaced in the process), and something using a different type of encryption that I haven't gotten to (also with .gla extension). Make sure you stick the right type of file into the extractor, or else it will choke and crash. This particular format is in big endian, 16 bytes of header, and the an array of 16 byte entries. You'll see a lot of zeros in the first kilobyte or so of the file. The last column of 4 bytes for entries is either 0 (no encryption) or 1 (encrypted). All file names are encrypted, but file data may or may not be encrypted. Note this program may not be compatible with .gla files that do not have file names encrypted.

For further study: Vox Native audio (Vox is the sound engine used in Glitch games, and the native format can specify effects, playlists, and segments while storing audio data in a big chunk), and Binary Collada (BDAE) models (tried once, very confusing; will try again with symbols, and hopefully it's easier).

Download: blog/?p=659
Last edited by GMMan on Tue Dec 04, 2012 6:50 pm, edited 1 time in total.
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

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Thu Oct 25, 2012 3:43 am

GMMan wrote:I'm done tidying up my code, so it's time for a release. Attached you will find the extractor build, extractor source, and encryption algorithm source. This program is written in C#, with the encryption implemented in C++ because it's easier to deal with arbitrary amounts of bytes and shifting and what not in C++ than C#. Anyway, just drag and drop the .gla file over the extractor executable and it'll extract the files into a folder with the same name as the .gla file with "_extracted" appended to it. In the extractor is an implementation of CCustomPakFileReader, which is the pak reader used in Gameloft games. It's not identical (I'm too lazy to go try to emulate it exactly), but its methods should return more or less what you would expect from the corresponding methods in Gameloft's games. The extractor can be included as a referenced assembly if anyone wants to use it as a reader in their Gameloft game modding program.

A pak writer is not implemented, though a quick test with the ENCODE_XOR32 method seems to produce the correct encrypted files.

Please note there are many types of archives used by Gameloft games. There's one used for their older games (I have a quickly whipped up extractor called GameloftCrapEngineExtract, because the games made with their old engine are crap (Assassin's Creed: Altair's Chronicles, anybody?)), this one, scrambled ZIP (used in Asphalt 6 for audio, can be converted with a quick binary search and replace plus recovering byte patterns that has been mistakenly replaced in the process), and something using a different type of encryption that I haven't gotten to (also with .gla extension). Make sure you stick the right type of file into the extractor, or else it will choke and crash. This particular format is in big endian, 16 bytes of header, and the an array of 16 byte entries. You'll see a lot of zeros in the first kilobyte or so of the file. The last column of 4 bytes for entries is either 0 (no encryption) or 1 (encrypted). All file names are encrypted, but file data may or may not be encrypted. Note this program may not be compatible with .gla files that do not have file names encrypted.

For further study: Vox Native audio (Vox is the sound engine used in Glitch games, and the native format can specify effects, playlists, and segments while storing audio data in a big chunk), and Binary Collada (BDAE) models (tried once, very confusing; will try again with symbols, and hopefully it's easier).

Note: Pending posting to tools blog. Source code will be available there.
#1 :owned2:


Thankyou for your efforts man will test this out soon

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: The Dark Knight Rises .gla

Post by cra0 » Mon Dec 17, 2012 3:45 am

for Gameloft's Modern Combat 4 i have been playing around with the filetype .sobfs

currently working on getting them to export out to usable formats

Image

User avatar
Tosyk
double-veteran
double-veteran
Posts: 934
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 225 times
Been thanked: 110 times
Contact:

Re: The Dark Knight Rises .gla

Post by Tosyk » Tue Dec 25, 2012 5:26 am

GMMan wrote:Download: blog/?p=659
i can't extract .gla files from dark knight, it cause me na error about unavaliable path, but i CAN extract .gla from '9mm' game (gameloft game) without any problem, can you help me?
Thank you for all you do here
my blog | my forum

Post Reply