XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Aug 17, 2018 8:22 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: The Dark Knight Rises .gla
PostPosted: Fri Jul 20, 2012 4:43 pm 
Offline
n00b

Joined: Tue Apr 17, 2012 3:08 am
Posts: 18
Has thanked: 0 time
Have thanks: 1 time

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

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Tue Jul 31, 2012 3:31 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
I'm interested too anyone?

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sat Aug 04, 2012 12:55 am 
Offline
veteran

Joined: Tue Sep 20, 2011 4:33 am
Posts: 126
Has thanked: 137 times
Have thanks: 9 times
Agreed. A QuickBMS script to unpack those gla files would be very handy.


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sat Sep 22, 2012 10:42 am 
Offline
veteran

Joined: Fri Jun 01, 2012 10:08 am
Posts: 122
Has thanked: 31 times
Have thanks: 64 times
here is a quickbms code I wrote to extract .bdae files from the actors.gla file.

Code:
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.

Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sat Sep 22, 2012 12:42 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
rman2 wrote:
here is a quickbms code I wrote to extract .bdae files from the actors.gla file.

Code:
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

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sat Sep 22, 2012 12:47 pm 
Offline
veteran

Joined: Fri Jun 01, 2012 10:08 am
Posts: 122
Has thanked: 31 times
Have thanks: 64 times
I'll have a look at it but I'm new to this, this is the first thing I've ever written :s


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sat Sep 22, 2012 12:49 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
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

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sun Sep 23, 2012 12:39 am 
Offline
veteran

Joined: Tue Sep 20, 2011 4:33 am
Posts: 126
Has thanked: 137 times
Have thanks: 9 times
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.


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Sun Sep 23, 2012 8:11 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
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

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Wed Oct 24, 2012 2:54 am 
Offline
veteran
User avatar

Joined: Fri Nov 05, 2010 10:14 pm
Posts: 139
Has thanked: 0 time
Have thanks: 51 times
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


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Wed Oct 24, 2012 3:16 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
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?

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Wed Oct 24, 2012 11:50 pm 
Offline
veteran
User avatar

Joined: Fri Nov 05, 2010 10:14 pm
Posts: 139
Has thanked: 0 time
Have thanks: 51 times
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

_________________
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 Tue Dec 04, 2012 6:50 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Thu Oct 25, 2012 3:43 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
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

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Mon Dec 17, 2012 3:45 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 179 times
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

_________________
-> Devblog
->cVision - P2C


Top
 Profile  
 
 Post subject: Re: The Dark Knight Rises .gla
PostPosted: Tue Dec 25, 2012 5:26 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Thu Oct 22, 2009 10:24 am
Posts: 914
Location: Russia, Siberia
Has thanked: 215 times
Have thanks: 102 times
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Anexenaumoon and 3 guests


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group