ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Oct 18, 2017 9:21 am

All times are UTC




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Fri Dec 23, 2016 1:35 pm 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
Greetings,can anyone take a look at these files?
I tried rename .dat to .zip but it didn't help.. (previously this method worked fine)
Samples here:
https://mega.nz/#!XhgimD5L!pYeCW1Pcy5yg ... uOSSRLQkAY
Thanks.


Top
   
PostPosted: Wed Dec 28, 2016 10:03 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6869
Try the following:
download the zip2.bms script http://aluigi.org/bms/zip2.bms
open it with a text editor and replace the 3 occurrencies of the "idstring" command with a simple: get DUMMY long
Now use the edited script on the these dat archives.


Top
   
PostPosted: Thu Dec 29, 2016 8:34 pm 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
Thanks for the help luigi.I tried your script and changed "idstring" to "get DUMMY long"
but i got this error while trying to extract some dat files,can you fix it?
Image
Thanks in advance!
P.S I can upload all game .Dat's if this can help :)


Top
   
PostPosted: Thu Dec 29, 2016 10:55 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6869
I meant the whole idstring line :D
Instead of idstring "PK..." you must have just get DUMMY long


Top
   
PostPosted: Fri Dec 30, 2016 9:10 am 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
Did i do something wrong?
Image

Code:
# ZIP files (alternative way) 0.1
#   get end of directory and parses central directory
# script for QuickBMS http://quickbms.aluigi.org

goto -0x16
idstring get DUMMY long
        get disk_num        short
        get disk_start      short
        get central_entries short
        get central_entries short
        get central_size    long
        get central_offset  long
        get comm_len        short
        getdstring comment  comm_len

for i = 0 < central_entries
    goto central_offset
    idstring get DUMMY long
        get ver_made        short
        get ver_need        short
        get flag            short
        get method          short
        get modtime         short
        get moddate         short
        get crc             long
        get comp_size       long
        get uncomp_size     long
        get name_len        short
        get extra_len       short
        get comm_len        short
        get disknum         short
        get int_attr        short
        get ext_attr        long
        get rel_offset      long
        getdstring name     name_len
        getdstring extra    extra_len
        getdstring comment  comm_len
    savepos central_offset

    goto rel_offset
    idstring get DUMMY long
        get ver             short
        get flag            short
        get method          short
        get modtime         short
        get moddate         short
        get crc             long
        get comp_size       long
        get uncomp_size     long
        get name_len        short
        get extra_len       short
        getdstring name     name_len
        getdstring extra    extra_len
        savepos offset

        if method == 0
            Log name offset uncomp_size
        else
            if method == 8
                ComType deflate
            elif method == 1
                ComType unshrink
            elif method == 6
                ComType explode
            elif method == 9
                ComType deflate64
            elif method == 12
                ComType bzip2
            elif method == 14
                ComType lzmaefs
            elif method == 13
                ComType XMemDecompress
            elif method == 21
                ComType XMemDecompress
            elif method == 64
                ComType darksector
            elif method == 98
                ComType ppmd
            elif method == 99
                print "this script doesn't support AES encryption"
                cleanexit
            else
                print "unsupported compression method %method%"
                cleanexit
            endif
            CLog name offset comp_size uncomp_size
        endif
next i


P.S Sorry for my noobness :)


Top
   
PostPosted: Fri Dec 30, 2016 3:28 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6869
from:
Code:
idstring get DUMMY long

to:
Code:
get DUMMY long


Top
   
PostPosted: Fri Dec 30, 2016 7:33 pm 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
Thanks a lot! now everything works nice :D
Edit: Oh..looks like it doesn't work good with some .dat files
Image
But anyways here a more Dat samples,i hope they will help you:
https://mega.nz/#!OpJywBYT!Ka3xFFkkZks2 ... F4W8YKPhb0
Thanks.


Top
   
PostPosted: Mon Jan 02, 2017 2:44 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6869
Because not all the files are ZIP archives ("RN" 0x07 0x09 and "QM" 0x06 0x08).
For example:
- file000000.dat is just a sequence of random bytes (maybe encrypted)
- file000079.dat is a PNG image with the first 4 bytes modified (0x8a "RQK"), set them to 0x89 "PNG" to view these files
- file000092.dat is a model I guess with the usual first 4 bytes modified ("GYV" 0x0f)

That's all, there are no other formats.


Top
   
PostPosted: Fri Apr 07, 2017 8:37 am 

