Games & PackagedZero Extra Tools NeededMCP Tool: extract_package

How to REA Packaged Applications: PyInstaller CArchive, Godot PCK & Node SEA

Unpack single-executable bundled applications statically: carve PyInstaller CArchive/PYZ archives into clean .pyc bytecode, dump Godot .pck scene assets, and deconstruct Node.js Single-Executable Application (SEA) blobs.

AI Overview Direct AnswerHow to REA: Packaged Applications (PyInstaller / Godot / SEA) Quickstart Summary

In this official REA guide for Packaged Applications (PyInstaller / Godot / SEA), AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea extract-package ./target_utility.exe --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.

Investigation ScenarioReal-World Objective

The Problem & Target Artifact

Malware analysis or tool reconstruction: You receive a standalone Windows .exe compiled with PyInstaller or a single Linux binary containing an embedded Node.js or Godot payload. You need the original source scripts without running the binary.

Target Artifact: Single-file executable (.exe, ELF) or asset archive (.pck).
AI PromptClaude Code / Cursor / Windsurf

Natural Language Agent Instructions

Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):

Prompt Template:Select All to Copy
Use REA to extract ./target_utility.exe. Extract the embedded Python bytecode files (.pyc) and identify the primary entrypoint script.
ExecutionTerminal & MCP Tool Call

Run REA Analysis Command

Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:

CLI Command Execution
rea extract-package ./target_utility.exe --json

What REA Extracts & Returns

PyInstaller CArchive cookie validation ('MEI\014\013\012\013\016') and trailer offset parsing
Embedded PYZ archive extraction containing compressed CPython bytecode modules
Python magic number identification (Python 3.8 through 3.13 bytecode headers)
Godot engine .pck file header, pack version, and resource path mapping (res://scenes/...)

Extracted Package Manifest & Bytecode Files

The verified findings and synthesized clean-room structures generated from this investigation:

Extracted Package Manifest & Bytecode Files
# REA CLI Package Extraction
$ rea extract-package ./target_utility.exe --json
{
  "carrier": "pyinstaller",
  "python_version": "3.11",
  "entrypoint": "main.pyc",
  "extracted_members": [
    { "name": "main.pyc", "type": "bytecode", "bytes": 8420 },
    { "name": "crypto_helper.pyc", "type": "bytecode", "bytes": 4120 },
    { "name": "pyz_archive", "type": "zipstore", "members_count": 48 }
  ]
}
Internal MechanicsProduction Engineering

In-Memory CArchive Footer Parsing & Decompression

PyInstaller appends its bundle payload to the end of a native bootloader executable. REA reads the file backward from the end of the PE/ELF container, searches for the 24-byte CArchive cookie, decodes the table of contents offset, and decompresses zlib streams into valid CPython .pyc files with authentic bytecode magic numbers intact.

Security Guardrails & Analysis Boundary Rules

Zero execution: Malware or suspicious binaries cannot trigger anti-analysis bombs or dial home.
Node.js SEA analysis identifies embedded JSON configurations and Fuse integrity settings.
Godot .pck carving extracts unencrypted GDScript files and 3D scenes directly into an output directory.