Changes

Jump to navigation Jump to search
710 bytes added ,  17:53, 30 March 2019
Added SHeaderFlagsUncrypt and SFileDescFlags
Line 85: Line 85:  
  {
 
  {
 
     uint256 ContentsChecksum;    // Checksum Sha256 of the pack contents starting at next byte
 
     uint256 ContentsChecksum;    // Checksum Sha256 of the pack contents starting at next byte
     uint32 DecryptFlags;       // 0x1 = IsHeaderPrivate, 0x2 = UseDefaultHeaderKey, 0x4 = IsDataPrivate, 0x8 = IsImpostor
+
     struct SHeaderFlagsUncrypt
 +
    {
 +
        uint32 IsHeaderPrivate    : 1;
 +
        uint32 UseDefaultHeaderKey : 1;
 +
        uint32 IsDataPrivate       : 1;
 +
        uint32 IsImpostor         : 1;
 +
        uint32 __Unused__          : 28;
 +
    };
 
     if (version >= 15)
 
     if (version >= 15)
 
         uint32 HeaderMaxSize;    // 0x4000 = Small (16 KB), 0x100000 = Big (1 MB), 0x1000000 = Huge (16 MB)
 
         uint32 HeaderMaxSize;    // 0x4000 = Small (16 KB), 0x100000 = Big (1 MB), 0x1000000 = Huge (16 MB)
Line 145: Line 152:  
         uint32 GbxHeadersStart;  // Offset to the metadata section
 
         uint32 GbxHeadersStart;  // Offset to the metadata section
 
         if version < 15:
 
         if version < 15:
            uint32 DataStart;    // If version >= 15: DataStart = HeaderMaxSize
+
            uint32 DataStart;    // If version >= 15: DataStart = HeaderMaxSize
 
         if version >= 2:
 
         if version >= 2:
 
         {
 
         {
            uint32 GbxHeadersSize;
+
            uint32 GbxHeadersSize;
            uint32 GbxHeadersComprSize;
+
            uint32 GbxHeadersComprSize;
 
         }
 
         }
 
         if version >= 14:
 
         if version >= 14:
            uint128 unused;
+
            uint128 unused;
 
         if version >= 16:
 
         if version >= 16:
            uint32 FileSize;
+
            uint32 FileSize;
 
         if version >= 3:
 
         if version >= 3:
            uint128 unused;
+
            uint128 unused;
 
         if version == 6:
 
         if version == 6:
            SAuthorInfo;
+
            SAuthorInfo;
 
         uint32 Flags;
 
         uint32 Flags;
 
         uint32 NumFolders;
 
         uint32 NumFolders;
 
         FolderDesc Folders[NumFolders]
 
         FolderDesc Folders[NumFolders]
 
         {
 
         {
            int32 FolderIndexParent;
+
            int32 FolderIndexParent;
            string FolderName;
+
            string FolderName;
 
         }
 
         }
 
         uint32 NumFiles;
 
         uint32 NumFiles;
 
         FileDesc Files[NumFiles]
 
         FileDesc Files[NumFiles]
 
         {
 
         {
            int32 FolderIndex;
+
            int32 FolderIndex;
            string FileName;
+
            string FileName;
            uint32 unknown;
+
            uint32 unknown;
            uint32 UncompressedSize;
+
            uint32 UncompressedSize;
            uint32 CompressedSize;
+
            uint32 CompressedSize;
            uint32 Offset;
+
            uint32 Offset;
            uint32 [[Class IDs|classID]];
+
            uint32 [[Class IDs|classID]];
            if version >= 17:
+
            if version >= 17:
              uint32 Size;
+
                uint32 Size;
            if version >= 14:
+
            if version >= 14:
              uint128 Checksum;
+
                uint128 Checksum;
            uint64 Flags;
+
            struct SFileDescFlags
 +
            {
 +
                uint32 IsHashed          : 1;
 +
                uint32 PublishFid        : 1;
 +
                uint32 Compression      : 4;
 +
                uint32 IsSeekable        : 1;
 +
                uint32 _Unknown_        : 1;
 +
                uint32 __Unused1__      : 24;
 +
                uint32 DontUseDummyWrite : 1;
 +
                uint32 OpaqueUserData    : 16;
 +
                uint32 PublicFile        : 1;
 +
                uint32 ForceNoCrypt      : 1;
 +
                uint32 __Unused2__      : 13;
 +
            };
 
         }
 
         }
 
     }
 
     }

Navigation menu