How do people reverse-engineer compiled applications to get the source code?

308 views

I know the long answer to this question would probably be the equivalent of a college course, but can you summarise how tech people do this?

If you open game.exe with a text editor you’re just going to get what looks like a scrambled mess of characters, so how would one convert this into readable source code?

In: 5

12 Answers

Anonymous 0 Comments

That scrambled mess is actually code to tell the computer to do stuff. And while you can’t infer the intentions of the code, you can know what it is doing in what order. For example this is what compiling might look like

**Code: (Assign the number 1 to an integer named playerId)**

int playerId = 1;

That gets compiled to assembly language which is a human labelled version of the base machine code. And it might look like this:

**Assembly: (Assign the number 1 to an integer named R0)**

IMM R0, 0x80
LOAD R0, R0
IMM R1, 0x1
STORE R0, R1

That is then converted into binary to be stored in a binary file like an exe file. And that might look like this.

**Machine Code:**

0x 60 00 00 80
0x A4 00 00 00
0x 60 01 00 01
0x 08 00 00 01

Or as you would see in the file something like this:

01100000000000000000000010000000
10100100000000000000000000000000
01100000000000010000000000000001
1000000000000000000000000001

Or:

>0110000000000000000000001000000010100100000000000000000000000000011000000000000100000000000000011000000000000000000000000001

Reverse engineering code, is just doing that process in reverse. Yes we no longer know that R0 was playerId, but we don’t really care, and we can infer that if we look hard enough.

You are viewing 1 out of 12 answers, click here to view all answers.