Posted by MrEoUS on 1/29/2000, 11:22 am
128.109.131.47
Hello, guys!
I've just rewrote my Java keygen in TASM. It is not commented but I guess you don't need them (otherwise look through my java code ;).
.386
.model flat, STDCALLextrn GetStdHandle:proc
extrn WriteFile : proc
extrn ExitProcess : proc
extrn ReadFile : procSTD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
.data
cpRight db "MrEoUS Asm KeyGen for Acoustica",13,10,0
userPrompt db "Enter your name: ",0
companyPrompt db "Enter your company: ",0
bytesRead dd ?
stdOutput dd ?
stdInput dd ?
userName db 100 dup (?)
userCompany db 100 dup (?)
resultString db "Your serial is AC200-"
digitsPlace db 15 dup (0)
firstHash db 2Ah, 0EBh, 0Ch, 0BDh, 7Ch
db 7Dh, 3Dh, 0C5h, 0C9h, 1
db 7Ch, 0FAh, 0D4h, 68h, 0A2h
db 7Dh
secondHash db 0EAh, 14h, 2Bh, 3Fh, 57h
db 9Ch, 0F0h, 7Ch, 0Dh, 0Eh
db 0FFh, 2, 36h, 4Ah, 19h
db 0Eh
.code
main:
push STD_OUTPUT_HANDLE
call GetStdHandle
mov [stdOutput], eaxpush STD_INPUT_HANDLE
call GetStdHandle
mov [stdInput], eax
push offset cpRight
call outStr
add esp, 4push offset userPrompt
call outStr
add esp, 4push offset userName
call ReadStr
add esp, 4push offset companyPrompt
call outStr
add esp, 4push offset userCompany
call ReadStr
add esp, 4
push offset userName
push offset firstHash
call magicWand
add esp, 8
mov esi, eaxpush offset userCompany
push offset secondHash
call magicWand
add esp, 8
add eax, esixor edx, edx
mov ecx, 100000
div ecxpush edx
call PlaceDigits
add esp, 4
push offset resultString
call outStr
add esp, 4
push 0
call ExitProcess
magicWand proc
hash equ [ebp+8]
string equ [ebp+12]
push ebp
mov ebp, esp
push edi
push esimov edi, string
xor esi, esi
mov ebx, 1
jmp ifExpressioncycleBody:
movsx eax, byte ptr [edi]
mov edx, ebx
and edx, 15
mov ecx, [hash]
movsx ecx, byte ptr [ecx+edx]
imul ecx
add esi, eax
inc ebx
inc edi
ifExpression:
push dword ptr string
call strlen
add esp,4
cmp ebx, eax
jbe cycleBodymov eax, esi
pop esi
pop edi
mov esp, ebp
pop ebp
ret
magicWand endp
outStr proc
str equ [ebp+8]
push ebp
mov ebp, esppush 0
push offset bytesRead
push dword ptr str
call strlen
add esp, 4
push eax
push dword ptr str
push [stdOutput]
call WriteFilemov esp, ebp
pop ebp
ret
outStr endpReadStr proc
push ebp
mov ebp, esppush 0
push offset bytesRead
push 100
push dword ptr [ebp+8]
push [stdInput]
call ReadFilemov eax, [ebp+8]
mov edx, [bytesRead]
mov byte ptr [eax+edx-2], 0
mov esp,ebp
pop ebp
ret
ReadStr endp
strlen proc
str equ [ebp+8]
push ebp
mov ebp,esp
push edimov ecx, -1
xor eax, eax
mov edi, str
repne scasb
mov eax, -2
sub eax, ecxpop edi
mov esp, ebp
pop ebp
retn
strlen endpPlaceDigits proc
number equ [ebp+8]
push ebp
mov ebp, espmov ebx, 0
mov ecx, 10
mov eax, number
countDigits:
xor edx, edx
idiv ecx
inc ebx
test eax,eax
jnz countDigitsmov eax, number
storeDigits:
dec ebx
xor edx, edx
idiv ecx
add edx, 30h
mov byte ptr [digitsPlace+ebx], dl
test eax, eax
jnz storeDigitsmov esp, ebp
pop ebp
ret
PlaceDigits endp
end main
Now for that chickens deal!.
Regards, MrEoUS