mlsanityData to 14 Oct 2026

Analyzing Chain of Thought (CoT) Approaches in Control Flow Code Deobfuscation Tasks

arXiv 2604.15390 ↗First posted 16 Apr 2026cs.SE cs.AIcited by 0

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Code deobfuscation is the task of recovering a readable version of a program while preserving its original behavior. In practice, this often requires days or even months of manual work with complex and expensive analysis tools. In this paper, we explore an alternative approach based on Chain-of-Thought (CoT) prompting, where a large language model is guided through explicit, step-by-step reasoning tailored for code analysis. We focus on control flow obfuscation, including Control Flow Flattening (CFF), Opaque Predicates, and their combination, and we measure both structural recovery of the control flow graph and preservation of program semantics. We evaluate five state-of-the-art large language models and show that CoT prompting significantly improves deobfuscation quality compared with simple prompting. We validate our approach on a diverse set of standard C benchmarks and report results using both structural metrics for control flow graphs and semantic metrics based on output similarity. Among the tested models and by applying CoT, GPT5 achieves the strongest overall performance, with an average gain of about 16% in control-flow graph reconstruction and about 20.5% in semantic preservation across our benchmarks compared to zero-shot prompting. Our results also show that model performance depends not only on the obfuscation level and the chosen obfuscator but also on the intrinsic complexity of the original control flow graph. Collectively, these findings suggest that CoT-guided large language models can serve as effective assistants for code deobfuscation, providing improved code explainability, more faithful control flow graph reconstruction, and better preservation of program behavior while potentially reducing the manual effort needed for reverse engineering.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 18 of its 49 references that are in the map. First posted on arXiv 16 Apr 2026.

Builds on

18 of 49 references.

References · 18

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2018A Call for Clarity in Reporting BLEU Scorescited by 1,799
  3. 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 688
  4. 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 431
  5. 2019Graph Matching Networks for Learning the Similarity of Graph Structured Objectscited by 205
  6. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  7. 2017Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detectioncited by 65
  8. 2023Towards Better Chain-of-Thought Prompting Strategies: A Surveycited by 62
  9. 2016A Survey of Symbolic Execution Techniquescited by 36
  10. 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
  11. 2024Assessing LLMs in Malicious Code Deobfuscation of Real-world Malware Campaignscited by 19
  12. 2023Static Code Analysis in the AI Era: An In-depth Exploration of the Concept, Function, and Potential of Intelligent Code Analysis Agentscited by 12
6 more
  1. 2018Toxic Code Snippets on Stack Overflowcited by 9
  2. 2024Enhancing Reverse Engineering: Investigating and Benchmarking Large Language Models for Vulnerability Analysis in Decompiled Binariescited by 6
  3. 2015Enhanced Bilingual Evaluation Understudycited by 3
  4. 2022A Neural Network-based SAT-Resilient Obfuscation Towards Enhanced Logic Lockingcited by 2
  5. 2022Use of Cryptography in Malware Obfuscationcited by 2
  6. 2025Can LLMs Recover Program Semantics? A Systematic Evaluation with Symbolic Executioncited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Structural Anchors and Reasoning Fragility:Understanding CoT Robustness in LLM4Code
  2. 2026Analyzing and Improving Chain-of-Thought Monitorability Through Information Theory
  3. 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
  4. 2024VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoning
  5. 2025Generating Verifiable Chain of Thoughts from Exection-Traces
  6. 2025Chain of Draft for Software Engineering: Challenges in Applying Concise Reasoning to Code Tasks
  7. 2024Watch Your Steps: Observable and Modular Chains of Thought
  8. 2026Can LLMs Deobfuscate Binary Code? A Systematic Analysis of Large Language Models into Pseudocode Deobfuscation ↗