reverse-engineering
它能做什么
这项技能讲解如何反编译并研究游戏的代码、数据文件和内存,使模组能够与之连接。适合需要真实内部结构、而不是靠猜测的模组制作者。
适用场景
- ✓当模组需要游戏内部的函数名称或数据结构时。
- ✓当你想反编译 .NET、Unity 或 Java 游戏来阅读其代码的时候。
- ✓当你需要从游戏中弄清一种没有文档的文件格式时。
技能链接
https://github.com/rehan-remade/universal-modder/blob/main/.agents/skills/reverse-engineering/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我反编译这个 Unity 游戏的代码,找到处理玩家跳跃的那个函数。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会为不同类型的代码选择合适的工具,例如 .NET 用 ILSpy,原生程序用 Ghidra,研究输出结果,并在过程中把名称、ID 和格式记录在日志里。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Reverse engineering for mods
Rule zero: read the real thing, don't guess. Decompiled code, the actual data, a live memory view or a
GPU capture is the spec. Write what you learn into MODLOG.md (names, IDs, offsets, formats) as you go.
Keep all decompiled output and extracted assets outside the mod repo (e.g. ~/<game>-decomp/) and never
publish them. Single-player, offline or servers the user runs. Never attach debuggers or scanners to games
with anti-cheat (see skills/mod-any-game/references/safety.md).
Pick the tool by what the code is (um scan tells you)
If REA (Reverse Engineer Anything, npx rea-agents setup) is connected as an MCP
server, start there: one server covers native binaries (through an existing Ghidra, IDA or Hopper install), .NET
assemblies and JavaScript/Electron apps, and its answers come with the evidence behind them. The tools below are
the fallback, and the way to go deeper.
Managed .NET (XNA/FNA, Unity Mono, most indie C#)
dotnet tool install -g ilspycmd, thenilspycmd -p -o ~/<game>-decomp <Game>.exe(orAssembly-CSharp.dll). This gives a full C# project you can grep.- dnSpyEx: step through with a debugger, set breakpoints, edit methods.
- MCP: ILSpy-MCP / dnspy-mcp let an agent query types and methods directly.
Unity IL2CPP
- Cpp2IL (or Il2CppDumper) on
GameAssembly.dll+global-metadata.datgives types, fields, method signatures and addresses, plus dummy DLLs for ILSpy. - Method bodies are native: load
GameAssembly.dllin Ghidra/IDA and apply the generated script to name functions. - Live: UnityExplorer, or
il2cpp-frida-mcp.
Java (Minecraft, Slay the Spire...)
Vineflower / CFR / Recaf. For Minecraft, use Loom genSources with Mojang mappings.
Blitz3D (.bb games; SCP: Containment Breach's source is public): the game is a module inside the exe
that Ghidra can't see. Use the blitz3d-decomp skill (B3DDecomp, runtime behaviour for ports, animated
.b3d models).
Native C/C++ (custom engines, Unreal game code, console recomps)
- Ghidra (free) or IDA, driven through MCP so the agent can decompile, rename, retype and follow
cross-references:
- Ghidra: GhidraMCP (LaurieWired), pyghidra-mcp (headless, with a run-script tool; code-capable tools beat hundreds of tiny ones), ReVa.
- IDA: the official Hex-Rays IDA MCP (IDA 9.4+ Pro/Home; "code mode" runs IDAPython), or ida-pro-mcp.
- Binary Ninja and radare2 have MCP servers too.
- Workflow:
- Strings, then cross-references, then the function.
- Name and type everything you understand. Renames accumulate into a readable program.
- Confirm dynamically (below) before building on a guess. Agents can confidently misidentify things.
- Unreal: dump the reflection data first (UE4SS dumper or Dumper-7); it names most gameplay classes and properties for free.
Dynamic / live
- Cheat Engine: value scans → "find out what writes to this address" → struct → owner. CheatEngine MCP servers exist.
- x64dbg: breakpoints and tracing (x64dbg-mcp; bind it to 127.0.0.1, since some default to 0.0.0.0).
- Frida (frida-mcp, frida-game-hacking-mcp): hook functions from JavaScript, log arguments.
- ReClass.NET rebuilds structs from live memory.
Graphics
- RenderDoc (renderdoc-mcp) captures a frame and shows every draw, the render targets, the constant buffers (view/projection matrices) and the depth buffer.
- That's how you find where to inject geometry or effects (mashup-mods), and which texture holds a sprite atlas.
Data files and asset formats
Use the community tool first:
- Unity: UABEA, AssetRipper
- Unreal: FModel, UAssetGUI
- Fully compressed UE3
.upk(UELib showsExports=0): unpack a copy with Gildor'sdecompress(from UE Viewer), or, for LZO packages, withunpack_upk.py.
- Fully compressed UE3
- Bethesda: xEdit, BSArch
- GameMaker: UndertaleModTool
- Genie: genieutils
- Source: VRF, Crowbar
- FromSoft: WitchyBND, Smithbox
- Godot: GDRE Tools
Before reversing a format yourself, search the community archives. Most game formats from the 2000s and 2010s were worked out there:
- XeNTaX (closed in 2023): the forum, wiki and attachments are on archive.org, with a [public backup on GitHub](https://githu
常见问题
它能用于带反作弊系统的游戏吗?
不能。这项技能提醒不要把调试器或扫描器连接到带有反作弊系统的游戏上。
提取出的文件保存在哪里?
保存在模组项目之外,并且永远不会发布。
如何证明一种文件格式已被理解?
这项技能建议做往返测试:读取数据,再写回去,以证明已经理解了该格式。
详情
作者的原始描述
Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g. "how does the boss AI work", "find the damage function", "what format is this .sld/.pak/.dat", "where is the player position in memory".
热度
- GitHub 星标
- 9.3k
- 排名
- #12292
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
asset-pipeline
9.3k帮你的智能体把生成的或手绘的美术素材,转换为游戏引擎所需的准确尺寸、帧布局、调色板和文件格式。
blitz3d-decomp
9.3k帮你的智能体把 Blitz3D 游戏反编译为可读的源代码,并规划移植到其他引擎的方案,同时保留原游戏作为参考。
fal-assets
9.3k帮你的智能体使用 fal.ai 生成游戏美术、音效、音乐和 3D 模型,涵盖精灵、纹理、语音台词和视频。
game-automation
9.3k帮你的智能体启动真实的游戏、截图、在菜单中点击和输入、读取日志,从而测试它自己制作的游戏模组。