Decompilation technology has long been a pivotal tool in the field of computer software reverse engineering. Traditional decompilation methods frequently result in code that is structurally incomplete, semantically incoherent, and of low readability. With the advent of Large Language Models (LLMs) and their application to decompilation tasks, the field of decompilation research has witnessed notable advancements. Nevertheless, the performance of these models in decompiling C language programs on ARM platforms remains less than optimal. In this paper, we propose an inlined data processing algorithm to address the prevalent phenomenon of inlined data in ARM architecture, thereby enhancing the quality of the training dataset. Leveraging this, we have developed ARMQwen2, the first LLM that significantly improves the decompilation output quality of C programs on the ARM platform through fine-tuning techniques. We evaluate it under two test benchmarks and two different optimization levels, and the experimental results demonstrate that ARMQwen2 attains a re-executablility rate of up to 55%, which is more than twice as high as Ghidra, the current state-of-the-art decompiler, and 20% higher than the advanced large language model GPT-4o-mini. In terms of re-compilability and edit similarity, ARMQwen2 achieves an average of 90% and 60% respectively.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

ARMQwen2: Enhancing C Language Decompilation on ARM Platform Using Large Language Model

  • Jiahan Liu,
  • Jian Lin,
  • Haoran Liu,
  • Yonghao Wang,
  • Jing Jing

摘要

Decompilation technology has long been a pivotal tool in the field of computer software reverse engineering. Traditional decompilation methods frequently result in code that is structurally incomplete, semantically incoherent, and of low readability. With the advent of Large Language Models (LLMs) and their application to decompilation tasks, the field of decompilation research has witnessed notable advancements. Nevertheless, the performance of these models in decompiling C language programs on ARM platforms remains less than optimal. In this paper, we propose an inlined data processing algorithm to address the prevalent phenomenon of inlined data in ARM architecture, thereby enhancing the quality of the training dataset. Leveraging this, we have developed ARMQwen2, the first LLM that significantly improves the decompilation output quality of C programs on the ARM platform through fine-tuning techniques. We evaluate it under two test benchmarks and two different optimization levels, and the experimental results demonstrate that ARMQwen2 attains a re-executablility rate of up to 55%, which is more than twice as high as Ghidra, the current state-of-the-art decompiler, and 20% higher than the advanced large language model GPT-4o-mini. In terms of re-compilability and edit similarity, ARMQwen2 achieves an average of 90% and 60% respectively.