Joined: Mon Oct 24, 2016 3:23 am
Posts: 14
Anyone have any luck with the .bdae files in this. It's my most requested game to set up and rig 3d models from, I'd appreciate it mucho. The character .bdae can be opened as zip files as well, containing an endian .bdae and a script inside. Past that I'm stuck. My nearest understanding is this game was built right on the Minion Rush engine. However it seems to use all sorts of filetypes so it's tough to say if they're the same as that game. I can upload some examples if need be. I've opened up all the dats and dug out everything else thanks to whats here.


Top
   
PostPosted: Sat Jul 08, 2017 2:57 pm 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
In newest game update .dat files structure was changed,and now almost every .dat file starts with RN header.
So,how i can unpack them? modifed script doesn't work
Samples in case if anyone wanna help:
https://mega.nz/#!ewZkVIab!ETxnrJnLavUM ... TY67NrXSjI

Thanks in advance!


Last edited by Doprond on Sat Jul 15, 2017 3:28 pm, edited 1 time in total.

Top
   
PostPosted: Sat Jul 15, 2017 12:26 pm 

Joined: Fri Jun 02, 2017 2:15 pm
Posts: 11
The format (at least for the few I looked at) is as follows...

Code:
+--------------------------------------+
| Spider-Man Unlimited (Android) *.dat |
+--------------------------------------+

// ALMOST a PKZIP file, with different headers - so very similar!
// The header is "RN" for the first file, and "QL" for all other files

// FILE DATA
  // for each file
    2 - Header ("RN" for the first file, "QL" for all other files)
    4 - Unknown
    4 - null
    8 - Checksum?
    4 - Compressed File Size
    4 - Decompressed File Size
    4 - Filename Length
    X - Filename
    X - File Data
 
// DIRECTORY
  // for each file
    4 - Unknown
    2 - Unknown (20)
    2 - Unknown (10)
    4 - null
    8 - Checksum?
    4 - Compressed File Size
    4 - Decompressed File Size
    4 - Filename Length
    6 - null
    4 - Unknown
    4 - File Offset
    X - Filename
 
// ARCHIVE FOOTER
  4 - Unknown
  4 - null
  2 - Number of Files
  2 - Number of Files
  4 - Directory Length
  4 - Directory Offset
  2 - null


I'm assuming that the Compressed and Decompressed lengths are in the order above, the same as in a ZIP file.

It looks like this archive doesn't use compression, but if they want to compress any files, they actually ZIP the individual file into a normal ZIP structure, then stick that whole file in the DAT archive? For example, look at File0003.dat - the first file is a TGA image, however the file data itself starts with a "PK" ZIP header instead of actual image data, so they "zipped" up the TGA image and then stuck it in this DAT archive. The DAT archive doesn't know that it's a zipped file though - ie the DecompLength and CompLength are the same, so you'll have to read the "PK" header to know if it's actually compressed or not.

Anyone care to do a BMS for this?


Top
   
PostPosted: Sat Jul 15, 2017 3:33 pm 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
I tried to take a look at file003.dat file,and i found what it have more than 1 PK entries,how i can split these entries to separate files?
Btw,is there any chance for the script? can you to do that?


Top
   
PostPosted: Sat Jul 15, 2017 5:09 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 333
here is a bms script i whipped up that works with most :D
Code:
for i = 0
    get CHECK long
    if CHECK == 0x07050701
        break
    elif CHECK == 0x02014b50
        break
    endif
    goto 0xe 0 SEEK_CUR
    get ZSIZE long
    get SIZE long
    get NAME_SIZE long
    getdstring NAME NAME_SIZE
    savepos OFFSET
    get CHECK2 byte
    if CHECK2 == 0x34
        string NAME - tga
        string NAME + pvr
    endif
    if ZSIZE < SIZE
        comtype deflate //?
        clog NAME OFFSET ZSIZE SIZE
    else
        log NAME OFFSET ZSIZE
    endif
    math OFFSET + ZSIZE
    goto OFFSET
next i

these samples are giving problems currently, may have to adjust the script a bit :)
File0004.dat - png file?
File0010.dat - contains some zlib compressed data
File0023.dat - contains some zlib compressed data
may need to use first 2 bytes as ID to distinguish the compression types

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Sun Jul 16, 2017 11:25 am 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
More dat samples,i hope they can help.
First 100
https://mega.nz/#!jlAW1arL!GAxXW2LfYfrZ ... 4Sed_N6dJ4
101 to 200
https://mega.nz/#!nsIWyYZb!cfWcqj73bwQN ... RlpYSCFSYc
Last 98
https://mega.nz/#!y5Qj1K4B!eZvncLlFWlhr ... yLQ1FGnyQU

Thanks!


Top
   
PostPosted: Tue Sep 26, 2017 4:59 am 

Joined: Tue Mar 15, 2016 3:38 pm
Posts: 67
Any progress?


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

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited