AIMachDec
IDA plugin for Apple AARCH64/ARM64 binaries that utilizes LLMs to translate assembly functions into readable pseudo-code in C, Objective-C, or Swift.
Install / Use
/learn @s3rg0x/AIMachDecREADME
AIMachDec
AIMachDec is an IDA plugin for Apple AARCH64/ARM64 binaries that utilizes LLMs to translate assembly functions into readable pseudo-code in C, Objective-C, or Swift. It:
- Detects language context (C, Objective-C, Swift) or allows manual selection.
- Uses the selected LLM to generate pseudo-code from ARM64 functions.
- Presents output in a clean, interactive viewer window ("AI Pseudocode-A/B/..."), similar to IDA's native decompiler.
This plugin is specifically designed for analyzing Apple Mach-O binaries, including iOS apps, kernelcaches, and dyld_shared_cache libraries.
Built using model prompts and structure from the ipsw AI Decompiler from blacktop.
Supported models:
- OpenAI GPT-4
- Claude 3 Opus
- Ollama LLaMA 3
- Perplexity Sonar
- OpenRouter DeepCoder 14B (free)
Installation
Requirements
- IDA Pro version 8.4+
- Python 3.x with
requestslibrary
Setup
- Install
requestsin a normal Python environment. - Copy these folders from
site-packages/intoLib/site-packages/into IDA\python\3\folder. - Copy
AIMachDec.pyinto your IDA plugins directory. - Restart IDA.
Usage
- Open a binary and navigate to the target function.
- Set your API key as an environment variable in IDA's Python console. If not set, the plugin will print this instruction in the console. E.g.:
[AIMachDec] Missing API key: OPENROUTER_API_KEY [AIMachDec] Set it in the IDA python console like this: import os os.environ["OPENROUTER_API_KEY"] = "<api_key>" - Use
Ctrl+Shift+AorEdit > Plugins > AIMachDec. - Select an AI model and target language (or auto-detect).
- View the decompiled result in a new AI Pseudocode window.
The plugin extracts the function's disassembly, constructs a prompt, and queries the selected LLM.
Screenshots




Compatibility
- IDA Pro: >=8.4
- Platforms: Windows, Linux, macOS
- File Types: Focused on Mach-O (Apple ARM64), partial support elsewhere
TODO
- Add syntax highlighting to output viewer
- Support more LLM providers
- Implement local caching and context preservation per function
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
