How To Disassemble The Program

Table of contents:

How To Disassemble The Program
How To Disassemble The Program

Video: How To Disassemble The Program

Video: How To Disassemble The Program
Video: Disassembly 101 - Intro To Disassemblers 2024, December
Anonim

In the course of professional activity, a programmer has to deal with many situations that require complex analysis of large fragments of source code or even entire applications. Researching successful solutions and practices, analyzing already implemented algorithms, or simply transferring another project to a team often makes it necessary to disassemble a program written by someone else.

How to disassemble the program
How to disassemble the program

Necessary

  • - program for viewing the source code;
  • - possibly reverse engineering and case tools.

Instructions

Step 1

Examine the flow of control transfer of the program being parsed. Identify the entry point. It, for example, is the main function in C and C ++, the beginning of an unnamed first-level structure block, ending with the END keyword with a dot, in pascal. Starting from the entry point, trace all the routes of calls to functions, procedures, methods of classes. Draw up a high-level control flow diagram. To simplify this process, you can use various reverse engineering tools. Analyze the source code of the structural elements of the parsed program in more detail. Draw control flow diagrams or flow diagrams for individual functions and methods.

Step 2

Analyze the data streams of the program being parsed. Identify the structures used to store information and transfer it between the functional elements of the application. Identify the code snippets that convert data from one form to another. Make a list of places in the program where information is received from the external environment, as well as its output somewhere. Reengineering tools and case tools (for example, for building inheritance diagrams and dependency diagrams) will also help with this kind of analysis.

Step 3

Disassemble the program, having a complete understanding of the principles of its operation. Based on the knowledge about the flow of transfer of control between the structural elements, as well as within them, knowledge of flows and types of data transformations, identify the main algorithms of work. Separate the algorithms for data processing and interface control. Select typical processing algorithms and classify them. Identify algorithms based on the interaction of various components (for example, search can be used both independently and as part of a sort). If necessary, draw up flowcharts of varying degrees of detail to illustrate the operation of the program.

Recommended: