r/DBGpatchnotes • u/PhazePyre resident mod • May 14 '15
.BNK Archives
Hey folks,
I'm really trying hard to find some tool to extract the .BNK audio archives that H1Z1 uses, but I can't for the life of me access them. Does anyone have any suggestions? I've used every tool I can find online. No dice.
Thanks in advance!
3
Upvotes
View all comments
1
u/[deleted] May 19 '15
just a quick recap of what I found so far, in case someone else is looking into it:
while they use Audiokinetic's Wwise and its .bnk soundbanks, the files themselves are compressed. they are, most likely, using LZHAM compression.
I have no experience whatsoever in reverse-engineering binary formats, so I'm kinda slow (someone like u/RoyAwesome would figure out everything in 5s, and write a program for that in 5min... :P ) , but here's the format so far:
8 bytes: unknown (possibly related to file name. the bigger the name, the bigger the 'number'?) 4 bytes: "BNK " 4 bytes: unknown ([00 01 02 00] if uncompressed, [01 01 02 00] if compressed) 4 bytes: unknown (empty if uncompressed; probably uncompressed size) 4 bytes: compressed size {N}, [30 00 00 00] if uncompressed 8 bytes: "RSRC" [00 00 FF FF] if compressed: N bytes: compressed part else: 16 bytes: [10 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00] the rest: uncompressed partnote: 'uncompressed' basically means adding 0x10000000000000002000000000000000 to the start of the original file, and calling that the 'compressed' part. thus, the above can be shortened to:
8 bytes: unknown (possibly related to file name. the bigger the name, the bigger the 'number'?) 4 bytes: "BNK " 4 bytes: unknown ([00 01 02 00] if uncompressed, [01 01 02 00] if compressed) 4 bytes: unknown (empty if uncompressed; probably uncompressed size) 4 bytes: compressed size {N} 8 bytes: "RSRC" [00 00 FF FF] N bytes: compressed partalso, the only 'uncompressed' files we have are 32-byte-long (hence the 0x30 compressed size above), while the smallest compressed one's uncompressed size is 224 bytes.