home *** CD-ROM | disk | FTP | other *** search
- .model tiny
-
- .386
-
- org 100h
-
- .data
-
- GroupLogo DB ' AxMan v2.20 Official Release *keygen* ',10,13
- DB '──────────────| QUANTICO! |──────────────',10,13
- DB ' ▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ',10,13
- DB ' ███ ███ ███ ███▄▄▄ ',10,13
- DB ' ███▄ ███ ███▄ ███ ',10,13
- DB ' ▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀ ▀▀▀ ',10,13
- DB '─────────────────────────────────────────',10,13
- DB 'u N I T E D c R A C K I N G f O R C E ',10,13
- DB '[wIN95/NT]─────────────────────[Sep 1998]',10,13
- db ' ',13,10,'$'
-
-
-
- IntroMsgOne db 13,10,' [■] AxMan v2.20 - Key Generator by Quantico [■]',13,10
- db '',13,10
- db 13,10,' Enter a name : ','$'
-
- IntroMsgTwo db 13,10,' Enter a company : ','$'
-
-
- ErrorMsg db 13,10,' Need 5-20 digits, try again...',13,10,'$'
-
- ShowCodeMsg db 13,10,' Registration number : '
-
- CodeBuffer db 10h dup(0),13,10,'$'
-
- Code2Buffer db 10h dup(0)
-
- NameBuffer db 18h, 50h dup(0)
-
- CompBuffer db 18h, 19h dup(0)
-
- sweetheart db 'SweetHeart'
-
- Convert_Digs db '0123456789ABCDEF'
-
- namelength db 0
-
- complength 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 ;
- mov esi, offset namelength
- call getstr ; read user input
- jc @error ;
- xor eax, eax ; clear eax
-
- mov ah, 09h
- mov edx, offset IntroMsgTwo
- int 21h
-
- mov bx, 1405h
- lea edi, CompBuffer
- mov esi, offset complength
- call getstr ; get the company
- jc @error
- xor eax, 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
-
- mov esi, offset NameBuffer+2
- movzx ecx, byte ptr [namelength]
- mov edi, offset CompBuffer+2
- movzx edx, byte ptr [complength]
- call cncstr
- movzx ecx, byte ptr [esi-1]
- mov edi, offset sweetheart
- mov edx, 0Ah
- call cncstr
- mov edx, esi
- call nextpart
- mov eax, esi
-
- xor edx, edx
- mov ecx, 0000000Ah
- lea edi, Code2Buffer
- call convert_num
-
- mov ecx, 03
- mov esi, offset Code2Buffer
- mov edi, offset CodeBuffer
- rep movsb
- mov byte ptr [edi], '-'
- inc edi
- mov ecx, 03
- rep movsb
- mov byte ptr [edi], '-'
- inc edi
- mov ecx, 03
- rep movsb
-
- mov esi, offset CodeBuffer
- mov al, 00
- call strlngth
- cmp ecx, 0Ch
- je correct
- mov byte ptr [esi+10], '0'
-
- correct:
- ret
- keygen endp
-
-
- nextpart proc near
-
- xor esi, esi
- @shl_esi:
- shl esi, 04
- inc edx
- movsx eax, byte ptr [edx-01]
- add esi, eax
- mov eax, esi
- and eax, 0F0000000h
- je forward
- mov ecx, eax
- shr ecx, 18h
- xor esi, ecx
- forward:
- not eax
- and esi, eax
- cmp byte ptr [edx], 00
- jne @shl_esi
-
- ret
- nextpart 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 byte ptr [esi], 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
-
- ; concatenate 2 strings
- ; input :
- ; esi = string one, ecx = length string one
- ; edi = string two, edx = length string two
- ; output :
- ; esi = string one + string two, edx = new length
- cncstr proc near
- xor eax, eax ;
- xor ebp, ebp ; clear register
-
- push esi ; save esi
-
- add esi, ecx ; set esi at end of string one
- add ecx, edx ; adjust new length
- @cnc:
- mov al, byte ptr [edi + ebp] ; get digit of string two
- mov byte ptr [esi + ebp], al ; place digit after string one
- inc ebp ;
- dec edx ;
- jnz @cnc ; loop for length of string two
-
- pop esi ; restore esi
- mov byte ptr [esi - 1], cl ; update new length
- ret
- cncstr endp
-
- ; returns ECX= length of String in DS:ESI - terminated by CHAR in AL
- ; registers changed: ECX
- ; Assumes ES=DS
-
- strlngth PROC
- pushf
- push edi
- push esi
- push edx
-
- mov edi,esi
- xor ecx,ecx
- dec ecx
- cld
- repnz scasb
- xor edx,edx
- sub edx,ecx
- dec edx
- mov ecx,edx
-
- pop edx
- pop esi
- pop edi
-
- popf
- Ret
-
- strlngth endp
-
-
- end main
-