Quantic Dream Sample Thread

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Quantic Dream Sample Thread

Post by AnonBaiter »

Here's the sample for the PS2 version.
Here's the sample for the Xbox version.

And that's all I was able to gather. There's a PC version of the game available, but I won't get into it just now.
Last edited by AnonBaiter on Thu Jul 14, 2016 2:25 am, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by aluigi »

AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Thanks! Does it work with the .idx files too(Xbox version)?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by aluigi »

The idx wasn't useful
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Oh...
Well I should have another sample coming soon...
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Okay, here are the samples for the PS2 version:
COM_CONT_PS2
DATABANK_PS2
DBANKIDX_PS2

Since I presume there are files inside these files(for example "DATABANK"), I think it's possible to figure it out...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by aluigi »

"data" is ok but it's really just data and not files to extract, you will have thousands of "things".

Code: Select all

idstring "DATABANK"
get VER long
get SIZE long
get FILES long
get DUMMY long  # 1
get INFO_SIZE long
get DUMMY long
for i = 0 < FILES
    get SIZE long
    get DUMMY short
    get DUMMY short
    get ZERO long
    get OFFSET long
    log "" OFFSET SIZE
next i
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Okay so I just got an error:
log "" OFFSET SIZE

Other than that, nothing wrong here(it also works on the Xbox files). I'll give you the PARTITIO/DBRAW files soon.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Sorry for the double post but here they are.
PARTITIO_PS2
DBRAW_XBOX
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by aluigi »

PARTITIO is just a container for VAG audio with frequency and channels at the end ("HEADER__").
I don't know what's the INTERLEAVE value, you have to find it on your own.
This script covers also the other formats:

Code: Select all

set NAME string ""
get FILESIZE asize
for CHUNK_OFFSET = 0 != FILESIZE
    getdstring CHUNK_TYPE 8
    get CHUNK_VER long
    get CHUNK_SIZE long
    savepos CHUNK_OFFSET
    math BASE_OFF = CHUNK_OFFSET
    math CHUNK_OFFSET + CHUNK_SIZE

    if CHUNK_TYPE == "PARTITIO"
        math OFFSET = BASE_OFF
        math OFFSET x 0x800
        math SIZE = CHUNK_OFFSET
        math SIZE - OFFSET

    elif CHUNK_TYPE == "HEADER__"
        get DUMMY long
        get DUMMY long
        get DUMMY byte
        get FREQUENCY long
        get BITS long
        get CHANNELS long
        math INTERLEAVE = 0x12800 # ???
        callfunction DUMP_VAG

    elif CHUNK_TYPE == "DATABANK"
        get FILES long
        get DUMMY long  # 1
        get INFO_SIZE long
        get DUMMY long
        for i = 0 < FILES
            get SIZE long
            get DUMMY short
            get DUMMY short
            get ZERO long
            get OFFSET long
            math OFFSET + BASE_OFF
            log "" OFFSET SIZE
        next i

    elif CHUNK_TYPE == "DBRAW___"
        get FILES long
        get DUMMY long
        get DUMMY long
        get DUMMY long
        savepos BASE_OFF
        xmath BASE_OFF "BASE_OFF + (FILES * (4 + 4))"
        math BASE_OFF x 0x100
        for i = 0 < FILES
            get DUMMY long
            get OFFSET long
            putarray 0 i OFFSET
        next i
            putarray 0 i CHUNK_OFFSET
        for i = 0 < FILES
            getarray OFFSET 0 i
            math i + 1
            getarray SIZE   0 i
            math SIZE - OFFSET
            math OFFSET + BASE_OFF
            log "" OFFSET SIZE
        next
    endif

    goto CHUNK_OFFSET
next

# you must provide the following values: OFFSET SIZE FREQUENCY CHANNELS and INTERLEAVE
startfunction DUMP_VAG
    putvarchr MEMORY_FILE SIZE 0
    log MEMORY_FILE 0 0
    put 0x64685353 long MEMORY_FILE
    put 0x18 long MEMORY_FILE
    put 0x10 long MEMORY_FILE
    put FREQUENCY long MEMORY_FILE
    put CHANNELS long MEMORY_FILE
    put INTERLEAVE long MEMORY_FILE
    put 0 long MEMORY_FILE
    put 0xffffffff long MEMORY_FILE
    put 0x64625353 long MEMORY_FILE
    put SIZE long MEMORY_FILE
    append
    log MEMORY_FILE OFFSET SIZE
    append

    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE
endfunction
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by AnonBaiter »

Oh yeah, I almost forgot:
PARTITIO_XBOX

These ones contain XBOX ADPCM files.
Oh yeah, and about these PS2 ADPCM files I got out of this script, looks like I found out that the cause for the incorrect output of some files it's that it's not because of the interleave, but rather they are actually mono files(000000000000092f.par). I just had to edit the resulting .ss2 file using an hex editor(offset 0x10).

Also you don't need to worry about the little clicks that are plaguing the entire audio file. That's because the audio data seem to have separated segments that are stored between 0x160 length blocks each:

Code: Select all

00024EA0  22 F6 DE EF F2 22 EF EB 47 02 40 12 BE 0E 15 2D  "öÞïò"ïëG.@.¾..-
00024EB0  FF 04 0F 00 E5 FD 21 D4 26 02 FE 0E 0F 01 31 0E  ÿ...åý!Ô&.þ...1.
00024EC0  F0 0F 12 12 FF DD 33 F0 27 02 CC 6D E1 EE EE 0F  ð...ÿÝ3ð'.Ìmáîî.
00024ED0  24 54 CD 70 F3 F2 30 F2 00 00 00 00 00 00 00 00  $TÍpóò0ò........
00024EE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024EF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024F90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FD0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00024FF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00025000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00025010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00025020  00 00 00 00 00 00 00 00 01 00 00 00 00 00 C0 40  ..............À@
00025030  00 00 40 41 00 00 00 00 46 02 22 02 0D F0 0D 01  ..@A....F."..ð..
00025040  00 E1 03 EE CF 30 23 FE 26 02 FF EC 21 3E F1 11  .á.îÏ0#þ&.ÿì!>ñ.
00025050  E1 D0 40 45 21 1F FD 22 46 02 1E F0 20 D0 FF 3D  áÐ@E!.ý"F..ð Ðÿ=

It's also the same for the XBOX .par files, only this time it's about 0x520/0x524 in length:

Code: Select all

00012AB0  65 01 40 83 AA 68 03 A8 20 D9 BB 0A E5 FC 28 00  e.@ƒªh.¨ Ù».åü(.
00012AC0  99 9A 31 F8 AB 91 BF 29 33 00 18 01 65 22 23 53  ™š1ø«‘¿)3...e"#S
00012AD0  13 E9 AC 43 33 33 24 01 42 02 31 04 9A B8 DF 09  .é¬C33$.B.1.š¸ß.
00012AE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012AF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012B90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BD0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012BF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012C90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CD0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012CF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012D90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DD0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012DF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012E90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012EA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012EB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012EC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012ED0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012EE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012EF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F10  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F30  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F50  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012F90  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FA0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FB0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FC0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FD0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FE0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00012FF0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00013000  01 00 00 00 52 13 C0 40 52 13 40 41 00 00 00 00  ....R.À@R.@A....
00013010  8E 10 30 00 C8 AC 20 02 A9 A9 A9 AB 10 88 E1 AD  Ž.0.Ȭ .©©©«.ˆá.
00013020  CC AB C9 BC AA 20 21 01 20 73 45 33 01 31 92 8A  ̫ɼª !. sE3.1’Š

In other words there are a bunch of zeroes ending with extra bytes on them. They can even be separate files altogether.

But leaving that aside, I've uploaded an attachment that's been triggering a few errors. It's from the PS2 version.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Fahrenheit/Indigo Prophecy (PS2/XBOX) - .DAT/.IDM/.D**

Post by aluigi »

Yeah it's a bit chaotic.
The xbox adpcm data starts from 0x810 but it sounds correctly only for few seconds.
Anyway I don't think I can do much more on this, but at least you have a parser :)
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Quantic Dream Sample Thread

Post by AnonBaiter »

Okay so in honor of the upcoming sample for the next Quantic Dream game, I decided to rename the thread to Quantic Dream Sample Thread.

Here are all the samples I've got from Heavy Rain:
https://mega.nz/#F!Zds1QKaI!mpoPFUnV9ADzEaRTdzr7kw
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quantic Dream Sample Thread

Post by aluigi »

There are no references to the archived files in the DEP file while the SDAT one (that probably contains the index) is probably encrypted.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Quantic Dream Sample Thread

Post by AnonBaiter »

Is there any way to even decrypt those SDAT files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quantic Dream Sample Thread

Post by aluigi »

With the full game, personal interest and patience... everything is possible :)
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Quantic Dream Sample Thread

Post by chrrox »

Yes those sdat's can be easily decrypted on pc.
look for TrueAncestor_EDAT_Rebuilder_v1.45b
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Quantic Dream Sample Thread

Post by AnonBaiter »

Thanks chrrox for the solution. It worked on all SDATs and one EDAT(I managed to find the key through an app I had out of my HDD).
Feel free to rename these to .sdat if you wish, although I might have renamed those files to a .sdat container. I don't remember exactly when I did it...
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Quantic Dream Sample Thread

Post by AnonBaiter »

And here are the samples for Beyond Two Souls:
https://mega.nz/#F!ZQ13WTBJ!TG5PqmAhAUFYXgnRAO1Tmw

The SDAT files are all decrypted.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Quantic Dream Sample Thread

Post by AnonBaiter »

Do I have to bump this thread or do I have to edit the script myself? I'm betting for the latter since I might as well do some experiments to see if those decrypted .sdat/.edat files are actually working(the data for these .sdat/.edat index files start at the offset 0x22, and their structure is somewhat different).