Important information: this site is currently scheduled to go offline indefinitely by end of the year.

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: 1823
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 92 times
Been thanked: 1058 times

Re: watch dogs 2 .dat .fat archive?

Post by Ekey »

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: 104
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 96 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane »

I already reverse engineered the LZ4 one, just need to get LZMA working.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

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: 104
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 96 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane »

It's certainly being used.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

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: 104
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 96 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane »

Some of the data in the .dat files is compressed with the modified LZMA, and the rest is compressed with the modified LZ4.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

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: 1823
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 92 times
Been thanked: 1058 times

Re: watch dogs 2 .dat .fat archive?

Post by Ekey »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

if Sir Kane wants to prove its not true, I'm still waiting for a .dat file offset where lzma is used.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: watch dogs 2 .dat .fat archive?

Post by daemon1 »

nothing?
Sir Kane
veteran
Posts: 104
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 96 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane »

mlleemiles
beginner
Posts: 21
Joined: Mon Sep 08, 2014 11:20 am
Has thanked: 9 times
Been thanked: 2 times

Re: watch dogs 2 .dat .fat archive?

Post by mlleemiles »

Sir Kane, may I ask how did you extract the file names from the data?
Sir Kane
veteran
Posts: 104
Joined: Mon Aug 06, 2012 4:14 am
Been thanked: 96 times

Re: watch dogs 2 .dat .fat archive?

Post by Sir Kane »

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