NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Can LLMs Deobfuscate Binary Code? A Systematic Analysis of Large Language Models into Pseudocode Deobfuscation

Li Hu, Xiuwei Shang, Jieke Shi, Shaoyin Cheng, Junqi Zhang, Gangyang Li, Zhou Yang, Weiming Zhang, David LoarXiv 2026

TL;DR

This paper introduces BINDEOBFBENCH, the first comprehensive benchmark designed to evaluate how well Large Language Models (LLMs) can deobfuscate binary code into clean, readable pseudocode. The study reveals that a model's deobfuscation success depends heavily on its structured reasoning capabilities and task-specific fine-tuning rather than raw parameter scale, with advanced reasoning models showing remarkable resilience against complex code transformations.

What Problem Does This Paper Address?

Software developers and security analysts frequently need to reverse-engineer binary code to understand its logic, maintain legacy systems, or detect malware threats. To protect intellectual property or evade detection, code is often intentionally obscured using obfuscation techniques. This process scrambles control flows, substitutes instructions, and injects junk code while preserving the original program's behavior.

Traditional deobfuscation tools rely on rigid, manually crafted rules that struggle to adapt to novel or combined obfuscation strategies. While LLMs have shown immense promise in understanding source code, binary code deobfuscation introduces a massive "distribution shift." Decompiled pseudocode is often messy, unstructured, and filled with high-entropy patterns that look nothing like the clean code LLMs see during pre-training.

Figure 1: Example of a bubble sort function in three representations: (top-left) source code, (bottom-left) pseudocode decompiled by IDA Pro, (right) obfuscated pseudocode with combined obfuscation transformations.

Until now, there has been no systematic, large-scale evaluation of how well different LLM architectures handle this highly complex task.

Methods

The authors built a systematic evaluation pipeline called BINDEOBFBENCH to test nine representative LLMs across three main categories: general-purpose/code-specific models (e.g., Qwen2.5-Coder, Llama-3.1, GPT-4o), reasoning-optimized models (OpenAI-o1, DeepSeek-R1), and domain/task-specific expert models (Recopilot, ChatDEOB).

To evaluate these models holistically, the authors designed a Multi-Dimensional Assessment Framework covering four critical dimensions:

  1. Lexical Consistency: Measured using BLEU scores to see how closely the text matches the original, unobfuscated pseudocode.
  2. Semantic Preservation: Evaluated using a novel Dual-Perspective Semantic Fusion method. Because decompiled code cannot be directly executed to run test cases, this metric combines implicit LLM embeddings with explicit symbolic signatures (like variable returns and function calls) to verify if the code's actual behavior is preserved.
  3. Code Simplicity: Quantified via token-wise delta entropy to measure how effectively the model strips away obfuscation-induced complexity.
  4. Code Readability: Approximated using Halstead Complexity (specifically the "Effort" metric) to evaluate the cognitive load required for a human analyst to understand the output.
Figure 2: Workflow of BINDEOBFBENCH

Datasets

The authors constructed two primary datasets from scratch:

  • BINDEOBFBENCH Core Dataset: Starting with a curated set of 2,092 high-quality C/C++ programs from the CodeNet dataset, they applied six mainstream obfuscation transformations across three software development stages (pre-compilation, compile-time, and post-compilation). By combining these transformations across 4 instruction set architectures (ARM, MIPS, x86, x64) and 4 compiler optimization levels (O0–O3), they generated a massive pool of 1,564,816 stripped binaries. From this, they sampled a robust benchmark of 500 distinct functions per configuration.
  • Malware Dataset: To test real-world applicability, they collected 500 validated functions from real malware families (including Backdoors, Botnets, and Trojans) sourced from open repositories like theZoo and MalwareSourceCode, which were then recompiled with obfuscation and stripped of symbolic data.

Key Insights and Ideas

  • Reasoning Beats Raw Scale: Traditional scaling laws don't perfectly apply here. Models with test-time compute and progressive reasoning capabilities (like DeepSeek-R1) drastically outperform massive general-purpose models. They tackle complex structural transformations step-by-step rather than trying to generate a solution in a single pass.
  • The In-Context Learning Divergence: Providing few-shot examples significantly helps standard models by giving them patterns to copy. However, it actually hinders or plateaus reasoning models like DeepSeek-R1 because the prompt examples can interfere with the model's internal chain-of-thought reasoning steps.
  • Task-Specific SFT > Broad Domain Pre-training: ChatDEOB (fine-tuned specifically for deobfuscation) consistently outperformed Recopilot (pre-trained broadly on general binary analysis), proving that direct alignment with deobfuscation mappings is more valuable than surface-level domain knowledge.
  • Symbols Can Be a Distraction: Counterintuitively, LLMs often achieve higher lexical consistency on stripped binaries (binaries without variable or function names). When symbols are present, models waste effort trying to guess exact original names and fail; when stripped, they default to clean, standardized placeholders that align better with ground-truth baselines.

Key Results

  • Robustness Under Extreme Obfuscation: At Level-6 obfuscation (where all six transformations are applied simultaneously), standard models failed to resolve the underlying structure. In contrast, DeepSeek-R1 maintained a 62.89% semantic fidelity score, outperforming ChatDEOB (58.30%) and ReCopilot (54.62%).
  • Optimization and Architecture Resilience: Standard models showed heavy bias toward x86/x64 architectures and degraded under aggressive compiler optimizations (O3). Reasoning models successfully mitigated this, achieving 72.31% semantic preservation on ARM and refactoring convoluted logic to lower Halstead complexity significantly better than standard models.
  • Malware Deobfuscation: On the malicious binary dataset, reasoning models successfully reduced code complexity by nearly 60%, making highly obscured threat logic readable for human analysts.

Limitations and Future Work

While BINDEOBFBENCH is a major step forward, the authors note that it cannot encompass every emerging or proprietary obfuscation technique. Furthermore, because the LLM landscape shifts rapidly, the benchmark has not yet evaluated every newly released model scale.

The automated metrics used, while multi-dimensional, are still proxies and may not perfectly capture the true cognitive load of a human reverse engineer or the downstream performance of deobfuscated code in tasks like vulnerability discovery. The authors plan to continuously expand the benchmark with more diverse transformations and explore more advanced, reasoning-driven LLM deobfuscation strategies.

Summary updated

BibTeX
@misc{hu2026can,
  author = {Li Hu and Xiuwei Shang and Jieke Shi and Shaoyin Cheng and Junqi Zhang and Gangyang Li and Zhou Yang and Weiming Zhang and David Lo},
  title = {{Can LLMs Deobfuscate Binary Code? A Systematic Analysis of Large Language Models into Pseudocode Deobfuscation}},
  year = {2026},
  eprint = {2604.08083},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.08083},
}
Figure