# jsc-decompile-mozjs-34

> PHP decoder and decompiler for SpiderMonkey 34 JavaScript bytecode, which the README says may handle .jsc files compiled by cocos2d-x. It parses the XDR-serialized scripts with their atoms, constants, objects, regular expressions and try and scope notes, decodes instructions from a SpiderMonkey 34 opcode table and rebuilds approximate JavaScript for each function context, while a second script prints the decoded operations instead. The author describes it as unfinished and as an example of how a JavaScript virtual machine works.

- Type: Tool
- Targets: App · Game
- Category: JavaScript and Electron tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/irelance/jsc-decompile-mozjs-34>
- Primary source: <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/readme.md>
- Catalog page: <https://awesomerea.org/resources/jsc-decompile-mozjs-34/>
- Record JSON: <https://awesomerea.org/resources/jsc-decompile-mozjs-34/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/jsc-decompile-mozjs-34/index.md)

## Requirements & limits

- No releases; the last commit, on 2021-07-27, fixed global-variable and object-initialization opcodes, and the README says the project may no longer be updated and is not complete. It targets SpiderMonkey 34 bytecode: the README notes that opcodes differ between SpiderMonkey versions, lists the magic values for bytecode versions 33 to 47, and says the tool does not check the magic, so files from nearby versions may partly decode.
- Runs on PHP 7.0 or later (the README says it still works on 7.4) after composer install, which only generates the autoloader. php run.php prints reconstructed code for each script context, and php scan.php prints atoms, decoded operations, constants and regular expressions for files that do not decompile. Input .jsc files come from the user; the repository holds no sample files or tests, and the source has no decryption or decompression step, so it reads only plain XDR bytecode.
- The README reports a fatal bug when decompiling deeply nested contexts and says output is not runnable, with generated names for local variables that the compiler discarded, so results should be checked against the scan.php operations. There is no license file, and composer.json declares the package proprietary, so the repository grants no reuse terms; recovered scripts remain subject to the rights of the application's owner.

## Primary sources

1. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/readme.md>
2. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/composer.json>
3. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/run.php>
4. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/scan.php>
5. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/src/Decompile.php>
6. <https://github.com/irelance/jsc-decompile-mozjs-34/blob/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/src/Constant.php>
7. <https://github.com/irelance/jsc-decompile-mozjs-34/tree/44ffa1b0bb5ffc42231fcfcb60c5e6a3bc366062/src/Xdr>

## More in Apps

- [Andromeda](https://awesomerea.org/resources/andromeda/index.md) · Tool
- [Dex-Editor-Android](https://awesomerea.org/resources/dex-editor-android/index.md) · Tool
- [smali/baksmali](https://awesomerea.org/resources/smali-baksmali/index.md) · Tool
- [dalvikus](https://awesomerea.org/resources/dalvikus/index.md) · Tool
- [paranoid-deobfuscator](https://awesomerea.org/resources/paranoid-deobfuscator/index.md) · Tool
- [Katalina](https://awesomerea.org/resources/katalina/index.md) · Tool

## 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.
