Snoop
November 15th, 2002, 01:33
Hi all,
I am doing a crackme that i had to do a couple of work on it to do my homework!. Everything i had to do is done. I understand how the serial is generated with the name and every thing. Since i am more than a newbie
even if the work on this crackme is finish i wanted to go further and learn more. So i decide to do a keygen for the crackme. Nothing to write my mom about, but still, for a newbie it's just ok. I am using radASM and the keygen is in MASM. I could read asm good, but to write it and code with it it's another thing. It's not my programming language as i work with a 4gl in life. Ok nof said.
What i did is only took the code block that generate the serial in the dead listing (am using ollydbg) and took it to generate in the keygen. Brefly, the only thing to do is recreate the same thing that the proggie does... But when i click on the generate button i have a window error message telling me that the application is using blabla part of the memory and that this cannot be "read"...
In other word, it stop! I suppose that in my routine i probably use a register that am not suppose to.. anyway. Could somebody point me out as i am really confuse
Here is the code for those who could see the problem write away and below i will include the src with the exe. Waiting a reply i will continue and try to figure out what is the problem.
Am on win2k, this prog is writting with RadASM v1.1.2.7, and link and build with MASM v5.
Keep in mind that i am a real newbie in asm programming so please dont come up with some complex explanation.
Snoop
Keygen proc
xor edx, edx
xor eax, eax
xor ebx, ebx
mov edi, offset buffer2 ; EDI will have the serial generated
mov esi, offset buffer ; ESI hold the name entered
mov ecx,10
JMP1:
MOVSX EAX,BYTE PTR DS:[ESI+EBX] ; Pickup character
test al, al ; Verify if finish
jz JMP2 ; If finish then get see u!
CDQ
IDIV ECX
XOR EDX,EBX
ADD EDX,2
CMP DL,10
JGE jmpsub
MOV BYTE PTR DS:[EDI+EBX],DL
INC EBX
JMP JMP1
jmpsub:
SUB DL,10
JMP2:
xor edx, edx
xor eax, eax
xor ebx, ebx
ret
Keygen endp
end start
** this is a refresh version
I am doing a crackme that i had to do a couple of work on it to do my homework!. Everything i had to do is done. I understand how the serial is generated with the name and every thing. Since i am more than a newbie

What i did is only took the code block that generate the serial in the dead listing (am using ollydbg) and took it to generate in the keygen. Brefly, the only thing to do is recreate the same thing that the proggie does... But when i click on the generate button i have a window error message telling me that the application is using blabla part of the memory and that this cannot be "read"...
In other word, it stop! I suppose that in my routine i probably use a register that am not suppose to.. anyway. Could somebody point me out as i am really confuse

Here is the code for those who could see the problem write away and below i will include the src with the exe. Waiting a reply i will continue and try to figure out what is the problem.
Am on win2k, this prog is writting with RadASM v1.1.2.7, and link and build with MASM v5.
Keep in mind that i am a real newbie in asm programming so please dont come up with some complex explanation.

Snoop
Keygen proc
xor edx, edx
xor eax, eax
xor ebx, ebx
mov edi, offset buffer2 ; EDI will have the serial generated
mov esi, offset buffer ; ESI hold the name entered
mov ecx,10
JMP1:
MOVSX EAX,BYTE PTR DS:[ESI+EBX] ; Pickup character
test al, al ; Verify if finish
jz JMP2 ; If finish then get see u!
CDQ
IDIV ECX
XOR EDX,EBX
ADD EDX,2
CMP DL,10
JGE jmpsub
MOV BYTE PTR DS:[EDI+EBX],DL
INC EBX
JMP JMP1
jmpsub:
SUB DL,10
JMP2:
xor edx, edx
xor eax, eax
xor ebx, ebx
ret
Keygen endp
end start
** this is a refresh version