Who can help me , i want to code a simple crackme but i have a lot of problem
When i give a good serial ,he says me "Incorrect" !
I give you the sources !
Someone can complete
Thanks a lot
Sources:
.386P
Locals
jumps
include keygen.inc
.Model Flat, StdCall
.Data
NO_caractères db "",0
buffer db 50 dup (0)
Stockserial db 50 dup (0)
serial db 50 dup (0)
conversion db '%lu',0 ; pour convertir en décimale
msg MSGSTRUCT >
wc WNDCLASS >
hIce dd 0
IDD_nameproggy equ 3000
IDD_champname equ 1000 ;l'ID du champs de saisie du nom
IDD_champserial equ 1001 ;l'ID du champs de saisie du serial
IDD_register equ 1002
IDD_DLG equ 100 ;l'ID de la boite
Nameuser db "",0
titleok db "t'as trouvé",0
text db "Bravo !!",0
notok db "Mauvais sérial !",0
text1 db "Incorect",0
;----------------------------------------------------------------------------------------------
.Code
Start:
push 0
call GetModuleHandleA ; initialise le proggy
mov , eax
mov , CS_HREDRAW + CS_VREDRAW + CS_GLOBALCLASS
mov , offset WndProc
mov , 0
mov , 0
mov eax,
mov , eax
push 0
push offset Main_DlgProc
push 0
push IDD_DLG
push
call DialogBoxParamA ; affiche la boite
jmp finish
Generator: ; calcule et affiche le serial
push 050
push offset buffer ;on recopie
push IDD_champname ;le nom dans un buffer.par la
push hwnd ;meme occasion on récupère la longueur du nom
call GetDlgItemTextA
cmp eax, 00 ; eax=longueur du nom
jz blanc ;eax=0 ? oui, on saute
call key,offset buffer, eax ; sinon calcule le serial
call _wsprintfA, offset Stockserial, offset conversion, eax ;et convertit le
jmp stopproc
Key proc, Nom :dWord, Taille :Dword ; on crée la procédure Key et on
; déclare deux variables Nom et Taille
uses edi, ebx ;on sauvegarde edi et ebx
mov esi,00 ;---------- Esi va nous servir de stockage pour l'addition de
;nos lettres
mov edx, Taille ;------- La taille du nom dans edx
mov eax, 1 ;---------- on commence avec la première lettre
NextCar:
mov edi, Nom ;-------- le nom dans edi
movzx edi, byte ptr ; --- la valeur de edi (nom) + eax (No de lettre) -1
add esi, edi ;-- on additionne edi à esi (le stockage de notre serial)
inc eax ;--------- on passe à la lettre suivante
dec edx ;--------- on soustrait -1 à la taille de notre nom
jne NextCar ;----- et on continue à traiter le nom si c poa finit
mov eax,esi ;---- sinon on met esi (le resultat final du serial) dans eax
ret ; ------------ terminé , @+
Key EndP
register :
push 050
push offset serial ;on recopie
push IDD_champserial ;le nom dans un buffer.par la
push hwnd ;meme occasion on récupère la longueur du nom
call GetDlgItemTextA
mov ecx,offset serial
call _wsprintfA, offset serial, offset conversion, ecx ;
cmp esi,ecx
je ok1
jmp pasbon
ok1:
push 0
push offset TITLEOK
push offset text
push 0
call MessageBoxA
mov eax, 1
pasbon:
push 0
push offset notok
push offset text1
push 0
call MessageBoxA
mov eax, 1
blanc:
push offset NO_caractères ; si on a aucun caratère d'entré , on affiche un message
push 0
push WM_SETTEXT
push IDD_champserial
push hwnd
For one thing, you'll need a jmp after ok1, and pasbon!
When you get the correct message, at the moment it will also
print the incorrect message, and blank the name field in the
edit box!
Mirno