Skip to content
Book Open access

PCodeTrans: Translate Decompiled Pseudocode to Trace-Level Equivalent Source Code

Oct 2026 · Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering · 0 citations · 59 references

Abstract

Decompilation remains foundational for binary analysis, yet conventional tools prioritize human readability over compilation success and test-validated runtime consistency. While recent large language model approaches attempt refining decompiled pseudocode, they often introduce semantic hallucinations. Operating statically without dynamic feedback or attempting whole binary repairs lacking scalability, these existing methods struggle to resolve genuine runtime divergences. We present PCodeTrans, a dynamic feedback driven framework that implements a loop of recompilation, validation, and alignment for the recovery of functional source code. Extracting a minimal yet globally consistent context, PCodeTrans employs an in situ substitutable engine. This mechanism injects isolated compiled functions directly into the original binary, natively preserving authentic execution environments. Utilizing trace-level alignment as a diagnostic objective, PCodeTrans leverages breakpoint matched differential tracing, generating precise runtime causal diagnostics that guide the model through iterative refinement resolving behavioral discrepancies. Evaluated across a comprehensive Linux and Windows Benchmark suite including Coreutils, Binutils, PuTTY, and SQLite3, PCodeTrans achieves substantial translation performance refining raw Hex-Rays outputs. Empirical results confirm PCodeTrans achieves 100% function-level compilation success and 99.5% test-validated consistency on unstripped binaries, resolving up to 85.6% of logic errors. Even for stripped executables, the framework maintains over 97% test-validated consistency, narrowing the gap between raw decompilation and functional source code. Surpassing existing baselines, PCodeTrans paves a practical path toward recovered source that can be recompiled, validated to pass test harnesses, and consumed by source-level security analysis and fuzzing tools.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.