home *** CD-ROM | disk | FTP | other *** search
- .model tiny
-
- .386
-
- org 100h
-
- .data
-
- GroupLogo db 13,10
- db ' . a . n . e . w . b . r . e . e . d .',13,10
- db ' ',13,10
- db ' ▓',13,10
- db ' ▄▀ ▀▒█▀ ▀▄▄',13,10
- db ' ░ ▄▄ ▄▄ ▄▀▄█▄ █ ░',13,10
- db ' ▄▀▄ █▀▀▄ █ ▄▄ ▄▄▄▄▄▄ ▄▄ ▄▄▄▄ ▄▄▀▄▀ █ ▄█ ▄█ ▀▄ ▄▄▄▄',13,10
- db ' ░ █ ██ ▄███ █▀▄ █▄▀▀▄▄▄ ▄▄▀▀▀▀▀▄▄▀█▀▀▄▄▄ █▌ █▀ █ ██▄█████▀ ▀▀ ▄▄▄▀▄ ░',13,10
- db ' ░▒▒▒▓▓█ █▓███▓██ ▄██ ▀▄██████ ▀█▄▄▄█▀ ▄██████ ██ ▄█▀ ██ ██▌ ▄██████ █▓▒░░',13,10
- db ' █ █▓█▀ █▒██▀█▓█ ▄██▀ ██ ███ ▄██▀ ██ ███▄▀ ███ ███ ▄██▀ ██ █ ░',13,10
- db ' ▒ █ █▒█ ██▀ S█▓█ ██▄▄█▀ ▄█████ ██▄▄█▀ ███ ▄ ███ ████ ██▄▄█▀ ▐▌ ▒',13,10
- db ' ▓ ▀▄ ▀ ▀ a█▒█ ▀██▓▓▒░ ▀█▀ ▀██ ▀███▓▓▒░ ■▀██▀ █▀RV▀██▀▀ ▀███▓▓▒ █ ▓',13,10
- db ' ▀■--─────C▀██ ──────────────────────────────────────────────---■▀',13,10
- db ' ',13,10,'$'
-
-
-
- IntroMsgOne db 13,10,' [■] Teleport Pro v1.29 - Key Generator by Quantico [■]',13,10
- db '',13,10
- db 13,10,' Enter a name : ','$'
-
-
- ErrorMsg db 13,10,' Need 5-20 digits, try again...',13,10,'$'
-
- ShowCodeMsg db 13,10,' Registration number : '
-
- CodeBuffer db 10 dup(0),13,10,'$'
-
- NameBuffer db 18h, 19h dup(0)
-
- Convert_Digs db '0123456789ABCDEF'
-
- namelength db 0
-
- .code
-
- .startup
-
- main proc near
- mov ah, 09h ;
- lea edx, GroupLogo ;
- int 21h ; show group logo
-
- mov ah, 09h ;
- lea edx, IntroMsgOne ;
- int 21h ; show intro and ask for input
-
- mov bx, 1405h ; limits for string input
- lea edi, NameBuffer ;
- call getstr ; read user input
- jc @error ;
- xor eax, eax ; clear eax
- call keygen ; create serial number
-
- mov ah, 09h ;
- lea dx, ShowCodeMsg ;
- int 21h ; print serial number
- jmp @exit ; finished, quit
- @error:
- mov ah, 09h
- lea dx, ErrorMsg
- int 21h
- @exit:
- mov al, 00h ;
- mov ah, 4Ch ;
- int 21h ; terminate program
- main endp
-
- keygen proc near
- xor ebx, ebx
- mov esi, 5DFEE4A4h
- lea edi, NameBuffer+2
- lea eax, namelength
- movsx eax, byte ptr [namelength]
- add eax, -04h
- @back: cmp ebx, eax
- jae @gogo
- xor esi, [edi+ebx]
- test bl, 40h
- jz @below
- inc ebx
- @below: inc ebx
- jmp @back
- @gogo: mov eax, esi
- xor edx, edx
- mov ecx, 0000000Ah
- lea edi, CodeBuffer
- call convert_num
- ret
- keygen endp
-
-
-
- ; get string from user
- ; input :
- ; edi = pointer to buffer
- ; bl = min length
- ; bh = max length
- ; output :
- ; CF error, cx number of bytes read
- getstr proc near
- push dx ; save dx
- mov dx, di ;
- mov ah, 0Ah ;
- int 021h ; get user input
-
- movsx ecx, byte ptr [edi + 1] ; get number of digits
-
- mov byte ptr [edi + ecx + 2], 00h
-
- cmp cl, bh ; check maximum
- jg @@0
- cmp cl, bl ; check minimum
- jl @@0
- mov [namelength], cl ; store length
- xor ch, ch
- clc ; clear CF
- jmp @@1
- @@0:
- stc ; set CF (carry flag)
- @@1:
- pop dx ; restore dx
- ret
- getstr endp
-
- Convert_Num proc near
- pushf
- pushAD
-
- sub esp, 4
- mov ebp,esp
-
- cld
- mov esi, edi
- push esi
-
- ;--- loop for each digit
-
- sub bh, bh
- mov dword ptr [ebp], eax ;save low word
- mov dword ptr [ebp+4], edx ;save high word
- sub esi, esi ;count digits
-
- Connum1:
- inc esi
- mov eax, dword ptr [ebp+4] ;high word of value
- sub edx, edx ;clear for divide
- sub ebx, ebx
- div ecx ;divide, DX gets remainder
- mov dword ptr [ebp+4],eax ;save quotient (new high word)
-
- mov eax, dword ptr [ebp] ;low word of value
- div ecx ;divide, DX gets remainder
- ; (the digit)
- mov dword ptr [ebp], eax ;save quotient (new low word)
-
- mov bl, dl
- mov al, byte ptr [Convert_Digs+ebx] ;get the digit
- stosb ;store
-
- cmp dword ptr [ebp], 0 ;check if low word zero
- jne Connum1 ;jump if not
- cmp dword ptr [ebp+4], 0 ;check if high word zero
- jne Connum1 ;jump if not
-
- sub al, al
- stosb ;store the terminator
-
- ;--- reverse digits
-
- pop ecx ;restore start of string
- xchg ecx, esi
- shr ecx, 1 ;number of reverses
- jz Connum3 ;jump if none
-
- xchg edi, esi
- sub esi, 2 ;point to last digit
-
- Connum2 :
- mov al, byte ptr [edi] ;load front character
- xchg al, byte ptr [esi] ;swap with end character
- stosb ;store new front character
- dec esi ;back up
- loopd Connum2 ;loop back for each digit
-
- ;--- finished
-
- Connum3 :
- add esp, 4
-
- popad
- popf
- ret
- endp ;Convert_Num
-
- end main