Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Unreal IoStore

From ReverseEngineering.wiki
Format
Versions TOC version 1-10 (Initial ... ContainerEncryptionMethod)
Magic 2D 3D 3D 2D 2D 3D 3D 2D 2D 3D 3D 2D 2D 3D 3D 2D ("-==--==--==--==-")
Extensions .utoc, .ucas
Endianness little endian
On this wiki Facts · Code · Notes · Topics

Container pair of Unreal Engine 4.26 and later (pakchunkN.utoc + .ucas, global.utoc): the .utoc table of contents starts with the 16 ASCII bytes -==--==--==--==- and a 144-byte header, lists chunk ids, offsets and compressed blocks; the .ucas holds the compressed, optionally AES-encrypted blocks.

Overview

IoStore (Zen loader) replaces the per-file pak index with chunk ids. A container is name.utoc (table of contents) plus name.ucas (data); partitions of large containers are name_s1.ucas, name_s2.ucas and so on. Games often still ship a small .pak next to them. global.utoc holds the script objects and (4.26) the global name map used to resolve imports.

TOC header (144 bytes)

From CUE4Parse UE4/IO/Objects/FIoStoreTocHeader.cs:

Offset Field
0x00 magic, 16 bytes -==--==--==--==-
0x10 version (byte), reserved byte, reserved uint16
0x14 TocHeaderSize (uint32)
0x18 TocEntryCount
0x1C TocCompressedBlockEntryCount
0x20 TocCompressedBlockEntrySize (12 for current files)
0x24 CompressionMethodNameCount
0x28 CompressionMethodNameLength (32)
0x2C CompressionBlockSize (typically 0x10000)
0x30 DirectoryIndexSize
0x34 PartitionCount
0x38 ContainerId (uint64)
0x40 EncryptionKeyGuid (16 bytes)
0x50 ContainerFlags (byte), EncryptionMethod (byte, newest versions), reserved uint16
0x54 TocChunkPerfectHashSeedsCount
0x58 PartitionSize (uint64)
0x60 TocChunksWithoutPerfectHashCount
0x64 reserved (uint32), then reserved uint64 x 5 up to 0x90

ContainerFlags: 1 Compressed, 2 Encrypted, 4 Signed, 8 Indexed (has a directory index with file names), 0x10 OnDemand. TOC versions: 1 Initial, 2 DirectoryIndex, 3 PartitionSize, 4 PerfectHash, 5 PerfectHashWithOverflow, 6 OnDemandMetaData, 7 RemovedOnDemandMetaData, 8 ReplaceIoChunkHashWithIoHash, 9 AddedSourceHashes, 10 ContainerEncryptionMethod.

Body, in file order after the header

Resolved from CUE4Parse FIoStoreTocResource.cs lines 82-212 (see Fact:Unreal IoStore/behavior/TOC body order). In file order after the 144-byte header:

  1. chunk ids, TocEntryCount x 12 bytes (Fact:Unreal IoStore/struct/FIoChunkId layout);
  2. chunk offset and length, TocEntryCount x 10 bytes, two 5-byte big-endian numbers (Fact:Unreal IoStore/struct/offset and length and block entry);
  3. perfect hash seeds (int32 each, TOC version 4+) and, from version 5, int32 indices of chunks without a perfect hash;
  4. compressed block entries, TocCompressedBlockEntryCount x 12 bytes (40-bit offset, 24-bit compressed size, 24-bit uncompressed size, 8-bit method index);
  5. encryption IVs (only TOC version 10 with AES-CTR);
  6. compression method names, count x 32 bytes (method index 0 means none, n means name n-1);
  7. signatures (only flag Signed): int32 hash size, TOC signature, block signature, then one SHA-1 per block;
  8. directory index, DirectoryIndexSize bytes (flag Indexed, version 2+);
  9. chunk metas, one per chunk: 20-byte hash, flags byte (1 Compressed, 2 MemoryMapped), and from version 8 three padding bytes.

A chunk's offset and length address the container's uncompressed stream: divide the offset by CompressionBlockSize (header, typically 0x10000) to get the first block entry, read those blocks from the .ucas (decrypt then decompress each), and cut the range. Several games alter this layout (CUE4Parse has per-game branches at the lines above), so a parse failure on a custom game is not proof of a different version. The global.utoc container has the same structure; in UE5 its ScriptObjects chunk (type 5) lists native script objects that packages import.

Unverified: the layout of the directory index buffer (names and tree) was not read this time; look in CUE4Parse UE4/IO/Objects.

Chunk types

UE 4.26/4.27: 1 InstallManifest, 2 ExportBundleData, 3 BulkData, 4 OptionalBulkData, 5 MemoryMappedBulkData, 6 LoaderGlobalMeta, 7 LoaderInitialLoadMeta, 8 LoaderGlobalNames, 9 LoaderGlobalNameHashes, 10 ContainerHeader. UE5: 1 ExportBundleData, 2 BulkData, 3 OptionalBulkData, 4 MemoryMappedBulkData, 5 ScriptObjects, 6 ContainerHeader, 7 ExternalFile, 8 ShaderCodeLibrary, 9 ShaderCode, 10 PackageStoreEntry, 11 DerivedData, 12 EditorDerivedData, 13 PackageResource (FIoChunkId.cs). Package data is chunk type ExportBundleData with chunk index 0; the container header chunk lists the packages and their imports.

Packages inside are in the Zen format, not the classic uasset layout: see Format:Unreal package (uasset). Encryption is AES-256 per block when the Encrypted flag is set; the key GUID names the key.

Chunk id layout and the exact enum values: Fact:Unreal IoStore/struct/FIoChunkId layout, Fact:Unreal IoStore/enum/chunk types UE5. Container flags: Fact:Unreal IoStore/enum/container flags. The ContainerHeader chunk (UE5) starts with the signature 0x496F436E and a version: Fact:Unreal IoStore/enum/container header version.

Zen package (recognition level)

Package data (chunk ExportBundleData) is a Zen package: a FZenPackageSummary at offset 0 with a flag for embedded versioning (the UE4/UE5 object versions and custom versions, for cooked packages that were saved with versions), the header size, a mapped name, package flags and a list of offsets to the import map, export map, export bundle entries and (UE5.3+) the dependency bundles and imported package names; the export data follows the header. Imports are package ids and public export hashes rather than the name strings of a classic package. Layout: Fact:Unreal IoStore/struct/Zen package summary. Unverified: what the export map and export bundle entry records contain (search CUE4Parse UE4/IO/Objects) was not read.

Tools

CUE4Parse (IoStoreReader.cs), FModel. See Format:Unreal Engine pak file, Library:Unreal Engine.

Code & repositories

  • https://github.com/FabianFG/CUE4Parse @ 7353666098ece8ed8799fe467a33e7f68b11d688 · license: Apache-2.0
    C# parser of Unreal Engine 4/5 archives and assets (basis of FModel). Useful without running: UE4/Pak/Objects/FPakInfo.cs, UE4/IO/Objects/FIoStoreTocHeader.cs, FIoChunkId.cs, UE4/Objects/UObject/FPackageFileSummary.cs, UE4/Versions/EGame.cs.
    Tested on: source read, not run: source read, not run: read the pak footer, utoc header and package summary code; not built · checked 2026-10-18; last activity 2026-10-17; Note: the latest release ships binaries; the wiki links only the source, never the binaries