Constraint-Guided Multi-Agent Decompilation for Executable Binary Recovery
Decompilation, the process of recovering source code from compiled binaries, plays a crucial role in various domains, including security analysis, malware reverse engineering, and maintaining legacy software. Despite its importance, existing decompilers often produce code that either fails to compile or execute correctly, significantly limiting their practical applications. A novel approach has emerged, introducing a multi-agent framework that aims to transform decompiled code into re-executable source code through a technique known as Multi-level Constraint-Guided Decompilation (MCGD).
Overview of the Multi-Agent Framework
The proposed framework utilizes a hierarchical validation pipeline that operates on three distinct constraint levels:
- Syntactic Correctness: The first level involves parsing the decompiled code to ensure that it adheres to the syntactic rules of the programming language.
- Compilability: The second level utilizes the GNU Compiler Collection (GCC) to verify that the code can be compiled without errors.
- Behavioral Equivalence: The final level assesses the functional correctness of the code by generating test cases with the help of large language models (LLMs).
When validation fails at any of these levels, specialized LLM agents are employed to iteratively refine the code using structured error feedback, thereby enhancing the overall quality of the decompiled output.
Performance Evaluation
The effectiveness of this multi-agent framework was evaluated on a dataset comprising 1,641 real-world binaries sourced from ExeBench, utilizing three different decompilers: RetDec, Ghidra, and Angr. The results were promising, achieving a re-executability rate between 84% and 97%, which marks a significant improvement over the baseline outputs of traditional decompilers, with enhancements ranging from 28 to 89 percentage points.
In a comparative analysis with state-of-the-art LLM-based decompilation methods that also leverage the GPT-4o backbone, the proposed framework demonstrated superior performance. Specifically, it achieved an re-executability score of 84.1%, outperforming notable competitors such as:
- LLM4Decompile: 80.3%
- SK2Decompile: 73.9%
- SALT4Decompile: 61.8%
Insights from the Study
An ablation study conducted as part of the research underscored the critical role of execution-based validation. It was found that compile-only approaches yielded a behavioral correctness rate of 0%, despite impressive compilation rates ranging from 91% to 99%. This finding emphasizes the necessity of not only compiling code but also ensuring that it behaves as intended when executed.
Furthermore, the system showcased remarkable efficiency, with over 90% of binaries achieving correctness within just two iterations. The average cost per binary for this process was estimated to be between $0.03 and $0.05, highlighting the framework’s practicality in terms of resource utilization.
Conclusion
The results of this research indicate that constraint-guided agentic refinement is a promising strategy to bridge the gap between raw decompiler output and practically useful source code. This innovative approach not only enhances the re-executability of decompiled binaries but also sets a new standard for future developments in the field of decompilation.
Related AI Insights
- Scalable Job Shop Scheduling with Linear Graph Complexity
- Two-Stage ROI Refinement for Accurate Fetal Ultrasound
- Top Apple TV VPNs 2026: Fast, Secure & Easy Setup
- Inverting Brain Foundation Models Using Simulation-Based Inference
- Symmetric Equilibrium Propagation for Efficient Diffusion Training
- S2G-RAG: Enhancing Multi-Hop Retrieval QA Performance
- Reducing Clinical Risk in Medical Image Classification
- Quasi-Quadratic Gradient to Speed Up BFGS Optimization
- AI Support for Cross-Cultural Communication of Neologisms
- Muscle-Driven Dexterous Hand Control for Piano Playing
