arXiv(opens in a new tab)cs.CRSep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.05370

When LLM Decompilers Recompile More and Preserve Less

Chang Liu, Edward Raff, Kristopher Micinski

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Decompilation recovers high-level source from compiled machine code and serves as a foundation for security tasks such as vulnerability detection and malware analysis. Traditional decompilers like Ghidra and Hex-Rays expose whatever they cannot resolve as visible placeholders and often emit pseudo-code that will not compile or execute; LLM-based decompilers produce clean, idiomatic C and are now judged almost entirely by recompatibility and re-executability: whether the output builds and passes its shipped input/output tests. We show that these metrics can reward the wrong path: a function may recompile and pass every shipped test yet diverge on other legitimate inputs, and a disclosed vulnerability may disappear from the recompiled code with no visible trace of the crash. Neither failure is caught by existing suites.

To address this gap, we propose Decompile-Diverge, a behavioral comparison oracle not relying on fixed or hand-crafted tests: for each function it synthesizes a driver, grows a fuzzing corpus from the reference, and reruns the decompiled code on the same inputs to detect changes in the function's behavior. Across eight systems in nine configurations on established LLM decompilation corpora, candidates that pass every shipped test still diverge from the original on our input corpus: 4.9% overall, and as many as 13% for a single system. On 300 real GitHub library functions and 287 CVE-grounded functions, recompatibility and behavioral agreement can come apart: the strongest refinement LLM lifts Ghidra's build rate from 75% to 90%, while its Matched rate falls from 74% to 62%; on disclosed vulnerabilities, up to one tenth exhibit Crash Absence in its output. Source-level analysis traces this divergence to introduced fields, types, callees, and guards that replace the visible unknowns traditional tools leave behind.

1 Introduction

Decompilation serves as a foundation in both security and software engineering, facilitating critical tasks such as security auditing, vulnerability triage, legacy software maintenance, and malware analysis. As decompiled code is being integrated in active codebases and subjected to fuzzing, behavioral agreement with the original is as critical as readability. Traditional decompilers like Ghidra (National Security Agency 2019), Hex-Rays (Hex-Rays 2024), and angr (Shoshitaishvili et al. 2016) often leave certain analysis unresolved and emit non-compilable pseudo code, while the recent LLM-based decompilation systems (Jiang et al. 2023;

Armengol-Estap'e et al. 2023; Liu et al. 2026; Tan et al. 2024; Dramko, Goues, and Schwartz 2025; Tan et al. 2025a; Hu, Liang, and Chen 2024; Wong et al. 2025) have gained significant improvement in recompatibility and re-executability. Generally, they fall into two families: refinement models, which refine the output of a traditional decompiler (the front end), and E2E models, which generate C code directly from assembly.

Recompilability measures whether code can be built into an executable, a prerequisite for re-executability that does not establish it. Re-executability checks a function's output against assertions for given inputs. Many datasets and benchmarks do not provide such checks (da Silva et al. 2021). Even when tests are available, their coverage may be too narrow to establish behavioral agreement for decompiled functions. A candidate can therefore recompile and return cleanly on the shipped inputs yet behave differently on other legitimate inputs, as Figure 1 shows.

Motivated by this measurement gap, we propose Decompile-Diverge. This framework automates evaluation by synthesizing a driver, generating a corpus of fuzzed inputs from the reference function, and comparing a digest of the decompiled code's bounded observable post-state with the corresponding digest from the original. Both LLM-based decompilers and raw front-end baselines are evaluated through this pipeline via two distinct tracks: a general track for behavioral agreement, and a Common Vulnerabilities and Exposures (CVE) track for vulnerability preservation. Our analysis reveals a major shift in failure modes: whereas traditional tools yield visible unknowns, LLMs tend to invent part of the code that either breaks compilation or results in behavioral divergence.

Our contributions include:

  • A behavioral comparison oracle not relying on fixed tests, for which per-function drivers are synthesized automatically, fuzz inputs are grown dynamically from the reference, and each decompiled output is compared with the reference behavior for each input by checking for crashes, hangs, and differences in the bounded observable post-state.

  • Two original benchmark sets that cover 300 real GitHub library functions, and a CVE-grounded track of 287 disclosed vulnerable functions in self-contained suites.

  • Behavioral agreement can fall as Build rises, across nine configurations of eight systems. Gains in build rate co-incide with losses in behavioral agreement, and aligned source analysis traces Divergence and Crash Absence to introduced fields, types, callees, and constants, a common pattern within each system.

References (57)

  • S.; and Roth, P. 2018 (opens arXiv in a new tab)
  • ExeBench: an ML-scale dataset of executable C functions
  • SLaDe: A Portable Small Language Model Decompiler for Optimized Assembly
  • L.; Bajaj, A. P.; Gibbs, W.; O'Kain, J.; Miao, D.; Bao, T.; Doupé, A.; Shoshitaishvili, Y.; and Wang, R. 2024
  • L.; Doria, S.; Soneji, A.; Gibbs, W.; Doupé, A.; Shoshitaishvili, Y.; Losiouk, E.; Wang, R.; and Aonzo, S. 2026
  • CVEfixes: automated collection of vulnerabilities and their fixes from open-source software
  • Decomp-person: How Humans Decompile and What We Can Learn From It
  • Evaluating the Effectiveness of Decompilers
  • Evaluating Large Language Models Trained on Code
  • Augmenting Decompiler Output with Learned Variable Names and Types
  • Reverse compilation techniques
  • F.; Kind, B. C.; de Souza Magalhães, J. W.; Rocha, J. N.; Ferreira Guimarães, B. C.; and Quinão Pereira, F. M. 2021
  • LAVA: Large-Scale Automated Vulnerability Addition
  • Idioms: Neural Decompilation With Joint Code and Type Definition Prediction
  • A Taxonomy of C Decompiler Fidelity Issues
  • AFL++: Combining Incremental Steps of Fuzzing Research
  • A Neural-based Program Decompiler
  • DecompileBench: A Comprehensive Benchmark for Evaluating Decompilers in Real-World Scenarios
  • GLM-5: from Vibe Coding to Agentic Engineering
  • Magma: A Ground-Truth Fuzzing Benchmark
  • Beyond the C: Retargetable Decompilation using Neural Machine Translation
  • DeGPT: Optimizing Decompiler Output with LLM. Proceedings 2024 Network and Distributed System Security Symposium
  • Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning
  • J.; Miller, G. L.; Roth, P.; Zak, R.; Zaresky-Williams, E.; Anderson, H.; Raff, E.; and Holt, J. 2025
  • Towards Neural Decompilation
  • Revisiting Binary Code Similarity Analysis Using Interpretable Feature Engineering and Lessons Learned
  • CHISEL-ing Back Source Code with AI-enabled Iterative Recovery
  • DIRE: A Neural Approach to Decompiled Identifier Naming
  • Compiler validation via equivalence modulo inputs
  • Assemblage: Automatic Binary Dataset Construction for Machine Learning
  • Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation
  • Binary Decompilation LLM with Feedback-Driven Multi-Turn Refinement (opens arXiv in a new tab)
  • How far we have come: testing decompilation correctness of C decompilers
  • Note on the sampling error of the difference between correlated proportions or percentages
  • ARVO: Atlas of Reproducible Vulnerabilities for Open Source Software
  • Polymorphic type inference for machine code
  • Len or index or count, anything but v1
  • Is Function Similarity OverEngineered? Building a Benchmark
  • Evolving Exact Decompilation
  • AddressSanitizer: A Fast Address Sanity Checker
  • SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Decaf: Improving Neural Decompilation with Automatic Feedback and Search
  • SK2Deccompile: LLM-based Two-Phase Binary Decompilation from Skeleton to Skin
  • LLM4Deccompile: Decompiling Binary Code with Large Language Models
  • Decompile-Bench: Million-Scale Binary-Source Function Pairs for Real-World Binary Decompilation
  • An Observational Investigation of Reverse Engineers' Processes
  • SALT4Deccompile: Inferring Source-level Abstract Logic Tree for LLM-Based Binary Decompilation
  • K.; Wang, H.; Li, Z.; Liu, Z.; Wang, S.; Tang, Q.; Nie, S.; and Wu, S. 2023
  • K.; Wu, D.; Wang, H.; Li, Z.; Liu, Z.; Wang, S.; Tang, Q.; Nie, S.; and Wu, S. 2025
  • ReSym: Harnessing LLMs to Recover Variable and Data Structure Symbols from Stripped Binaries
  • Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
  • Finding and understanding bugs in C compilers
  • Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C Decompilers
  • Precise and Accurate Patch Presence Test for Binaries
  • OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped Binary
  • D-LiFT: Improving LLM-based Decompiler Backend via Code Quality-driven Fine-tuning
  • D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation