Giter Club home page Giter Club logo

zentools's Introduction

ZenTools

ZenTools extracts cooked packages (.uasset/.uexp) from the IoStore container files (.ucas/.utoc + .pak).

Works on UE5.1 and 5.2 and should support legacy 5.1 archives too.

Usage:

ZenTools.exe ExtractPackages <ContainerFolderPath> <ExtractionDir> [-EncryptionKeys=<KeyFile>]

If your game has encrypted paks, you must provide a keys.json, in the following format:

{
  "KeyGUID1": "KeyHex1",
  "KeyGUID2": "KeyHex2"
}

Obviously if your game only has one encryption key, you only need to specify one entry.

Example:

ZenTools.exe ExtractPackages "D:\\SteamLibrary\\steamapps\\common\\somegame\\projectname\\Content\\Paks" "D:\\somegame\\Output" -EncryptionKeys="D:\\somegame\\keys.json"

Since the game in the above example needs an AES key, this is the following keys.json file:

{
  "00000000-0000-0000-0000-000000000000": "DEADBEEFCAFEDEADBEEFCAFEDEADBEEFCAFEDEADBEEFCAFEDEADBEEFCAFEDEAD"
}

zentools's People

Contributors

archengius avatar buckminsterfullerene02 avatar narknon avatar

Stargazers

hinata_gomi avatar Ross Heo avatar Daivy avatar Jaws avatar FudgeRookie avatar Jake avatar Inovade avatar L-Pigeon avatar  avatar  avatar Azalea avatar Baris avatar ApeArmy avatar  avatar Brian Cozzens avatar LordLioath avatar  avatar Wolfgang.IX avatar  avatar lobotomyx avatar  avatar  avatar  avatar General-c4 avatar TheDarkness_RU avatar Brian K avatar Igromanru avatar  avatar Erika Tschinkel avatar  avatar Justin avatar  avatar Gabriel Castro avatar AlienCute avatar  avatar  avatar Tangerie avatar  avatar  avatar  avatar

Watchers

Egaliterrier avatar  avatar  avatar TheDarkness_RU avatar

zentools's Issues

Build instructions?

In relation to #3, I'd like to debug the issue. I see the files, but there are no instructions on how to build this project?

I probably need UE5 source files and this project builds as another project in the solution? But they generate their solution files, any instructions on how to properly integrate this project into the UE sources then?

Fails to process PAK structure with versioned _P packs

Posting this as a full-fledged issue incase you might want to look into it later.
Tested on Talos 2 demo, 5.2.0 it has IOStore/PAK structure:

Talos2-Windows.pak
Talos2-Windows_0_P.pak
global.ucas
global.utoc
[...]
LogIoStoreTools: Display: Successfully opened 3 Container files
LogIoStoreTools: Display: Building Package Map from Containers
LogWindows: Error: appError called: Assertion failed: PackageBuffer.IsOk() [File:D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Programs\ZenTools\Private\IoStorePackageMap.cpp] [Line: 74]
Failed to find ChunkId 7eca92f3c72d030000000001 for PackageId 0x32dc7f392ca7e in ContainerId 0xdb448bc18f368bcf (ChunkInfo valid: 0)
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: PackageBuffer.IsOk() [File:D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Programs\ZenTools\Private\IoStorePackageMap.cpp] [Line: 74]
LogWindows: Error: Failed to find ChunkId 7eca92f3c72d030000000001 for PackageId 0x32dc7f392ca7e in ContainerId 0xdb448bc18f368bcf (ChunkInfo valid: 0)
LogWindows: Error: [Callstack] 0x00007ff7a3871393 ZenTools.exe!FIoStorePackageMap::PopulateFromContainer() [D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Programs\ZenTools\Private\IoStorePackageMap.cpp:73]

I think they might be using the little-known "overwrite-delete" file entry that "deletes" assets from original PAK via _P(atch) outright, rather than overwriting?

Critical Error - Ran out of memory

I am trying to extract the INI files from the Lords of the Fallen (2023) game.

I am using this command:
ZenTools.exe ExtractPackages "E:\SteamLibrary\steamapps\common\Lords of the Fallen\LOTF2\Content\Paks" "E:\Downloads\Games\LordsOfTheFallen\Extracted PAKs" -PackageFilter=*.ini

Get this error:

LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Fatal error: [File:D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 241]
LogWindows: Error: Ran out of memory allocating 38881218400 bytes with alignment 8. Last error msg: The paging file is too small for this operation to complete..
LogWindows: Error: [Callstack] 0x00007ff7ea787db8 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea7a25e3 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea80b08f ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea80cac9 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6bd16b ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6b5407 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6b13f2 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6ab451 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6a9f74 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7ea6c6405 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff7eb4f2200 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffb58177344 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffb591426b1 ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:

I have 16GB of RAM and a 3GB Paging file.

The archive appears to be unencrypted so I did not include any keys. I assume this is supported?

ZenTools doesn't seem to extract or show any errors?

I'm trying to extract the .ucas/.utoc files from Layers of Fear (2023), however when trying to use ZenTools, it doesn't seem to do anything? Don't see any erros either.

Am I doing something wrong with the command line?
kép

Error: appError called: Assertion failed: ArrayNum >= 0

Trying to extract Tekken 8 CBT files. Getting the error:

LogTextLocalizationManager: No localization for '' exists, so 'en' will be used for the language.
LogTextLocalizationManager: No localization for '' exists, so 'en' will be used for the locale.
LogIoStoreTools: Display: Extracting packages from IoStore containers at 'G:/Games/Tekken 8 CBT/Polaris/Content/Paks' to directory 'G:/Games/Tekken 8 CBT/ExtractedPaks'
LogIoStoreTools: Display: Successfully opened 3 Container files
LogIoStoreTools: Display: Building Package Map from Containers
LogWindows: Error: appError called: Assertion failed: ArrayNum >= 0 [File:D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Runtime\Core\Public\Containers\ArrayView.h] [Line: 225] 

LogWindows: Windows GetLastError: The operation completed successfully. (0)
LogWindows: Error: === Critical error: ===
LogWindows: Error: 
LogWindows: Error: Assertion failed: ArrayNum >= 0 [File:D:\Perforce\FactoryGame_dev\UE4\Engine\Source\Runtime\Core\Public\Containers\ArrayView.h] [Line: 225] 
LogWindows: Error: 
LogWindows: Error: [Callstack] 0x00007ff66c5b53a2 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff66c5b13f2 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff66c5ab451 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff66c5a9f74 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff66c5c6405 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff66d3f2200 ZenTools.exe!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff830507604 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ff831fc26a1 ntdll.dll!UnknownFunction []
LogWindows: Error: 
LogWindows: Error: 
LogWindows: Error: 
LogWindows: Error: 
LogExit: Executing StaticShutdownAfterError
LogWindows: FPlatformMisc::RequestExit(1)
LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3)
LogCore: Engine exit requested (reason: Win RequestExit)

Full log: ZenTools-backup-2023.11.07-12.17.26.log

How to do

LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
LogIoStoreTools: Display: Extracting packages from IoStore containers at 'XXXXXXXXXXX' to directory 'XXXXXXXXXXX'
LogIoStoreTools: Display: Didn't find any container files in folder 'XXXXXX'
LogIoStoreTools: Display: ZenTools executed in 0.008914 seconds

[FR] Support for Encrypted containers

It looks like no known file format is compatible with -EncryptionKeys=<KeyFile>
Neither the dummy that ZT itself generates:

"EncryptionKey":{"Name":null,"Guid":null,"Key":null},"SigningKey":null,"bEnablePakSigning":false,"bEnablePakIndexEncryption":false,"bEnablePakIniEncryption":false,"bEnablePakUAssetEncryption":false,"bEnablePakFullAssetEncryption":false,"bDataCryptoRequired":true,"PakEncryptionRequired":true,"PakSigningRequired":true,"SecondaryEncryptionKeys":null}

Nor the UnrealPak one:

https://raw.githubusercontent.com/allcoolthingsatoneplace/UnrealPakTool/master/Crypto.json

LogIoStoreTools: Warning: Failed to parse string 'EncryptionKey' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'SigningKey' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bEnablePakSigning' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bEnablePakIndexEncryption' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bEnablePakIniEncryption' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bEnablePakUAssetEncryption' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bEnablePakFullAssetEncryption' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'bDataCryptoRequired' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'PakEncryptionRequired' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'PakSigningRequired' as a valid Guid for encryption key
LogIoStoreTools: Warning: Failed to parse string 'SecondaryEncryptionKeys' as a valid Guid for encryption key

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.