Extract C pseudocode from IDA Pro using the Hex-Rays decompiler. Use this skill when you need to decompile a specific function at a given memory address (EA) to understand its structure and variables.
This skill runs IDA Pro in headless mode to invoke the Hex-Rays decompiler for a specific memory address (EA) and returns the generated C pseudocode.
Use this skill when you need to:
idapro and ida-domain installed.i64 or .idb database file or binaryRun the extraction script with the required parameters:
python scripts/extract.py --ea "0x140001000" --db "sample_data/binary.i64"
Or via stdin (for agent integration):
echo '{"ea_address": "0x140001000", "sample_database": "sample_data/binary.i64"}' | python scripts/extract.py
| Parameter | Type | Required | Description |
|---|---|---|---|
ea_address | string | Yes | Memory address to decompile (hex like 0x140001000 or decimal) |
sample_database | string | Yes | Path to the .i64 database file |
Returns a JSON object:
{
"success": true,
"ea_address": "0x140001000",
"pseudocode": "int __fastcall sub_140001000(int a1) { ... }"
}
On error:
{
"success": false,
"error": "Hex-Rays decompiler plugin could not be loaded."
}
idapro and ida_hexrayssys.executable via python subprocessCommon errors and solutions:
sample_database path exists