- /*
- ----------------------------------------------------------------------------------------------------
- Kingdoms of Amalur: Reckoning - BIG File Format
- Research Paper by atom0s [atom0s@live.com]
- Version: 1.0.0
- ----------------------------------------------------------------------------------------------------
- Please note - this file type is stored in a binary stream format.
- You cannot directly cast to the below structures, they are just in structures for ease of reading.
- Some entries are not valid for certain things, such as specific versions of the file!
- Please read the notes carefully!
- This data is based on the following game executable:
- Reckoning.exe - Steam Version - v1.0.0.2 (1.0.0.1)
- - CRC32 : DC256122
- - MD5 : 9863F5D6754DAC28CBB96808015E2089
- - SHA1 : 91CC28B28AE6E4926A89DF5EAD8DB2B7D974AE46
- */
- /*
- ----------------------------------------------------------------------------------------------------
- File Header
- ----------------------------------------------------------------------------------------------------
- */
- /**
- * Signature
- * The BIG file signature. Expected value: 0xC2C8C780
- * This value also determines the endianness of the file depending on how its stored.
- *
- * Version
- * The BIG file version. Expected value: 0x10 or 0x11
- * This value determines the tool version the file was made with.
- * The game will error on the file if this is not 0x10 or 0x11.
- *
- * Unknown0000
- * Unknown value.
- * The game will error on the file if this is equal to 0x00.
- *
- * BuildStringLength
- * BuildString
- * The BIG build too version string length and string.
- * The build length determines the size of the BuildString buffer size.
- * Warning: String IS NOT null terminated!
- *
- * Unknown0001
- * Unknown value.
- * This value is only read if the header version is 0x10 or greater.
- * The game does not seem to use this value currently.
- *
- * FileCount
- * The count of files stored within the BIG file.
- * The game will error on the file if this is greater than 0x10000.
- *
- *--------------------------------------------------------------------------------------------------
- * Related Functions
- *--------------------------------------------------------------------------------------------------
- * sub_A21010 - Function used to read BIG files.
- * sub_A292B0 - Function used to read data from the file.
- * sub_401BA0 - Function used to read a string from the file.
- *--------------------------------------------------------------------------------------------------
- */
- struct BIGFileHeader
- {
- uint32_t Signature;
- uint32_t Version;
- uint8_t Unknown0000;
- uint32_t BuildStringLength;
- uint8_t BuildString[];
- uint32_t Unknown0001;
- uint32_t FileCount;
- };
- /*
- ----------------------------------------------------------------------------------------------------
- File Entry
- ----------------------------------------------------------------------------------------------------
- */
- /**
- * UncompressedSize
- * The uncompressed file size.
- *
- * CompressedSize
- * The compressed file size.
- *
- * Offset
- * The offset to where the file data starts.
- *
- * NameHash
- * The hash of the file name.
- *
- * Id
- * Unknown, does not look to be an id, but instead a file type.
- */
- struct BIGFileEntry
- {
- uint32_t UncompressedSize;
- uint32_t CompressedSize;
- uint32_t Offset;
- uint32_t NameHash;
- uint32_t Id;
- };
- /*
- ----------------------------------------------------------------------------------------------------
- File Name String Table
- ----------------------------------------------------------------------------------------------------
- The first entry in a BIG file is the string table holding the file names. This table is generally
- not compressed and is, from what I've seen, always the first file entry.
- To locate the file entry that is this string table, first dump all the file entries then find the
- one that has the name hash value of 0xFFFFFFFF. Once found, you can use that entries Offset to go
- to the string table data entry.
- */
- /**
- * StringCount1
- * The count of strings within the string table.
- *
- * StringCount2
- * The count of strings within the string table. (Repeat)
- *
- * Unknown0000
- * Unknown value. Should always equal 0xFFFF.
- *
- * Unknown0001
- * Unknown value. Should always equal 0x00.
- *
- * StringLength
- * String
- * String entries that are read like the build string. The length is first, then the string.
- * This is an array of strings equal to the StringCount1 value.
- * Warning: String IS NOT null terminated!
- */
- struct BIGFileNameStringTable
- {
- uint32_t StringCount1;
- uint32_t StringCount2;
- uint16_t Unknown0000;
- uint8_t Unknown0001;
- uint32_t StringLength;
- uint8_t String[];
- };
- /*
- ----------------------------------------------------------------------------------------------------
- File Data
- ----------------------------------------------------------------------------------------------------
- Other than the file name string table, every other file is read in the same manner.
- Files can either be in their raw format, or compressed using a simple Zlib stream.
- If a file entry is not compressed, than the BIGFileEntry 'UncompressedSize' and
- 'CompressedSize' will match. In this case, you can then just go to the files Offset
- and dump the UncompressedSize of data for the files data.
- If the 'UncompressedSize' and 'CompressedSize' do not match, this means the file is
- compressed using a Zlib stream.
- Compressed files are stored in blocks. The blocks are formatted as in the below struct.
- Warning: Because the data offers an output file offset, this means that blocks can be stored
- out of order as a means to attempt to prevent reversing or similar. It is important to write
- the data out in the proper order so that the output file is not corrupted.
- Blocks are not required to be compressed either. For example, a file can have 4 blocks of data,
- of those 4 blocks, 1 could be uncompressed and the other 3 are compressed. To check for this,
- simply compare the BlockUncompressedSize to BlockCompressedSize. If they are equal, the data is
- not compressed, otherwise it is.
- */
- /**
- * BlockSize
- * The size of the current block of data.
- *
- * BlockOffset
- * The offset in the output file of where this block is stored.
- * (Blocks can be stored out of order because of this!)
- *
- * BlockUncompressedSize
- * The uncompressed size of the current block.
- *
- * BlockCompressedSize
- * The compressed size of the current block.
- */
- struct CompressedDataBlock
- {
- uint32_t BlockSize;
- uint32_t BlockOffset;
- uint32_t BlockUncompressedSize;
- uint32_t BlockCompressedSize;
- };
Moving To Discord: https://discord.gg/UmXNvjq
Hello everyone, due to bugs with the forum software that I do not have time to care about, I am going to be shutting down these forums and moving my discussions to Discord instead. I will eventually keep releases here on the site but the forums will be removed sooner or later. I encourage people to join my personal Discord if you have questions, if you are looking for any of my projects, etc.
Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).
Hello everyone, due to bugs with the forum software that I do not have time to care about, I am going to be shutting down these forums and moving my discussions to Discord instead. I will eventually keep releases here on the site but the forums will be removed sooner or later. I encourage people to join my personal Discord if you have questions, if you are looking for any of my projects, etc.
Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).
KoA: Reckoning - BIG File Format
- atom0s
- Site Admin
- Posts: 450
- Joined: Sun Jan 04, 2015 11:23 pm
- Location: 127.0.0.1
- Contact:
KoA: Reckoning - BIG File Format
Derp~
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Need a great web host? Check out: AnHonestHost.com
Donations can be made via Paypal:
https://www.paypal.me/atom0s
Who is online
Users browsing this forum: No registered users and 1 guest