i can, but i don't think you can understand how to do it.
things you need:
- SDkey
- SDiv
- PRNGseed key
- some C / C++ knowledge
i explain it with Homebrew Channel as content.bin:
- first you need to read the first 1600 Byte of content.bin and decrypt it with SDkey+SDiv, for decrypting use Openssl, aes_cbc_decrypt
- then read the decrypted data, you will find on offset 0x08 a 4 Byte unsigned long, in big endian format, this is the size of icon.bin (it should be 0x0000330C = 13068)
- so now read a buffer of it from 0x640 to 0x394B, decrypt it and you get the icon.bin, now you need the offset to Pre-TMD Header and TMD File
the calculation is simple: Pre-TMD Header is 1600 + 13068 mod 64 = 14720 = 0x3980
Pre-TMD Header and TMD file are NOT encrypted.
first 4 byte are the size of this header (0x00000070 = 112 mod 64 = 128), in this header you can find the size of TMD, but you don't need it, you must read the TMD, so get the size there.
so TMD is at 0x3A00 and has the size of 556 Byte (mod 64 = 576)
read the tmd to know where the contents are and how big they are, you will also need the index, to calculate index_iv
the first content (0x0000) is at offset 0x3C40 and has a size of 638384 Byte (mod 64 = 638400)
the second content (0x0001) is at offset 0x9FA00 and has a size of 760000 Byte (mod 64 = 760000)
the index_iv = xxxx & 0x0000000000000000000000000000, xxxx = index, so for the first content, the index_iv is "0x00000000000000000000000000000000"
so to decrypt it, you need the PRNGseed, as key, the rest is the same as any wad.
after decrypting you get the same files, (except of the *.tik) as if you unpacked a wad.
to re-encrypt it, you do exact the same, backwards with aes_cbc_encrypt.....
this is a fast written, maybe not fully correct tutorial to unpack content.bin files.
for those who don't know what mod 64 is, it's modulo, and a align of 64 Byte,
calculation sample:
13068 mod 64 = 13068 / 64 = 204,1875 = 204 + 1 = 205 *64 = 13120