Analyzing Chain of Thought (CoT) Approaches in Control Flow Code Deobfuscation Tasks
Seyedreza Mohseni, Sarvesh Baskar, Edward Raff, Manas Gaur

TL;DR
This paper investigates using Chain-of-Thought prompting with large language models to improve control flow deobfuscation in code, showing significant gains in structural and semantic recovery across benchmarks.
Contribution
It demonstrates that CoT prompting enhances large language models' ability to deobfuscate control flow, outperforming simple prompting methods in both structural and semantic metrics.
Findings
GPT-5 achieves 16% better control-flow graph reconstruction with CoT.
Semantic preservation improves by about 20.5% using CoT prompting.
Model performance varies with obfuscation complexity and original control flow.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
