### Extended record plaintext header Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md The starting structure for extended records, which use either 32-bit or 64-bit offsets. ```text Extended records start with plaintext: { uint32 offset, uint32 size } or { uint64 offset, uint32 size } ``` -------------------------------- ### Fix CronosPro encoding issues on Windows Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Use this registry command to resolve encoding issues on non-Russian Windows installations by mapping code pages to c_1251.nls. ```batch reg set HKLM\System\CurrentControlSet\Control\Nls\Codepage 1250=c_1251.nls 1252=c_1251.nls ``` -------------------------------- ### TAD file format for version 01.03 or later Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Structure of the .tad file for database versions 01.03 and later. ```c uint32_t offset uint32_t size // with flag in upper bit, 0 -> large record uint32_t checksum // but sometimes just 0x00000000, 0x00000001 or 0x00000002 uint32_t unknownn // mostly 0 ``` -------------------------------- ### Inspect database metadata with strudump Source: https://github.com/alephdata/cronodump/blob/master/README.md Use the strudump subcommand to extract metadata from a database. The -a option outputs ASCII instead of a hexdump. ```bash bin/crodump strudump -v -a test_data/all_field_types/ ``` -------------------------------- ### 64-bit offset structure for .tad files Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Structure used for versions 01.03, 01.05, and 01.11, consisting of a 64-bit offset, 32-bit size, and 32-bit checksum. ```text uint64 offset uint32 size // with flag in upper bit, 0 -> large record uint32 checksum // but sometimes just 0x00000000, 0x00000001 or 0x00000002 ``` -------------------------------- ### Dictionary Entry Structure Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md The initial entry in the database structure defines a dictionary of keys and their associated data. ```text uint8 array { Name keyname uint32 index_or_size; // size when bit31 is set. uint8 data[size] } ``` -------------------------------- ### Derive KOD sbox using --strucrack Source: https://github.com/alephdata/cronodump/blob/master/README.md Derive the modified KOD-sbox from a CroStru.dat file using the --strucrack option. ```bash crodump --strucrack recdump ``` -------------------------------- ### TAD file format for version 01.01 Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Structure of the .tad file for CroFile version 01.01, assuming 12-byte packed reference blocks. ```c uint32 offset1 uint16 size1 uint32 offset2 uint16 size2 ``` -------------------------------- ### Derive KOD sbox using --dbcrack Source: https://github.com/alephdata/cronodump/blob/master/README.md Derive the KOD sbox by inspecting the fourth byte of each record using the --dbcrack option, suitable for compressed Bank and Index files. ```bash crodump --dbcrack recdump ``` -------------------------------- ### 32-bit offset structure for .tad files Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Structure used for versions 01.02 and 01.04, consisting of a 32-bit offset, size, and checksum. ```text uint32 offset uint32 size // with flag in upper bit, 0 -> large record uint32 checksum // but sometimes just 0x00000000, 0x00000001 or 0x00000002 ``` -------------------------------- ### CroStru decoding and encoding logic Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Mathematical formulas for decoding and encoding CroStru data using the S-box and a shift value. ```text decode: b[i] = KOD[a[i]] - (i+shift) encode: a[i] = INV[b[i] + (i+shift)] ``` -------------------------------- ### Perform a high-level record dump Source: https://github.com/alephdata/cronodump/blob/master/README.md Use the recdump subcommand to print a hexdump of all records for all tables. ```bash bin/crodump recdump test_data/all_field_types/ ``` -------------------------------- ### Cronos .dat file header structure Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md The binary header format for .dat files, consisting of a 19-byte structure including magic bytes, version, encoding, and blocksize. ```c char magic[8] // allways: 'CroFile\x00' uint16 unknown char version[5] // 01.XX see, below uint16 encoding // bitfield: bit0 = KOD, bit1 = ? uint16 blocksize // 0x0040, 0x0200 or 0x0400 ``` -------------------------------- ### CroStru S-box definition Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md The 256-byte S-box array used for rotating bytes in CroStru metadata blocks. ```c unsigned char kod[256] = { 0x08, 0x63, 0x81, 0x38, 0xa3, 0x6b, 0x82, 0xa6, 0x18, 0x0d, 0xac, 0xd5, 0xfe, 0xbe, 0x15, 0xf6, 0xa5, 0x36, 0x76, 0xe2, 0x2d, 0x41, 0xb5, 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0xaf, 0xec, 0xc9, 0xdb, 0x6d, 0x3b, 0x26, 0x75, 0x3d, 0xbd, 0xb2, 0x4a, 0x5d, 0x6c, 0x72, 0x40, 0x7e, 0xab, 0x59, 0x52, 0x54, 0x9c, 0xd2, 0xe9, 0xef, 0xdd, 0x37, 0x1e, 0x8f, 0xcb, 0x8a, 0x90, 0xfc, 0x84, 0xe5, 0xf9, 0x14, 0x19, 0xdf, 0x6e, 0x23, 0xc4, 0x66, 0xeb, 0xcc, 0x22, 0x1c, 0x5c, }; ``` -------------------------------- ### Table Definition Structure Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Defines the layout of a table, including metadata, field definitions, and extra data strings. ```text uint16 unk1 union { uint8 shortversion; // 1 uint16 version; // >1 } uint8 somelen; // 5 or 9 struct { uint8 unk3 uint32 unk4 // not there when 'somelen'==5 uint32 unk5 } uint32 tableid Name tablename Name abbreviation uint32 unk7 uint32 nrfields array { uint16 entrysize -- total nr of bytes in this entry. uint16 fieldtype // see below uint32 fieldindex1 // presentation index (i.e. where in the UI it shows) Name fieldname uint32 flags uint8 alwaysone // maybe the 'minvalue' uint32 fieldindex2 // serialization index (i.e. where in the record in the .dat it appears) uint32 fieldsize // max fieldsize uint32 unk4 ... followed by remaining unknown bytes } fields[nrfields] uint32 extradatstr // amount of unknown length indexed data strings between field definition blocks array { uint16 datalen uint8[datalen] } datastrings[extradatstr] uint32 unk8 uint8 fielddefblock // always 2, probably the number of this block of field definitions uint32 unk9 uint32 nrextrafields array { ... as above } extrafields[nrextrafields] followed by remaining unknown bytes ... ``` -------------------------------- ### Perform a low-level database dump Source: https://github.com/alephdata/cronodump/blob/master/README.md Use the crodump subcommand for a low-level dump of database contents. The -v option includes unused byte ranges, which is useful for identifying deleted records. ```bash bin/crodump crodump -v test_data/all_field_types/ ``` -------------------------------- ### Compressed record format structure Source: https://github.com/alephdata/cronodump/blob/master/docs/cronos-research.md Defines the binary layout of compressed records, including chunk size, header bytes, CRC32 checksum, compressed data, and the trailing sequence. ```text multiple-chunks { uint16 size; // stored in bigendian format. uint8 head[2] = { 8, 0 } uint32 crc32 uint8 compdata[size-6] } uint8 tail[3] = { 0, 0, 2 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.