This is a random very old crackme I found when I was bored with assignments, which is pretty easy and thought of sharing with you. Doing crackmes one by one 😀 Download: https://www.mediafire.com/?351rp7o9qmf97js
After opening in Olly and checking the string references we can see the congratulations string.
After following the string we see the following disassembly.
00401171 is our bad boy. If we check the jumps we see that first the string is being compared to 3 and
CMP DWORD PTR SS:[LOCAL.10],3 ; compare with 3JLE SHORT 00401171 ; jump if less than or equal to bad boyCMP DWORD PTR SS:[LOCAL.10],32 ; compare with 50JGE SHORT 00401171 ; jump if greater than or equal to bad boy
Next we have the algorithm for generating the serial and then it compares our entered serial with it. Let’s analyze it.
MOVSX EAX,BYTE PTR SS:[ECX+EBP-0B8] ; place the string byte in EAX, string[index++]INC ECX ; increment the counterXOR EAX,ECX ; xor eax with ecxADD EBX,EAX ; add the above result eax to ebx.CMP ECX,DWORD PTR SS:[LOCAL.10] ; compare ecx with the lengthJNE SHORT 0040110C ; if not zero, loopIMUL EAX,EAX,6 ; Multiply EAX by 6 and store in EAXSHL EBX,7 ; shift left 7, EBX << 7 or EBX * (2 ** 7)
Here’s the high level code of the algorithm written in C. So there it is the keygen and it says to write a tutorial so I did it 😉