Skip to main content

Decompile, unpack, recover, and repack tools for Murder Engine games

Project description

murder-unpack

Decompile, unpack, recover, and repack toolkit for Murder Engine games.

Reverse-engineers exported Murder Engine games back into editor-openable projects. Extracts sprites, dialogues, world data, and more. Supports Windows, Linux, and macOS game builds.

Features

  • Full project recovery — Reconstructs a Murder Engine editor project from an exported game
  • Asset extraction — Unpack all .gz data files into individual JSON assets
  • Sprite extraction — Extract individual sprites from texture atlas sheets as PNG
  • Dialogue export — Export dialogue trees to readable markdown
  • Binary analysis — Detect .NET deployment format (NativeAOT, single-file bundle, self-contained)
  • Bundle extraction — Extract managed assemblies from .NET single-file bundles
  • C# stub generation — Auto-generate typed C# classes from packed JSON data
  • Engine management — Clone any Murder Engine version (branch/tag/commit)
  • Repacking — Repack modified assets back into the game's .gz format
  • Plugin system — Extend with drop-in .py files or pip-installable packages
  • Cross-platform — Works on Windows, Linux, and macOS; handles all three platforms' binaries

Quick Start

Requirements

  • Python 3.11+
  • uv (recommended) or pip
  • Git (for engine cloning)

Install

# With uv (recommended)
uv tool install murder-unpack

# Or from source
git clone https://github.com/yuna0x0/murder-unpack.git
cd murder-unpack
uv sync

Basic Usage

# Show game info and asset counts
murder-unpack info "path/to/game"

# Extract all data, sprites, and dialogues
murder-unpack extract-all "path/to/game" output/

# List all assets (with optional filters)
murder-unpack list-assets "path/to/game" --type WorldAsset

# Recover into a full editor project
murder-unpack recover "path/to/game" recovered/ --engine-version main

Commands

Extraction

Command Description
info <game_dir> Show game info, asset counts, and atlas list
extract-all <game_dir> <output_dir> Full extraction: data + sprites + dialogues
extract-data <game_dir> <output_dir> Dump all .gz data files as plain JSON
extract-sprites <game_dir> <output_dir> Extract sprites from atlas sheets as PNG
extract-dialogue <game_dir> <output_dir> Export dialogue scripts to markdown
list-assets <game_dir> List assets with --type and --name filters
decode-qoi <input.qoi.gz> <output.png> Convert a single QOI image to PNG

Recovery

Command Description
recover <game_dir> <output_dir> Full editor project recovery
engine-versions List available Murder Engine branches and tags
repack <project_dir> <output_dir> Repack modified assets back into .gz format

Recovery Options

murder-unpack recover "path/to/game" recovered/ \
    --engine-version rel/11.0 \    # Branch, tag, or commit hash
    --game-name MyGame \           # Project name (auto-detected if omitted)
    --skip-engine \                # Don't clone engine (link manually)
    --engine-path /path/to/murder  # Use existing engine clone
    --no-stubs                     # Skip C# stub generation

Binary Analysis

Command Description
analyze-binary <exe_path> Detect format, extract type names
# Analyze and extract assemblies from a Windows build
murder-unpack analyze-binary game.exe \
    --extract-assemblies extracted/ \
    --decompile decompiled/

Plugins

Command Description
plugins list List loaded plugins
plugins dir Show plugin directories

How It Works

Game Data Format

Murder Engine exports games as GZip-compressed JSON:

File Contents
preload_data.gz Preload assets + total data file count
data0.gzdataN.gz Up to 500 game assets per file
sounds.gz FMOD audio bank paths
atlas/*.json Sprite atlas metadata (UV coords, trim areas)
atlas/*.qoi.gz Texture sheets in QOI format, gzipped
game_config Game profile configuration (JSON)

Recovery Process

  1. Load — Decompress all .gz files, parse JSON, index 5000+ assets
  2. Split — Write each asset as an individual .json file in the correct editor directory
  3. Scaffold — Generate .sln, .csproj, Program.cs matching the hellomurder template
  4. Resources — Copy atlas textures, fonts, shaders, sounds, images, video
  5. Stubs — Auto-generate C# stub classes for game-specific types (e.g., Road.Assets.*)
  6. Engine — Clone Murder Engine at the specified version with submodules

Binary Detection

Supports all .NET deployment formats across all platforms:

Format Windows Linux macOS
NativeAOT PE ELF Mach-O
Single-file bundle PE ELF Mach-O
Self-contained .exe + coreclr.dll binary + libcoreclr.so binary + libcoreclr.dylib
Framework-dependent .dll + .runtimeconfig.json same same

Plugin System

Drop-in Plugins

Place .py files in ~/.murder-unpack/plugins/ or ./plugins/:

# plugins/my_handler.py
def register(registry):
    registry.asset_handlers["my_handler"] = MyHandler()

class MyHandler:
    name = "my_handler"
    asset_types = ["Custom.Assets.MyAsset"]

    def parse(self, asset_data):
        return asset_data

    def export(self, asset, output_path):
        output_path.write_text(str(asset))

Pip-installable Plugins

# In your plugin's pyproject.toml
[project.entry-points."murder_unpack.asset_handlers"]
my_handler = "my_plugin:MyHandler"

[project.entry-points."murder_unpack.commands"]
my_cmd = "my_plugin.cli:my_command"

Development

git clone https://github.com/yuna0x0/murder-unpack.git
cd murder-unpack
uv sync
uv run murder-unpack --help

# Install with binary analysis support
uv sync --extra binary

# Run tests
uv run pytest

License

MIT - yuna0x0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

murder_unpack-0.1.0.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

murder_unpack-0.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file murder_unpack-0.1.0.tar.gz.

File metadata

  • Download URL: murder_unpack-0.1.0.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for murder_unpack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12e2562ea34c8180bce36a36b5b89deee9834ec1596ab635300160d4a22cefda
MD5 b90e9a30d793bb606d50c9717af26c6f
BLAKE2b-256 f79ac949acfa9e9c62e5711babdf4436de4509f10f579c29a87c7a1e3cc86861

See more details on using hashes here.

Provenance

The following attestation bundles were made for murder_unpack-0.1.0.tar.gz:

Publisher: pypi-publish.yml on yuna0x0/murder-unpack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file murder_unpack-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: murder_unpack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for murder_unpack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48d855268a82a717cd3a7c18ced5e9c0fad87cf91f9484cccd9c93e8afbb6a80
MD5 66b5774d1511657107f3a2597f338c79
BLAKE2b-256 28f1d111f2e3e8763cddad9055f63fa50e5ee0a8bc303c8049bcbf74d46a2fcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for murder_unpack-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on yuna0x0/murder-unpack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page