Stack tracing method and device in decompilation process and decompiler

A tracking device and decompilation technology, applied in the field of decompilation, can solve problems such as restricting the development of data flow analysis stage, and achieve the effect of improving correctness and readability

Active Publication Date: 2011-02-16
GUANGZHOU DIQING ELECTRONICS TECH
View PDF4 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

During the running of the program, the stack pointer register ESP is changing at any time, how to accurately identify parameters and local variables has become a difficult problem, thus restricting the development of the data flow analysis stage

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Stack tracing method and device in decompilation process and decompiler
  • Stack tracing method and device in decompilation process and decompiler
  • Stack tracing method and device in decompilation process and decompiler

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The solution of the present invention can be applied to the decompilation process of various language types. In the description of the following specific embodiments, the C decompilation process applied to the C decompiler is used for illustration.

[0020] see figure 2 As shown, it is a schematic flow chart of a stack trace method embodiment in the decompilation process of the present invention. As shown in the figure, the method of the present invention includes steps:

[0021] Step S101: Execute the instructions sequentially, and enter step S102;

[0022] Step S102: According to the influence of each instruction on the value of the stack pointer register ESP, corresponding addition and subtraction operations are performed on the preset integer variable, wherein the preset integer variable here is used to represent the value and function of the current ESP register of the system The offset between the values ​​of the system ESP registers on entry.

[0023] Accordin...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a stack tracing method and device in a decompilation process and a decompiler. The method comprises the steps of sequentially executing commands, carrying out corresponding addition and subtraction operations on a preset integer variable according to the influence of each command to a stack pointer register (ESP), wherein the preset integer variable is used for presentingan offset between a value of the current ESP register and a value of a system ESP register at a function inlet. The behavior of the ESP register is simulated through the preset integer variable, and the corresponding add and subtract operations are executed on the preset integer variable according to the influence of each command to the ESP register, thus stack operation behaviors of pushing stack and entering stack of a CPU are simulated, parameters and local variables in the function executing process are accurately recognized according to the preset integer variables, more accurate information can be provided for the decompilation process, and finally the exactness and the readability of a decompilation result are improved.

Description

technical field [0001] The invention relates to the technical field of decompilation, in particular to a stack trace method in the decompilation process, a stack trace device in the decompilation process and a decompiler. Background technique [0002] The decompilation process is an important part of software reverse engineering. It plays an important role in the analysis and understanding of software. It reads machine code and generates high-level language code similar to the original source code. The high-level language code is functionally similar to The original source code was consistent. The typical architecture of a decompiler that performs the decompilation process is divided into front-end, middle-end, and back-end. Among them, the front-end is a machine-dependent module that reads machine code, performs syntactic analysis and semantic analysis, and generates intermediate code; the middle-end Read the intermediate code, generate the control flow chart, and perform ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/30G06F9/45
Inventor 陈耿标林毓双
Owner GUANGZHOU DIQING ELECTRONICS TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products