Project
Back to projects
Leadwerks Game Engine cover artwork

Script

Leadwerks Archive Extractor

A Python utility for extracting compatible encrypted archives used by Leadwerks games.

Status
Available

Overview


This command-line tool takes a compatible Leadwerks archive and extracts its contents to a directory. The password for each file is calculated automatically while the archive is being read.

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.