Shrek Forever After .PCK/.BNK

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

From:

Code: Select all

    log "" OFFSET SIZE
To:

Code: Select all

    string NAME p "%d.wav" DUMMY
    log NAME OFFSET SIZE
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Yeah, more like that. Exactly as I envisioned it.
I'll just test this later when I get into my PC. Been typing this into my cellphone as of now.

P.S.: Auto-correcto sucks ass.
Last edited by AnonBaiter on Wed Aug 10, 2016 4:58 am, edited 1 time in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Well, I did test the edited script on the .bnk file and that method proved to be much better than the dull 'log ""' extracting output.
However, that's just the .bnk files. Does anyone feel that there's something missing?
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

aluigi and the actual names of wav files from pck files? some help?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Shrek Forever After .PCK/.BNK

Post by id-daemon »

I must add that these numbers are actually hashes of wwise audio event names. Wwise can't work without them, so usually if you find audio event names, something like "shrek_hits_wall_by_his_head", you can calculate its hash and find the audio file in BNK or PCK file. These names will usually be in other game files, like I said. And I'm not talking about SoundBanksInfo.xml, these names can be in actual game files, like maps, levels, scripts etc.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

aluigi how then do to get the names of the .wav file pck file? example 0000038c.wav to shrek_hits_wall_by_his_head.wav is just one example
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After .PCK/.BNK

Post by aluigi »

A quick technical explanation: when an archive doesn't contain the original filenames, it means it uses name hashes (you can call them also CRC and checksum, same stuff). Basically a 32 or 64bit number representing a sort of signature of the name instead of the name itself.
In these situations, if filenames are really necessary, a solution is building a list of ALL the original filenames and then calculating the hash and checking it with the one of each file entry in the archive. That's what the NameCRC command of quickbms does.
What's the problem of this solution? Obviously the problem is building, collecting or generating the list of original filenames, and in less part also finding the algorithm used to calculate the hash (my crc scanner may help in this step).
Back to your question, if someone (*NOT ME*) has desire and abilities to build the list of names then there are some chances of assigning the names to the files.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Shrek Forever After .PCK/.BNK

Post by id-daemon »

if someone (*NOT ME*) has desire and abilities to build the list of names, i can tell that wwise always use the same hash, and it is standard FNV1
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

Honestly, I'd rather have 32-bit/64-bit numbers as output filenames instead of the actual names.
However, if someone has desire and abilities to build the list of names then I'll do it. Just give me the files necessary for the task.

Meanwhile, here's the modified armyoftwo.bms script. I've kept the header description untouched.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

AnonBaiter some help from you? I really want to get the real names of the output wav files from pck file is that I know not build a list of names and speaking on the subject which is the necessary files for this task ? I have on my computer only shrek_akpk.bms script and streaming_eng.pck file and quickbms if you can help I would be grateful thanks for attention

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

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

"and speaking on the subject which is the necessary files for this task ?"
The file in which the names are stored, of course.
Oh yeah, I want to ask a question for more experienced people here: how can I calculate the hash?
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

?
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

some help from aluigi?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

It's like you didn't even understand what aluigi or id-daemon has even said.

Let's just get to the point: you choose me to help you, but I'll ask something in return. In that case, it's you who should be helping me.
Go grab a hex editor program(mine is HxD),look through the files and see if you find any evidence of the names. The hash situation comes later.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

you are wrong it seems that you do not know what I said that you have to help me and I do not now and I still comes from that you should be helping me your boring hahahahahahahahaha and not ever repeat what you said listening? each of which appears to m
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

What do I mean is that we should help each other, but then I might be contradicting myself here.
I don't have the game so I need to know what are these files, what do they contain, etc.
If nothing else then I might obtain the game by myself. So let me start with this question: which version of the game(PC, PS3, XBOX360, Wii, DS, iOS) do these files came from?

Oh yeah, and you cut off your own sentence before you could finish it. Take your time to actually read and see if you didn't miss anything before clicking on "Submit".
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After .PCK/.BNK

Post by lorenzo »

yes i have the game shrek forever after pc as you know streaming_eng.pck file contains all wav files used in the game then answer me a good answer
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Shrek Forever After .PCK/.BNK

Post by AnonBaiter »

It's decided then. I'll go get the game, but I won't make any promises.
But for now I'll just grab the sample.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Shrek Forever After .PCK/.BNK

Post by id-daemon »

AnonBaiter wrote:how can I calculate the hash?


its in wikipedia: FNV hash