A Crypted Object is a Metin2 internal file format used to crypt and compress raw file informations. It is currently used used for the following files: Item Proto, Mob Proto, EterPack Index and EterPack Content with type 2 and 6. A kaitai structure file for reading this formats is available here :
meta: id: m2cryptedobject endian: le seq: - id: header type: header - id: magic_verification type: u4 if: header.crypted_size == 0 enum: cryptedmagic - id: crypted_magic_verification type: u4 if: header.crypted_size != 0 - id: crypted_content size: header.crypted_size if: header.crypted_size > 0 - id: compressed_content size: header.compressed_size if: header.crypted_size == 0 types: header: seq: - id: magic type: u4 enum: cryptedmagic - id: crypted_size type: u4 - id: compressed_size type: u4 - id: real_size type: u4 enums: cryptedmagic: 1347633997: mcsp 1515144013: mcoz
The format contains a 20 bytes header followed by the content (either crypted or compressed) of the data.
Header
Bytes colored in red (first 4 bytes): A FourCC code that identify the type of object. Bytes colored in blue: Size of the data after being crypted Bytes colored in green: Size of the data after being compressed Bytes colored in yellow: Size of the data without any cryptation or compression (real data size) Bytes colored in black: Crypted FourCC code, used to verify if the XTEA decryptation was successfull or not.
NOTE: If the Crypted object is not crypted, the bytes in black will contains the FourCC.
Data compression
The data is compressed by one of the following algorithm based from the FourCC code. A list of known compression algorithms is provided below.
FourCC Code | Algorithm |
---|---|
MCOZ | LZO 1x |
MCSP | Snappy |
Data cryptation
NOTE: If the blue bytes are 00 00 00 00 it means that the data is not crypted, therefore the game will not attempt to decrypt the content.
The data is crypted with the XTEA algorithm, therefore all the data requires some keys in order to function correctly, a list of known keys is provided down below:
Used in | Key (16 bytes) |
---|---|
Item Proto | A1 A4 02 00 AA 15 54 04 E7 8B 5A 18 AB D6 AA 01 |
Mob Proto | 46 74 49 00 0B 4A 00 00 B7 6E 08 00 9D 18 68 00 |
EterPack Index | B9 9E B0 02 6F 69 81 05 63 98 9B 28 79 18 1A 00 |
EterPack Content | 22 B8 B4 04 64 B2 6E 1F AE EA 18 00 A6 F6 FB 1C |
Report Doc