READ THE RULES: Click here

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

watch dogs 2 .dat .fat archive?

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1638
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 62 times
Been thanked: 821 times

Re: watch dogs 2 .dat .fat archive?

Post by Ekey » Thu Dec 08, 2016 7:40 pm

Well, i found LZ4. Seems there changed only dec32_table :

Original

Code: Select all

const unsigned dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4};
const int dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3};
UBI

//32 - {0, 3, 2, 3, 0, 0, 0, 0};

Code: Select all

  v46 = 0i64;
  v47 = 3i64;
  v48 = 2i64;
  v49 = 3i64;
  v50 = 0i64;
  v51 = 0i64;
  v52 = 0i64;
  v53 = 0i64;
and

//64 - {0, 0, 0, -1, 0, 1, 2, 3};

Code: Select all

  v54 = 0i64;
  v55 = 0i64;
  v56 = 0i64;
  v57 = -1i64;
  v58 = 0i64;
  v59 = 1i64;
  v60 = 2i64;
  v61 = 3i64;

Sir Kane
veteran
Posts: 98
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 77 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane » Thu Dec 08, 2016 7:47 pm

I already reverse engineered the LZ4 one, just need to get LZMA working.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 8:46 pm

I don't see a single file in the whole 22GBs using lzma. I checked this specifically right now. How can you get it working when there's no files compressed with it?

Sir Kane
veteran
Posts: 98
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 77 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane » Thu Dec 08, 2016 8:51 pm

It's certainly being used.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 8:55 pm

Ekey wrote:Well, i found LZ4. Seems there changed only dec32_table :

//32 - {0, 3, 2, 3, 0, 0, 0, 0};
//64 - {0, 0, 0, -1, 0, 1, 2, 3};
This game only runs on 64 bit. Both these tables are for 64-bit LZ4:

Code: Select all

        readonly sbyte[] m_DecArray = new sbyte[8] { 0, 3, 2, 3, 0, 0, 0, 0 };
        readonly sbyte[] m_Dec2table = new sbyte[8] { 0, 0, 0, -1, 0, 1, 2, 3 };

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 8:57 pm

Sir Kane wrote:It's certainly being used.
Maybe, but NOT on the fat/dat files. Maybe on some savegame data? Anyway, its not needed for unpacking game files.

Sir Kane
veteran
Posts: 98
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 77 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane » Thu Dec 08, 2016 9:04 pm

Some of the data in the .dat files is compressed with the modified LZMA, and the rest is compressed with the modified LZ4.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 9:10 pm

Sir Kane wrote:Some of the data in the .dat files is compressed with the modified LZMA, and the rest is compressed with the modified LZ4.
ok if you say so, tell me at least one filename/offset compressed with lzma.

p.s. i'm talking about watch dogs 2, maybe you're looking into far cry?

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1638
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 62 times
Been thanked: 821 times

Re: watch dogs 2 .dat .fat archive?

Post by Ekey » Thu Dec 08, 2016 9:22 pm

Here one decompressed XML file. One strange thing: in the end of file can be some trash bytes. :constipated:
You do not have the required permissions to view the files attached to this post.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 10:37 pm

ok considering this all, it looks like we either have different versions of the game, or game protection makes some different obfuscation in different regions, or even every copy of the game. So it will be technically impossible to make a tool for this.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 10:53 pm

if Sir Kane wants to prove its not true, I'm still waiting for a .dat file offset where lzma is used.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1920
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 50 times
Been thanked: 1470 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 » Thu Dec 08, 2016 11:07 pm

nothing?

Sir Kane
veteran
Posts: 98
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 77 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane » Fri Dec 09, 2016 4:11 am


mlleemiles
n00b
Posts: 17
Joined: Mon Sep 08, 2014 11:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: watch dogs 2 .dat .fat archive?

Post by mlleemiles » Fri Dec 09, 2016 4:25 am

Sir Kane, may I ask how did you extract the file names from the data?

Sir Kane
veteran
Posts: 98
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 77 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane » Fri Dec 09, 2016 5:05 am

There's a function pointer the game calls with the string to hash if it's non-null, so I just set the function pointer to a function that dumps the passed in string into a file.

Post Reply