Wednesday, 3 August 2011

Patching If Statements

What are If Statements?
The following picture shows a if statement.If statements test a condition:
DJ Crypter - Microsoft Visual Basic 2008 Express Edition_2011-08-04_10-16-33
We will be using Simple Assembly Explorer to patch if statements.
Click Me to Download

You will also need a program to patch.
Click me to Download
1.I have made a program which checks my name (Ultimate Coder).If the user enters a wrong name it informs the user that he/she entered a wrong name.

Program Manager_2011-08-04_10-31-53

2.Open Up SAE and browse to the place where you downloaded the program shown in the screen above.Right click the file then click on “Class Editor”.

Simple Assembly Explorer - by WiCKY Hu_2011-08-04_10-38-21

3.A window should appear.Browse to the place show in the picture and right click on the line shown below and click on edit.

Class Editor - CDocuments and SettingsFasialDesktopfPahltching If Statemnts

4.Another window should pop up.Now to patch the if statement we have to reverse it.Before, The if statement checked that if the value of MyName is Ultimate Coder.If yes then it would show That the name was correct else it showed that the name was not correct.The line selected in the picture above checks if the value of MyName is Ultimate Coder if  false then it would jump to to line 14 and show a message
box.We will change it so that if the value is false then it would show You Got My Name.Now change the operand to the selected one in the picture below.


5.So now instead of going to line 14 it goes straight to line 10 which says You Got My Name.Click on Ok and then press on save in the menu bar.Save it to a place and then run the program.Put in any value and you will always see You Got My Name.

Program Manager_2011-08-04_11-02-45

Congratulations.You have successfully patched a program.