XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Thu Dec 13, 2018 10:25 am

All times are UTC + 1 hour

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Gameloft ZIP Unscrambler
PostPosted: Tue May 20, 2014 10:48 pm 
User avatar

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

It seems some newer Gameloft games, such as N.O.V.A. 3, use scrambled ZIP files instead of the traditional CustomPak. It took me forever banging my head against the CustomPak reader until I realized that it was probably not a CustomPak. Somehow it also escaped my attention until today that all files of this type starts with "SB". Well, anyway, here's a program to descramble the files. Have fun with it. Source code is included, as always. I haven't written my DRM wrapper yet, so I guess iOS app hacking noobs will be all over this soon.

Download at the blog: blog/?p=1177

Format notes
It's basically a ZIP file, but with different signatures and encrypted file headers. Instead of "PK\x03\x04" for each file header, you've got "SB" followed by a short of the header length. Not sure why they did it that way, but that's how it works. Oddly enough, the compressed data is not encrypted, so just copy that verbatim. Near the end you'll find the central ZIP directory, which starts with "SDIR", and goes on until the end of the file. Note this directory is a single block instead of the many repeating blocks you find in a normal .zip file. Everything after the "SDIR" is encrypted, so to get this block back just write "PK\x01\x02" to your output and dump the decrypted block to it. No need to differentiate between a central directory entry and the end-of-central-directory block. Regarding the encryption, it's just scrolling XOR, with the file name being the key.

Version History
[ 2014-05-20]
  • 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

 Post subject: Re: Gameloft ZIP Unscrambler
PostPosted: Wed May 21, 2014 1:40 am 
User avatar

Joined: Fri Apr 27, 2012 9:37 am
Posts: 430
Has thanked: 29 times
Have thanks: 180 times
Zing zing zing haha i knew it was xor ill take a look at the binary in IDA seems interesting once again good work man
yeah you're right lol


-> Devblog
->cVision - P2C

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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