ollydbg using notes (17)
Reference
Book: "Encryption and decryption"
Video: Small Turtle decryption Series video
Example program now address: Http://pan.baidu.com/s/1pJ1AguZ
Hack this program's keygen (keygen)
The main interface of this program is two input boxes, followed by the Check,about button.
You can start with the two input fields, with the Od loader, right---and so touch fast call, search with input box API, can search getdlgitemtexta
(You can also enter the BP getdlgitemtexta in the Commod directly to the breakpoint under the specified API)
Picture 1
You can search for two of them.
Click to enter, view, front and rear code. The next breakpoint, rerun the program, can be found, these two are exactly the input name and key input box.
Press F8 and then run the program, you can find
Picture 2
This is the code of the keygen. It can be written in C.
Char name[100]={0}; scanf ("%s", name); int i; int esi=0; int ebx=0; int edx=0; For (I=0;i<strlen (name); ++i) { edx = name[i]; EBX = edx; EBX *= edx; ESI + = EBX; EBX = edx; EBX = ebx>>1; EBX = ebx+3; EBX = Ebx*edx; EBX-= edx; ESI + = EBX; ESI + = esi; } printf ("%x\n", ESI);
ollydbg using notes (17)