2603.14855v1 Mar 16, 2026 cs.SE

PCodeTrans: 디컴파일된 의사 코드를 컴파일 가능하고 실행 가능한 동등 코드로 변환

PCodeTrans: Translate Decompiled Pseudocode to Compilable and Executable Equivalent

Zhuoran Li
Zhuoran Li
Citations: 0
h-index: 0
Zeyu Gao
Zeyu Gao
Citations: 367
h-index: 7
Siliang Qin
Siliang Qin
Citations: 21
h-index: 2

디컴파일은 바이너리 분석의 기본이며, 기존 도구들은 가독성을 우선시하는 경향이 있어 엄격한 재컴파일 가능성과 검증 가능한 런타임 정확성을 확보하는 데 어려움을 겪습니다. 최근 LLM 기반 접근 방식은 디컴파일된 의사 코드를 개선하려고 시도하지만, 일반적으로 가독성만을 최적화하거나 평가를 위해 정적 분석에 의존합니다. 이러한 방식은 정확성을 저해하는 "의미적 환각"을 유발할 수 있으며, 실제 런타임 오류를 해결하지 못하는 경우가 많습니다. 소프트웨어 현대화 및 취약점 해결과 같은 중요한 작업에서 복구된 코드는 컴파일될 뿐만 아니라 원래 바이너리의 동작을 정확하게 재현해야 합니다. 본 논문에서는 디컴파일, 재컴파일, 그리고 엄격한 함수 수준의 동적 검증 간의 간극을 해소하는 피드백 기반 프레임워크인 PCodeTrans를 제안합니다. PCodeTrans는 재컴파일 가능성을 보장하기 위해 최소한의 일관성 있는 컨텍스트를 추출한 다음, 컴파일된 함수를 수정되지 않은 바이너리에 직접 통합하는 "인시투 대체 엔진"을 사용하여 원본 실행 컨텍스트와 전역 의존성을 유지합니다. PCodeTrans는 세밀한 차등 추적을 통해 정확한 런타임 피드백을 생성하여 LLM이 의미적 불일치를 반복적으로 수정하도록 안내합니다. Coreutils 및 Binutils에 대한 평가 결과, PCodeTrans는 Raw Hex-Rays 출력 결과를 수정하는 데 있어 뛰어난 복구 성능을 보여주며, 압축되지 않은 바이너리에서 100%의 함수 수준 컴파일 가능성을 달성했습니다. 또한, 각각 99.55% 및 99.89%의 테스트 검증된 동작 일관성을 달성했습니다. 이를 통해 공식 테스트 스위트에서 드러난 76.56% 및 79.74%의 논리 오류를 해결했습니다. PCodeTrans는 뛰어난 견고성을 보여주며, 완전히 압축된 바이너리에서도 96% 이상의 동작 일관성을 유지합니다. 기존의 모든 기준 성능을 크게 능가하는 PCodeTrans는 디컴파일된 의사 코드를 컴파일 가능하고 실행 가능한 동등 코드로 안정적으로 변환하는 실용적인 방법을 제시합니다.

Original Abstract

Decompilation is foundational to binary analysis, yet conventional tools prioritize human readability over strict recompilability and verifiable runtime correctness. While recent LLM-based approaches attempt to refine decompiled pseudocode, they typically either optimize solely for readability or rely on static analysis for evaluation. This makes them prone to "semantic hallucinations" that compromise accuracy and fail to resolve actual runtime failures. For critical tasks like software modernization and vulnerability remediation, recovered code must not only compile but replicate the original binary's behavior. We present PCodeTrans, a feedback-driven framework that bridges the gap between decompilation, recompilation, and rigorous function-level dynamic validation. After extracting a minimal yet coherent context to guarantee recompilability, PCodeTrans employs an in situ substitutable engine to hot-swap the compiled function directly into the unmodified binary, natively preserving its authentic execution context and global dependencies. Guided by fine-grained differential tracing, PCodeTrans generates precise runtime feedback to iteratively guide an LLM in repairing semantic discrepancies. Evaluated on Coreutils and Binutils, PCodeTrans achieves unprecedented recovery performance when rectifying raw Hex-Rays outputs, attaining 100% function-level compilability on unstripped binaries alongside 99.55% and 99.89% test-validated behavioral consistency, respectively. In doing so, it resolves 76.56% and 79.74% of logic errors exposed by official test suites. Exhibiting exceptional resilience, PCodeTrans maintains over 96% behavioral consistency even on fully stripped binaries. By significantly outperforming all existing baselines, PCodeTrans paves a practical path to reliably translate decompiled pseudocode into compilable and executable equivalents.

0 Citations
0 Influential
3.5 Altmetric
17.5 Score

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!