CFC.DIG extraction script

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Taylor17387
Posts: 9
Joined: Tue Aug 15, 2017 2:49 pm

CFC.DIG extraction script

Post by Taylor17387 »

I'm trying to unpack a CFC.DIG file using this script:

Code: Select all

# CFC.DIG
# script for QuickBMS http://quickbms.aluigi.org

get INFO_LIMIT asize
for i = 0
    savepos TMP
    if TMP u>= INFO_LIMIT
        break
    endif

    get OFFSET long
    get SIZE long
    get CHANS short
    get TYPE short
    get FREQ long
    math OFFSET * 0x800

    if SIZE != 0
        if i == 0
            math INFO_LIMIT = OFFSET
        endif

        string NAME p "%d/%08x_%d_%d.raw" TYPE i FREQ CHANS
        log NAME OFFSET SIZE
        math i + 1
    endif
next


However, I'm not sure if it's a generic script for all .DIG files or if it was written for a specific game. Upon extraction I get a folder with audio files in .raw and the IECS header (I believe this folder is right, but it's just 42 MB of the 352 MB of the whole file). But then the second folder has lots of unidentified .raw files without header. This game stores all data inside this CFC.DIG, except cutscenes and voiceover audio which are in separate files. So I expected to extract files for textures, 3D models and dialogue, and not just audio.
I don't know if the script was simply written for a different game or if those .raw files are really the only thing that can be extracted.

This is the file I'm trying to extract:
https://drive.google.com/open?id=0B8-7F ... mNUcWdhcEk

It's from the PS2 game Kami o Tsugu Shoujo (SLPM_660.73). The first game of this series also stored all data in a .DIG file, only that it was called CDDATA.DIG.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CFC.DIG extraction script

Post by aluigi »

That script works perfectly.
It was created to extract the audio data from a Naruto game in this topic: viewtopic.php?t=2675
Take a look there if you can find more info but that's just audio data and nothing else.
Taylor17387
Posts: 9
Joined: Tue Aug 15, 2017 2:49 pm

Re: CFC.DIG extraction script

Post by Taylor17387 »

Then it's only audio? But there are no more files inside the .iso, only the movies, voice audio, SLPM_660.73 .elf file, and .IRX modules. By elimination, everything else should be inside the .DIG file.
Now I know that some Square-Enix games have hidden files that can't be extracted from iso. For example, Final Fantasy X is around 4 GB, while the extracted contents are just 5 MB, but I doubt this is the case here. Opening the .iso in a hex editor doesn't reveal any more files, and the extracted contents are 2 GB, which is the size of the original iso.
Could the textures, etc. be inside SLPM_660.73? Is that even possible?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CFC.DIG extraction script

Post by aluigi »

There are two folders extracted:
0: contains the ICESsreV files (search on Google)
1: I don't know what files are them, they start with 00 05

What I can say for sure is that the extraction is complete so what you have there is the whole content of cfc.dig
Taylor17387
Posts: 9
Joined: Tue Aug 15, 2017 2:49 pm

Re: CFC.DIG extraction script

Post by Taylor17387 »

Ok, thanks. I suppose those .raw files are then the textures and everything else. Too bad they don't seem decipherable.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CFC.DIG extraction script

Post by aluigi »

The files in the folder 1 are 100% compressed (imho), the decompressed size is the FREQ field while I don't know what's the meaning of the CHANS one (1, 4, 32 and so on... maybe chunks?).
Anyway I don't know what's the compression algorithm so nothing to do with these files.
Taylor17387
Posts: 9
Joined: Tue Aug 15, 2017 2:49 pm

Re: CFC.DIG extraction script

Post by Taylor17387 »

I see. Well at least that's knowing something... At first I thought the CHANS numbers referred to the type of file.
Could I use the "QuickBMS comtype scanner 2" on these .raw files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CFC.DIG extraction script

Post by aluigi »

I already did it.
Taylor17387
Posts: 9
Joined: Tue Aug 15, 2017 2:49 pm

Re: CFC.DIG extraction script

Post by Taylor17387 »

Then I guess I've reached a dead end :(
Thanks anyway for all the help.