.386
.model flat, stdcall
/includes libs y incs
.code
mov edi,offset Login
mov esi,offset Password
xor eax,eax
xor ebx,ebx
xor ecx,ecx
mov ebx,offset longitud
mov ebx,dword ptr [ebx]
mov al,byte ptr[edi+ebx-1]
mov cl,byte ptr[edi]
xor ebx,ebx
add eax,ecx
mov ecx,10
xor edx,edx
div ecx
add dl,32h
mov byte ptr[esi],dl
inc esi
here: xor eax,eax
xor ecx,ecx
mov al,byte ptr[edi+ebx]
mov cl,byte ptr[edi+ebx+1]
cmp cl,00h
jne Next
mov edx,offset longitud
mov edx,dword ptr [edx]
add ebx,1
cmp ebx,3
jl Bad
cmp edx,ebx
je Exit
jmp Bad
Exit: mov byte ptr[esi+ebx+1],00h
ret
Bad: mov eax,1
ret
Next: add eax,ecx
mov ecx,0Ah
xor edx,edx
div ecx
add dl,30h
mov byte ptr[esi+ebx],dl
inc ebx
jmp here
start:
end start