ReCopilot: Reverse Engineering Copilot in Binary Analysis
Binary analysis tasks—such as function name recovery and variable type inference—rely heavily on expert knowledge and suffer from limited automation. To address this, we propose BinLLM, the first domain-specialized large language model for binary reverse engineering. Our method introduces (i) a novel context modeling mechanism that jointly encodes data-flow and call graphs to enhance semantic awareness; (ii) a test-time reasoning expansion strategy to strengthen long-chain logical reasoning; and (iii) a three-stage training paradigm comprising continual pretraining, supervised fine-tuning, and direct preference optimization. Evaluated on a comprehensive binary analysis benchmark, BinLLM achieves a 13% absolute accuracy improvement over state-of-the-art tools and general-purpose LLMs on both function naming and variable typing tasks. This advancement significantly reduces reliance on human expert knowledge while advancing automation in low-level program understanding.