
Lone Water: Prologue © Saturnine Mage.
Script
Leadwerks Archive Extractor
Works through a compatible Leadwerks archive one entry at a time and recreates each ZipCrypto password as it goes.
Overview
A Leadwerks data.pak looks like a normal ZIP archive until extraction asks for a password. There is no single password to find. The engine makes a new one for every entry from its filename, size and a fixed mask.
The extractor follows the same routine while working through the archive.
Prerequisites
The extractor requires Python 3.6 or newer. Everything it needs is included with Python, so there are no extra packages to install.
Usage
Run the script with the archive path followed by the directory where you want the files written:
1
2
3
python .\leadwerks_archive_extract.py .\data.pak .\data_extracted
# -- OR --
python .\leadwerks_archive_extract.py .\data.zip .\data_extracted
The script creates the output directory if it does not exist.
Compatibility
The extractor follows the same setup I found in the Leadwerks builds covered by the investigation: a standard ZIP container, ZipCrypto on each entry and a password built from the filename, uncompressed size and fixed mask. Archives using that setup should work. If a build uses another mask or changes the password routine, extraction stops at the CRC check.