Decompilation -- recovering source code from compiled binaries -- is essential for security analysis, malware reverse engineering, and legacy software maintenance. However, existing decompilers produce code that often fails to compile or execute correctly, limiting their practical utility. We present a multi-agent framework that transforms decompiled code into re-executable source through Multi-level Constraint-Guided Decompilation (MCGD). Our approach employs a hierarchical validation pipeline with three constraint levels: (1) syntactic correctness via parsing, (2) compilability via GCC, and (3) behavioral equivalence via LLM-generated test cases. When validation fails, specialized LLM agents iteratively refine the code using structured error feedback. We evaluate our framework on 1,641 real-world binaries from ExeBench across three decompilers (RetDec, Ghidra, and Angr). Our framework achieves 84-97% re-executability, improving baseline decompiler output by 28-89 percentage points. In comparison with state-of-the-art LLM-based decompilation methods using the same GPT-4o backbone, our approach (84.1%) outperforms LLM4Decompile (80.3%), SK2Decompile (73.9%), and SALT4Decompile (61.8%). Our ablation study reveals that execution-based validation is critical: compile-only approaches achieve 0% behavioral correctness despite 91-99% compilation rates. The system converges efficiently, with 90%+ binaries reaching correctness within 2 iterations at an average cost of $0.03-0.05 per binary. Our results demonstrate that constraint-guided agentic refinement can bridge the gap between raw decompiler output and practically useful source code.
ALT4Decompile: Inferring C-aligned Abstract Loop Tree for LLM-Based Binary Decompilation
Tsinghua University(清华大学);The Hong Kong University of Science and Technology(香港科技大学);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所)
CHISEL-ing Back Source Code with AI-enabled Iterative Recovery
A*STAR Institute of Advanced Intelligence and Computing(A*STAR先进智能与计算研究所);Coimbatore Institution of Technology(科因巴托尔理工学院);National University of Singapore(新加坡国立大学)
From Heuristics to Transformers: A Comprehensive Survey of Type Inference from Stripped Binaries
Guangzhou University of Software(广州软件学院);Guangzhou Huali College(广州华立学院);Nukus State Technical University(努库斯国立技术大学);Xidian University(西安电子科技大学);Shenzhen University of Information Technology(深圳信息技术大学);Shenzhen University(深圳大学);National University of Computer and Emerging Sciences Karachi(巴基斯坦国家计算机与新兴科学大学卡拉奇分校);National University of Computer and Emerging Sciences(巴基斯坦国家计算机与新兴科学大学)
CoDe-R: Refining Decompiler Output with LLMs via Rationale Guidance and Adaptive Inference
School of Computer Science and Technology / School of Artificial Intelligence, China University of Mining and Technology(计算机科学与技术学院/人工智能学院,中国矿业大学);Mine Digitization Engineering Research Center of the Ministry of Education, China University of Mining and Technology(教育部矿山数字化工程研究中心,中国矿业大学)
A Unified Issue Resolution Benchmark for Requirement Clarification, Planning, and Code Generation for Coding Agents
Singapore Management University(新加坡管理大学);Monash University Malaysia(马来西亚莫纳什大学);Daegu Gyeongbuk Institute of Science and Technology (DGIST)(大邱庆北科学技术院);The Chinese University of Hong Kong(香港中文大学);North Carolina State University(北卡罗来纳州立大学);City University of Hong Kong(香港城市大学);The Hong Kong University of Science and Technology(香港科技大学);The University of Hong Kong(香港大学)