FastFiles and Zone files (BO3)

From COD Engine Research
Jump to: navigation, search

Treyarch has made significant changes to the structure of the fastfile on Black Ops III. The most notable difference seems to be the zone header, which is now located in the main fastfile header.

FastFile Structure

enum DB_Type
{
    DB_TYPE_SERVER = 0x0000,
    DB_TYPE_CLIENT = 0x0100
};
 
enum DB_Platform
{
    DB_PLATFORM_WIN32 = 0x0,   // PC
    DB_PLATFORM_DURANGO = 0x1, // Xbox One
    DB_PLATFORM_ORBIS = 0x2,   // PlayStation 4
};
 
struct DB_Header
{
    char magic[8];
    int version;
    DB_Type type;
    DB_Platform platform;
    bool encrypted;
    unsigned __int64 unk0;
    int unk1;
    int checksum[4];
    char buildNumber[100];
};
 
enum 
{
    XFILE_BLOCK_TEMP = 0,
    XFILE_BLOCK_RUNTIME_VIRTUAL = 1,
    XFILE_BLOCK_RUNTIME_PHYSICAL = 2,
    XFILE_BLOCK_DELAY_VIRTUAL = 3,
    XFILE_BLOCK_DELAY_PHYSICAL = 4,
    XFILE_BLOCK_VIRTUAL = 5,
    XFILE_BLOCK_PHYSICAL = 6,
    XFILE_BLOCK_STREAMER_RESERVE = 7,
    XFILE_BLOCK_STREAMER = 8,
    XFILE_BLOCK_MEMMAPPED = 9,
    MAX_XFILE_COUNT
};
 
struct XFile
{
    unsigned __int64 size;
    char padding[16]; // seems to be padding
    unsigned __int64 blockSize[MAX_XFILE_COUNT];
};
 
struct DB_AuthSignature
{
    char bytes[256];
};
 
struct DB_AuthHeader
{
    char fastfileName[64];
    DB_AuthSignature signedSubheaderHash;
    char reserved[16]; // empty 16 bytes
};