Page 1 of 1

Dragonica .dat Files

Posted: Sun May 10, 2009 1:26 pm
by Intervene
Fairly new MMO currently in closed beta testing in a number of countries. I'm interested in extracting general game resources (music/sounds, models, textures and other graphic files) from a collection of .dat files the game uses as data archives. Rather than using a single .dat file, there seems to be a .dat file used for each aspect of the game engine (one for UI data, one for character data, one for Map data etc). The game is produced by Barunson Interactive (couldn't find any other titles they have produced).

File segment from 1_Cha.dat (1024k): http://files.filefront.com/1+Chadatrar/ ... einfo.html

Any help would be greatly appreciated. Let me know if there is any info I've left out.

Cheers.

Re: Dragonica .dat Files

Posted: Mon May 11, 2009 2:32 am
by Rick
Encrypted index, followed by zlib compressed file data.

Code: Select all

byte[4] unk1;
byte[4] unk2;
int encryptionDataSize; // 0x3F
byte[encryptionDataSize] encryptionData;
byte[4] unk3; // could be file count
int indexTableSize;
byte[indexTableSize] encryptedIndexTable;
(followed by zlib compressed blobs)
I havn't worked out the encryption yet though.

Re: Dragonica .dat Files

Posted: Mon May 11, 2009 1:48 pm
by Intervene
Thanks for the fast response.

There are a few questions I'd like to ask regarding how you went about extracting the information that you did. I have next to no knowledge or programming and very limited knowledge of hex editing, so the concept of reverse engineering the encryption on a file is well and truly out of my league. From what I understand (please correct me if I have this wrong) the game client decrypts each data file before using the zlib compression library to decompress the data files so they can be used by the game? Assuming the encryption can be cracked, what is needed to emulate the the way the game handles extracting data from the files?

Regarding the information you presented in the code box, is there a particular program you used that gives that information, or is that derived from using a hex editor?

Thanks again.

Re: Dragonica .dat Files

Posted: Tue May 12, 2009 1:38 am
by chrrox
Here is an exe scan of this game.

Code: Select all

- open file "G:\Program Files\IAHGames\Dragonica\Release\Dragonica.exe"
- 14811136 bytes allocated
- load signatures
- open file C:\signsrch\signsrch.sig
- 1294834 bytes allocated for the signatures
- 1869 signatures in the database
- WARNING:
  the file loaded in memory is very big so the scanning could take many time
- start signatures scanning:

  offset   num  description [bits.endian.size]
  --------------------------------------------
  00cdb998 31   Adler CRC32 (0x191b3141) [32.le.1024]
  00cdc998 32   Adler CRC32 (0x191b3141) [32.be.1024]
  00cdbd98 33   Adler CRC32 (0x01c26a37) [32.le.1024]
  00cdcd98 34   Adler CRC32 (0x01c26a37) [32.be.1024]
  00cdc198 35   Adler CRC32 (0xb8bc6765) [32.le.1024]
  00cdd198 36   Adler CRC32 (0xb8bc6765) [32.be.1024]
  00cdb598 83   CRC-32-IEEE 802.3 poly 0x04C11DB7 [32.le rev.1024]
  00cdc598 84   CRC-32-IEEE 802.3 poly 0x04C11DB7 [32.be rev.1024]
  00cda848 357  Zlib dist_code [..512]
  00cdaa48 358  Zlib length_code [..256]
  00cdab48 359  Zlib base_length [32.le.116]
  00cdabc0 361  Zlib base_dist [32.le.120]
  00cc4b08 383  Jpeg dct 14 bit aanscales [16.le.128]
  00cc4b88 387  Jpeg dct AA&N scale factor [double.le.64]
  00cdd890 556  __popcount_tab (compression?) [..256]
  00cdab48 1085 Rar29 LDecode [32.le.112]
  00cb5108 1244 rfc3548 Base 64 Encoding with URL and Filename Safe Alphabet [..62]
  00cb5108 1253 B64EncodeTable [..64]
  00cc55f8 1539 zinflate_lengthStarts [32.le.116]
  00cc5678 1541 zinflate_lengthExtraBits [32.le.116]
  00cc5675 1542 zinflate_lengthExtraBits [32.be.116]
  00cc5718 1543 zinflate_distanceStarts [32.le.120]
  00cc5790 1545 zinflate_distanceExtraBits [32.le.120]
  0017a0f1 1783 anti-debug: Dongle protection [..3]
  00e0dcd6 1784 anti-debug: IsDebuggerPresent [..17]

- 25 signatures found in the file

Re: Dragonica .dat Files

Posted: Wed May 13, 2009 11:33 pm
by Rick
Homebrew encryption, encrypted blocks can have various options that turn on and off encryption stages. Archives can have toggles on data for whether the data is encrypted, and compressed. Some .dats in Data have encryption off on some of the data in them. Archive index table is always encrypted.

Re: Dragonica .dat Files

Posted: Thu May 28, 2009 12:11 pm
by hself
Hi,
First, sorry for my very bad grammar, i'm french.

I'm interresting in the encryption of .DAT files from Dragonica to extract items, textures, characters, etc. I actually use Dependency Walker ( http://www.dependencywalker.com/ ) to find some functions in the DLLs. But it is very hard and hasardous :/
I want to create a DataBase to recence Dragonica items in a website. So if you have made avancements can you notify me here?

EDIT : or if you can give clues about how to start in the right way, thanks :)

Re: Dragonica .dat Files

Posted: Sat May 30, 2009 2:37 am
by xprince
I need dragonica dat file exractor too
some1 make 1 plsss

Re: Dragonica .dat Files

Posted: Mon Jun 01, 2009 7:05 pm
by pixellegolas
i need a lamborghini because i love speed, buy me one

Re: Dragonica .dat Files

Posted: Mon Jun 01, 2009 9:10 pm
by AceAngel
In otherwords, @xprince, don't 'simply' ask for something out of the blue...

Re: Dragonica .dat Files

Posted: Fri Jul 30, 2010 5:33 pm
by Slozhny
No one progress?

Re: Dragonica .dat Files

Posted: Tue Aug 17, 2010 2:52 pm
by Rwd
Slozhny wrote:I've already extract dragonica .dat with "offzip" tool, and became many-many-many smallsize .dat files.
Then, I rename all to .nif, and open with "nifscope". But not all files is .nif, some have another format.
Now it all.
thanks a lot! It really works!
Some words about "another formats". It could be:
.kf
.kfm
.dds
.lua
.gif
.tga
and even .xml

I have "offzipped" 5_effect.dat to edit the visual effects and make them easier to display on poor machines. But it's very difficult to find .nif file, containing a visual effect of a skill. So, please, if you find such .nif, post it's offset here.