Rise of the Tomb Raider TIGER Files Struct

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Rise of the Tomb Raider TIGER Files Struct

Post by michalss »

Hi Lugi,

please help, trying to figure it our with this format. Some smaller files are ok, but with bigger files i cannot extract all files. For example archive is about 286 MB of size, if i extract all files its only 131 MB, there must be something we missing, also ekey was involved... Please help i was not able to figure it out yet ...:(


Thx to Ekey for struct.. :)

Code: Select all

struct iHeader
{
   uint32_t   dwID; //TAFS
   uint32_t   dwVersion; // Previous is 3 , Current is 4
   uint32_t   dwUnknown1;
   uint32_t   dwTotalFiles;
   uint32_t   dwUnknown2;
   uint8_t    iPlatform[32]; //Platform (xenon-w) or (ps3-w) or (pc-w)
};

//Entry stucture for version 3
struct iEntryV3
{
   uint32_t   dwHash; //Hash of filename
   uint32_t   dwLanguage;
   uint32_t   dwSize;
   uint32_t   dwZSize; //Posible
   uint32_t   dwFlags; //or two uint16_t
   uint32_t   dwOffset;
};

//Entry stucture for version 4
struct iEntryV4
{
   uint32_t   dwHash; //Hash of filename
   uint32_t   dwLanguage;
   uint32_t   dwSize;
   uint32_t   dwZSize; //Posible
   uint32_t   dwOffset;
   uint32_t   dwFlags; //or two uint16_t
};



This specific archive shoud has 14384 files inside. Well i can reach all of them but it is not equal to archive size, not even by the long shot :(

Code: Select all

https://mega.nz/#!Co5kjJCR!SP9FkUNTY3JRmr8nYROPk2HbQ38v892E7gB0iifZbC8
Last edited by michalss on Tue Nov 17, 2015 7:29 pm, edited 2 times in total.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Rise of the Tomb Raider TIGER Files Struct

Post by Ekey »

Because it's contains DRM file pointers to various data blocks within the Bigfile a specific DRM uses. This could be textures, models, sound effects, scripts etc. Main entry info contained only in DRM's with structure

Code: Select all

struct iDRMHeader
{
   uint32_t   dwVersion; //16
   uint32_t   dwStrLength1;
   uint32_t   dwStrLength2;
   uint32_t   dwNull1;
   uint32_t   dwNull2;
   uint32_t   dwNull3;
   uint32_t   dwTotalSections;
   uint32_t   dwLocaleID;
};

struct iDRMEntry
{
   uint32_t   dwUnknown1;
   uint32_t   dwType; // & 0xFF
   uint32_t   dwResourceID; //??
   uint32_t   dwSectionID; //??
   uint32_t   dwLanguageID;
};

struct iDRMSubEntry
{
   uint32_t   dwUnknown1;
   uint32_t   dwNull;
   uint32_t   dwOffset;
   uint32_t   dwFlags; // or two uint16_t
   uint32_t   dwLanguageID;
   uint32_t   dwSize;
   uint32_t   dwUnknown2;
};

struct iCDRMHeader
{
   uint32_t   dwID; //CDRM
   uint32_t   dwNull1;
   uint32_t   dwTotalBlocks;
   uint32_t   dwNull2;
};

struct iCDRMEntry
{
   uint32_t   dwUnknown;
   uint32_t   dwBlockZSize;
};


Resource type's

Code: Select all

0 - Generic Data
1 - Empty Data
2 - Animation
5 - Texture
6 - Sound
7 - DTP Data
8 - Script
9 - Shader
10 - Material
11 - Object
12 - Render Mesh
13 - Collision Mesh
14 - Stream Group List
15 - Trigger Data
Last edited by Ekey on Tue Nov 17, 2015 7:29 pm, edited 1 time in total.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Rise of the Tomb Raider TIGER Files Struct

Post by michalss »

Ekey wrote:Because it's contains DRM file pointers to various data blocks within the Bigfile a specific DRM uses. This could be textures, models, sound effects, scripts etc.


My first impression was that it is only after you extract whole tiger file..
hmm so there is not really way to extract is as usual, all files ? Strange.. Your duper is works only with drm files extracted from archive...
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Rise of the Tomb Raider TIGER Files Struct

Post by Ekey »

michalss wrote:hmm so there is not really way to extract is as usual, all files ?

It's posible but one thing: several different DRM's can have a pointer to the same data block and all extracted blocks are will be with size more than the archive itself.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Rise of the Tomb Raider TIGER Files Struct

Post by michalss »

Ekey wrote:
michalss wrote:hmm so there is not really way to extract is as usual, all files ?

It's posible but one thing: several different DRM's can have a pointer to the same data block and all extracted blocks are will be with size more than the archive itself.


Hmm but how this could be a problem ? This should not be a problem right ? If you can pls extend that structure template ill try to repack it..
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Rise of the Tomb Raider TIGER Files Struct

Post by Ekey »

Rick wrote:Packer will not be possible until the DRM stuff is understood.


Also if we unpack all the data blocks for each DRM eventually we get:

howfie wrote:1.8 million files :D


See old DRM editor for Tomb Raider 2013 > https://github.com/LazyBui/gibbedtr