Newbie Keygenning 1

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 3
JLE SHORT 00401171 ; jump if less than or equal to bad boy
CMP DWORD PTR SS:[LOCAL.10],32 ; compare with 50
JGE 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 counter
XOR EAX,ECX ; xor eax with ecx
ADD EBX,EAX ; add the above result eax to ebx.
CMP ECX,DWORD PTR SS:[LOCAL.10] ; compare ecx with the length
JNE SHORT 0040110C ; if not zero, loop
IMUL EAX,EAX,6 ; Multiply EAX by 6 and store in EAX
SHL 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 😉


Advertisements

3 thoughts on “Newbie Keygenning 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s