Xaymar / Hellextractor

A simple tool to extract things from Helldivers 2 for your 3D printing needs.
BSD 3-Clause "New" or "Revised" License
32 stars 5 forks source link

[Feature]: Auto decrypt wwise_bank headers #25

Open nblockbuster opened 6 months ago

nblockbuster commented 6 months ago

Describe the Feature

Removes the need for people to manually enter a xorpad.bin for tools like wwiser. Bank headers (BKHD chunks) are "encrypted" from 0x8-0x10 with this key: ACBC1192387010A3 that is xor'd with the data in the bank to get the proper info for tools to work on them. Example: Init.bnk (9ba626afa44a3aa3: content/audio/Init.bnk) Before: 20BC11921B4AD6F3 After: 8C000000233AC650

Xaymar commented 6 months ago

Hrm, this might be difficult with the way it's implemented right now. I map the used files directly into memory, so it's effectively using the most optimal I/O possible. Converting a section might require an in-memory copy of the are that is encrypted.

Not to mention that this might be outside of the scope of reverse engineering for scientific purposes, which is the only legal way for me to publicly develop this.

Xaymar commented 6 months ago

I think I can add a flag/option to provide a key, but I can't include it directly.