# Psychonauts: matching Lua scripts and PC engine functions

> Psychonauts decompiles the PC game's modified Lua 4.0 scripts and portions of its 32-bit x86 engine into source checked by per-function byte comparisons. Its tools extract scripts from a user-owned game copy, rebuild them with a patched Lua compiler, and compare engine objects with Psychonauts.exe. The author reports all script functions matching and the engine still early in progress.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-06
- Added to the catalog: 2026-11-09
- Original resource: <https://github.com/DrDecki/psychonauts-decomp>
- Primary source: <https://github.com/DrDecki/psychonauts-decomp/blob/358267b1061cc3aff2be812afcc8dd058d3c5144/README.md>
- Catalog page: <https://awesomerea.org/resources/psychonauts-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/psychonauts-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/psychonauts-decomp-case/index.md)

## Requirements & limits

- **Prerequisites:** A personal copy of the current Steam version of Psychonauts.
- **Prerequisites:** Linux or WSL, Python 3 and gcc; engine matching also needs pefile, capstone and Visual C++ 2008 without a service pack.
- **Limits:** The author reports 106607 of 106607 script functions and 3375 of 10930 engine functions matching.
- **License:** MIT license.

## Primary sources

1. <https://github.com/DrDecki/psychonauts-decomp/blob/358267b1061cc3aff2be812afcc8dd058d3c5144/README.md>

## More in Games

- [pw: a matching decompilation of the Pokéwalker firmware](https://awesomerea.org/resources/pokewalker-matching-decomp-case/index.md) · Case study
- [ra2-decomp: a matching decompilation of Yuri's Revenge](https://awesomerea.org/resources/ra2-decomp-yuris-revenge-case/index.md) · Case study
- [Rage of Mages / Allods: matching reconstruction of the 1998 engine](https://awesomerea.org/resources/rom1-decomp-case/index.md) · Case study
- [Rally Trophy Decomp: function-matched reconstruction of Rally Trophy 1.01](https://awesomerea.org/resources/rally-trophy-decomp-case/index.md) · Case study
- [Rampage 2: Universal Tour: matching PlayStation decompilation](https://awesomerea.org/resources/rampage-2-universal-tour-case/index.md) · Case study
- [Ratatouille: matching the January 2006 prototype](https://awesomerea.org/resources/ratatouille-2006-prototype-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
