Can anybody help me on this?
Thanks.
Archive Samples
Here's what I've figured out.
The only thing missing is how the entries on table1 are linked to nameTable.
Note : Not all names on nameTable are entry names.
Code: Select all
//HEADER
uint8_t magic[4];
uint32_t dummy;
uint32_t dummy;
uint32_t headerSize;
uint32_t dataSectionSize; //??
uint32_t tbl1Offset;
uint32_t dummy;
uint32_t tbl2Offset; // + headerSize
uint32_t tbl1Offset;
uint32_t tbl1Size; // + some other info
uint32_t dummy;
uint32_t dummy;
uint32_t dummy;
uint32_t numTypes;
for (int i = 0;i < numTypes;i++)
{
uint8_t type[4];
uint32_t typeCode; //??
}
//Align position to 32
uint32_t dummy;
uint32_t namesOffset; //SEEK_CUR
uint32_t dummy;
uint32_t dummy;
/*************************************************/
//Table 1
uint32_t numRecs;
uint32_t dummy; //Always 4
for (int i = 0;i < numTypes;i++)
{
uint8_t type[4];
uint32_t fileOffset; // + headerSize
uint32_t size;
uint32_t unk; //always 32 alignment???
uint32_t unk;
uint32_t unk;
}
/*************************************************/
//Table 2
uint32_t numRecs;
uint32_t dummy; //Always 4
for (int i = 0;i < numTypes;i++)
{
uint32_t nameOffset; //SEEK_CUR
uint8_t type[4];
int32 fileOffset //negative offset (go backward)
}