MOGG File Format
Revision as of 08:58, 19 February 2022 by InvoxiPlayGames (talk | contribs) (Created page with "MOGG files are often used in Harmonix games for all platforms except for PS2 and DS. They are an extension of the [https://xiph.org/vorbis/ OGG Vorbis] container with an extra header prepending it, and almost all official MOGGs shipped on-disk and as DLC are encrypted. The version value in the MOGG header is used to indicate which encryption key and format should be used for decryption. ==Structure== ===MOGG Header=== {| class="wikitable" !Name !Type !Size !Function...")
MOGG files are often used in Harmonix games for all platforms except for PS2 and DS. They are an extension of the OGG Vorbis container with an extra header prepending it, and almost all official MOGGs shipped on-disk and as DLC are encrypted.
The version value in the MOGG header is used to indicate which encryption key and format should be used for decryption.
Structure
MOGG Header
Name | Type | Size | Function |
---|---|---|---|
Version | Integer (LE) | 4 bytes | Version of the MOGG file. Related to encryption (10 / 0xA = unencrypted) |
Header Size | Integer (LE) | 4 bytes | Length of the MOGG header / offset in the file where the OGG begins. |
Map Version | Integer (LE) | 4 bytes | Version of the MOGG map. (usually 16 / 0x10) |
Buffer Size | Integer (LE) | 4 bytes | Usually 20000 / 0x4E20. (TODO: what purpose?) |
Entry Count | Integer (LE) | 4 bytes | The number of entries in the MOGG header. |
Entries | #MOGG Entry Array | sizeof(MOGG Entry) * Entry Count | Presumably a table to help the game stream the OGG file from disk. |
AES Key | Byte Array | 16 bytes | An obfuscated key used to encrypt the file. Only present if MOGG version is >= 11 / 0xB. |
MOGG Entry
TODO: is this correct?
Entry | Type | Size | Function |
---|---|---|---|
Byte Offset | Integer (LE) | 4 bytes | Offset into the file that the entry starts. |
Sample | Integer (LE) | 4 bytes | The sample in the OGG stream that corresponds to the byte offset. |
Tools
Several tools are available for working with MOGG files (creation/extraction, encryption, etc)