-
Notifications
You must be signed in to change notification settings - Fork 5
CAT (Estival Versus)
General Purpose Container Format. Byte-Order is Little-Endian.
The Cat File-Format used by Estival Versus differs from the one used by Shinovi Versus.
Each inspected File has four Sub-Headers.
The first Sub-Header starts at the beginning of the File.
Type | Description | Typical Value | Notes |
---|---|---|---|
uint32_t | Unknown Value | 1 | |
uint32_t | Unknown Value | 1 | |
uint32_t | Unknown Value | 0 | |
uint32_t | Length of this Sub-Header | 256 | |
uint32_t | Bytes until this Container Ends | Filesize - 256 | In general: Container-Size - Header-Size |
uint32_t | Unknown Value | 2 | |
uint32_t | Unknown Value | 1 | |
[...] | Padding | 0 | Optional |
The second Sub-Header starts after the first Sub-Header.
Type | Description | Typical Value | Notes |
---|---|---|---|
uint32_t | Unknown Value | 0 | |
uint32_t | Unknown Value | 1 | |
uint32_t | Unknown Value | 2 | |
uint32_t | Length of this Sub-Header | 256 | |
uint32_t | Unknown Value | 0 | |
uint32_t | Length of this Sub-Header | 256 | Again? |
uint32_t | Bytes until this Container Ends | Filesize - 512 | In general: Container-Size - This and previous Header-Size |
[...] | Padding | 0 | Optional |
The third Sub-Header starts after the second Sub-Header.
Type | Description | Typical Value | Notes |
---|---|---|---|
uint32_t | Unknown Value | 1 | |
uint32_t | Unknown Value | 1 | |
uint32_t | Unknown Value | 0 | |
uint32_t | Length of this Sub-Header | 256 | |
uint32_t | Bytes until this Container Ends | Filesize - 768 | In general: Container-Size - This and previous Header-Sizes |
uint32_t | Unknown Value | 0 | |
uint32_t | Unknown Value | 2 | |
[...] | Padding | 0 | Optional |
The fourth Sub-Header starts after the third Sub-Header. This Sub-Header contains Information about the Files within this Container.
Type | Description | Typical Value | Notes |
---|---|---|---|
uint32_t | Unknown Value | 0 | |
uint32_t | Unknown Value | 2 | |
uint32_t | Unknown Value | 0 | |
uint32_t | Length of this Sub-Header | 256 | |
uint32_t | Unknown Value | 0 | |
uint32_t | Length of this Sub-Header | 256 | Again? |
uint32_t | Length of this Sub-Hader and the following Filelisting-Block incl. Padding | ||
uint32_t | Exact Length of the following Filelisting-Block without Padding | ||
uint32_t | Bytes until this Container Ends | Filesize - (+1024) | In general: Container-Size - This and previous Header-Sizes |
[...] | Padding | 0 | Optional |
The Filelisting-Block lists all Filenames within this Container. It starts right after the fourth Sub-Header (In all observed Cases at 0x0400). The Filenames are ASCII-Encoded. A Three-Character Delimiter is used between the Entries, which is also present at the End.
The Delimiter is "0x2C, 0x0D, 0x0A" or Comma, CRLF (newline)
The Filelisting Block may be padded with 0 until the specified End (see Sub-Header #4)
The Fileoffsets-Block lists all Offsets of the Files within this Container. It starts right after the Filelisting-Block and has its own little Header.
Type | Description | Typical Value | Notes |
---|---|---|---|
uint32_t | Length of the Fileoffsets-Block | Including this Mini-Header | |
uint32_t | Count of Offsets | ||
uint32_t | End-Offset | ||
uint32_t[] | Relative Offsets pointing to the Contained Files | The Offsets are relative to the End of this Fileoffsets-Block |
Since there is no explicit Length given for each Entry, each Entry starts at the specified relative offset and ends at the Start of the following. In the Case of the last Entry the End is given by the "End-Offset".
I've already merged this into my local Branch. It works and unpacks any given CAT-File. But since I have almost no time to spare (Master Thesis) the Code is kinda hackish and completely undocumented. Therefore I won't publish it for now.