Shrek Forever After .PCK/.BNK

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Shrek Forever After .PCK/.BNK

Post by lorenzo »

does anyone know a script that can extract .pck and .bnk sound containers ? thanks
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Shrek Forever After .PCK/.BNK

Post by id-daemon »

These are standard WWISE banks and PCKs. Moreover, sounds here are uncompressed PCM.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

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

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Huh, I didn't realize there was a script of yours that could extract .BNK files already. Maybe I overlooked that one all along...

EDIT: So, I just tested your Wwise .BNK script and it is a lot more stable than, say, Alpha23's Wwise .BNK script. However, the output filenames, when extracted with your script, they are named by hexadecimal/decimal/binary filenames rather than the fuzzy numbers(example: 137243) which is common in projects that use the Wwise middleware.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

at the time of extraction it shows dat instead of wav is normal?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

^ That's quite a common occurrence within the quickBMS scripts because if the file container isn't defined by the string it will just go with that container. Another example is where it tries to find file containers for that file by going at these strings.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

any way to get the names of extracted WAV files?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Shrek Forever After .PCK/.BNK

Post by id-daemon »

Only if they are present in other game files. And even in this case it will be difficult.
brendan19
Posts: 144
Joined: Fri Aug 08, 2014 11:25 am

Re: Shrek Forever After .PCK/.BNK

Post by brendan19 »

Use Ravioli Game Tools to extract Wwise .BNK/PCK archives as they keep the original Wwise hash ID filenames.

To get the original names of the WAV files, there might be an .XML file with a full directory listing of all the audio assets matching the Wwise ID to a WAV file.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

how do I find this XML file?
brendan19
Posts: 144
Joined: Fri Aug 08, 2014 11:25 am

Re: Shrek Forever After .PCK/.BNK

Post by brendan19 »

The file is usually called SoundBanksInfo.xml
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

aluigi you can upgrade these two scripts for me to get the real names of wav files from pck and bnk files? thank you
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

^ I agree with this. Give it a try out of figuring out the filenames sometime, aluigi.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

If the filenames are available in the archive, probably, but if the scripts extract nameless files it means that there are no filenames.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Well, I'm pretty sure the filenames are scattered around somewhere... I think.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

Well, prove it and show where and how the strings are located and referenced.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Let me check my samples first to see if I deleted something!
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Okay, here's some "proof"(ignore the error):

Code: Select all

- current_folder: E:\quickbms
- bms_folder:     E:\quickbms_scripts
- exe_folder:     E:\quickbms
- file_folder:    E:\DmC_Devil_may_Cry_JPN_XBOX360-Caravan\cvn-dmcj\DevilGame\CookedXbox360\Main_Xenon
- output_folder:  E:\quickbms
- temp_folder:    C:\Users\TCA\AppData\Local\Temp\
- open input file E:\DmC_Devil_may_Cry_JPN_XBOX360-Caravan\cvn-dmcj\DevilGame\CookedXbox360\Main_Xenon\01bde0fe.bnk
- open script E:\quickbms_scripts\wwise_bnk.bms
- set output folder .

  offset   filesize   filename
--------------------------------------
. 00000000 idstr              "BKHD" 4
    42 4b 48 44                                       BKHD
. 00000004 get     SIZE_HEADER 0x000007ac 4
. 00000008 get     FSIZE      0x002fe3fb -2
. 000007b4 idstr              "DIDX" 4
    44 49 44 58                                       DIDX
. 000007b8 get     SIZE_DIDX  0x0000003c 4
. 000007bc get     BNAME      "01bde0fe" -1001
. 000007bc get     DIDX       0x30594ccb 4
. 000007c0 get     OFFSET     0x00000000 4
. 000007c4 get     SIZE       0x00076000 4
. 00076000 putvarc            0x00000000 1
.
. 00000000 get     MSIZE      0x00076000 -2
. 00000000 get     TEST       0x00000052 1
.
. 00000002
. 00000001 get     TEST       0x00000049 1
.
. 00000003
. 00000002 get     TEST       0x00000046 1
.
. 00000004
. 00000003 get     TEST       0x00000058 1
.
. 00000005
. 00000000 getdstr TYPE       "RIFX" 4
    52 49 46 58                                       RIFX
.
. 00000008 getdstr TYPE       "WAVEfmt " 8
    57 41 56 45 66 6d 74 20                           WAVEfmt
. 00000014 get     CODEC      0x00000166 2
  00000800 483328     811158731 (01bde0fe).xma
.
. 00000002
. 000007c8 get     DIDX       0x862b0c29 4
. 000007cc get     OFFSET     0x00600700 4
. 000007d0 get     SIZE       0x48170100 4
. 48170100 putvarc            0x00000000 1

Error: incomplete input file 0: E:\DmC_Devil_may_Cry_JPN_XBOX360-Caravan\cvn-dmcj\DevilGame\CookedXbox360\Main_Xenon\01bde0fe.bnk
       Can't read 1209467136 bytes from offset 00600f00.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0    15%   483368     3138555

Last script line before the error or that produced the error:
  32  elif TYPE == "<?xm"
And here's the script used for debugging. It requires the func_getTYPE.bms script though.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

A proof of what?
The BKHD archives have no filename strings stored in them, what you have there is just a 32bit number that has been assigned as name and not the original filename.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Okay, let me get this straight:
The .bnk files don't have their original filenames; rather, they have 32-bit numbers that have been assigned as names.
In any case, what do you think about implementing these 32-bit numbers as output filenames into your script? Like this:

Code: Select all

811158731.wav