GabryTheSniper Posted November 1 Share Posted November 1 (edited) While digging through the game files, i came across these files: GxArchivedFile001.dat , GxArchivedFile051.dat . Is these a way to decompile them with a script? Here's the sample if you want to take a look: https://drive.google.com/file/d/1fKPt0HOZa0qsfX9x1Wqh22OuauA5hG8V/view?usp=sharing Edited November 2 by GabryTheSniper Link to comment Share on other sites More sharing options...
Engineer h3x3r Posted November 2 Engineer Share Posted November 2 //------------------------------------------------ //--- 010 Editor v10.0.2 Binary Template // // File: OrochiDAT.bt // Authors: SeleDreams // Version: 0.2 // Purpose: Analyzing Silicon Studio's Orochi / Mizuchi Engine data archiving format // Category: Archive // File Mask: GxArchivedFile???.dat // ID Bytes: 47 44 41 54 // History: // 0.2 2020-05-08 SeleDreams: Implemented a feature allowing to see the file formats // 0.1 2020-05-06 SeleDreams: Initial Release //------------------------------------------------ typedef struct{ uint Offset; uint Length; } GDATFileDef; typedef struct { char MAGIC[4]; int FileCount; GDATFileDef File_Definitions[FileCount]; } GDATHeader; typedef struct{ char MAGIC[4]; byte Data[File.Header.File_Definitions[i].Length - 4]; } GDATFile<read=DisplayFileType>; /** * - This structure is an array containing all the files in the order of their definition. * - I've added it this way to avoid a mess where all the files are listed at the root of the inspector. **/ typedef struct{ local int i = 0; for (i = 0; i < File.Header.FileCount; i++){ Printf("Added %d files to the array...\n",i+1); FSeek(File.Header.File_Definitions[i].Offset); GDATFile file; } } GDATFiles; typedef struct { GDATHeader Header; GDATFiles Files; } GDAT <read=DisplayFileCount>; string DisplayFileCount(GDAT &input){ string s; SPrintf(s,"%d Files",input.Header.FileCount); return s; } string DisplayFileType(GDATFile &input){ string s; local char reversed[4]; local int i; for (i = 3; i > -1; i--) { reversed[3-i] = input.MAGIC[i]; } if (reversed[1] == '\0'){ SPrintf(s,"Unknown File"); } else{ SPrintf(s,"%s File",reversed); } return s; } GDAT File; Printf("%d Files were found in this GDAT file\n", File.Header.FileCount); Link to comment Share on other sites More sharing options...
GabryTheSniper Posted November 2 Author Share Posted November 2 (edited) 2 hours ago, h3x3r said: //------------------------------------------------ //--- 010 Editor v10.0.2 Binary Template // // File: OrochiDAT.bt // Authors: SeleDreams // Version: 0.2 // Purpose: Analyzing Silicon Studio's Orochi / Mizuchi Engine data archiving format // Category: Archive // File Mask: GxArchivedFile???.dat // ID Bytes: 47 44 41 54 // History: // 0.2 2020-05-08 SeleDreams: Implemented a feature allowing to see the file formats // 0.1 2020-05-06 SeleDreams: Initial Release //------------------------------------------------ typedef struct{ uint Offset; uint Length; } GDATFileDef; typedef struct { char MAGIC[4]; int FileCount; GDATFileDef File_Definitions[FileCount]; } GDATHeader; typedef struct{ char MAGIC[4]; byte Data[File.Header.File_Definitions[i].Length - 4]; } GDATFile<read=DisplayFileType>; /** * - This structure is an array containing all the files in the order of their definition. * - I've added it this way to avoid a mess where all the files are listed at the root of the inspector. **/ typedef struct{ local int i = 0; for (i = 0; i < File.Header.FileCount; i++){ Printf("Added %d files to the array...\n",i+1); FSeek(File.Header.File_Definitions[i].Offset); GDATFile file; } } GDATFiles; typedef struct { GDATHeader Header; GDATFiles Files; } GDAT <read=DisplayFileCount>; string DisplayFileCount(GDAT &input){ string s; SPrintf(s,"%d Files",input.Header.FileCount); return s; } string DisplayFileType(GDATFile &input){ string s; local char reversed[4]; local int i; for (i = 3; i > -1; i--) { reversed[3-i] = input.MAGIC[i]; } if (reversed[1] == '\0'){ SPrintf(s,"Unknown File"); } else{ SPrintf(s,"%s File",reversed); } return s; } GDAT File; Printf("%d Files were found in this GDAT file\n", File.Header.FileCount); Do i have to use 010 Editor to run it? Edited November 2 by GabryTheSniper Link to comment Share on other sites More sharing options...
Engineer Solution h3x3r Posted November 2 Engineer Solution Share Posted November 2 (edited) Yes, but you can also rewrite it to the bms form. Well he we go. But not sure how to reverse extension order for example "xet" > "tex" so extensions will be in reversed order. Nothing cardial... Also no file names either. I bind offset as a file name. ############################################ # Death end re:Quest 2 *.DAT files # ############################################ get BaseFileName basename idstring "GDAT" get Files uint32 for i = 0 < Files get Offset uint32 get RawSize uint32 savepos EndTable goto Offset savepos ExtOffset get ExtCheck byte if ExtCheck == 0 getdstring Extension 0x3 else goto ExtOffset getdstring Extension 0x4 endif getdstring Dummy 0x7C endian big getdstring CompressionSign 0x4 get Size uint32 get ZSize uint32 get Unknown uint32 endian little savepos Offset string Name p "%s/%u.%s" BaseFileName Offset Extension clog Name Offset ZSize Size goto EndTable next i Edited November 3 by h3x3r 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now