home *** CD-ROM | disk | FTP | other *** search
- .model tiny
-
- .386
-
- org 100h
-
- .data
-
- GroupLogo 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 ' ▀ │▓███████ │▓███████ │▓███████ │▓███████ │▓███████ │▓███████▄ ▄ █ ',13,10
- db ' █ │▓███████ │▓███████ │▓███████ │▓███████ │▓███████ █ ',13,10
- db ' █ │▓███████▄▄▄▄▄█▄█▓▀ │▓███████▄▄▄▄▄█▄████ │▓███████▀▀ ▀ ▀ █ ',13,10
- db ' █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀ █▀▀▀▀▀▀▀▀▀ ▀ ▀▀ ',13,10
- db ' .::[ u n i t e d · c r æ c k i n g · f o r c e ]::. █ ▀ █ Antibody<SAC> ',13,10
- db ' █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀ █▀▀▀▀▀▀▀▀▀ ▀ ▀▀ ',13,10
- db ' -----=====----- ',13,10
- db ' [■] mIRC v5.5 - Key Generator by Quantico [■] ',13,10
- db ' -----=====----- ',13,10
- db ' ',13,10,'$'
-
-
-
- IntroMsgOne db 13,10,'Enter a name please : ','$'
-
-
-
- ErrorMsg db 13,10,'Need 5-40 digits, try again please...',13,10,'$'
-
- ShowCodeMsg db 13,10,'Registration number : '
-
- CodeBuffer db 14h dup(0),13,10,'$'
-
- Code2Buffer db 10 dup(0)
-
- NameBuffer db 28h, 28h dup(0)
-
- Convert_Digs db '0123456789ABCDEF'
-
- namelength db 0
-
- datatable1 db 0Bh,06h,11h,0Ch,0Ch,0Eh,05h,0Ch
- db 10h,0Ah,0Bh,06h,0Eh,0Eh,04h,0Bh
- db 06h,0Eh,0Eh,04h,0Bh,09h,0Ch,0Bh
- db 0Ah,08h,0Ah,0Ah,10h,08h,04h,06h
- db 0Ah,0Ch,10h,08h,0Ah,04h,10h,00H
-
-
-
- .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, 2805h ; limits for string input
- lea edi, NameBuffer ;
- mov esi, offset namelength
- 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 eax, eax
- xor ebx, ebx
- xor edx, edx
- mov edx, 03
- xor ecx, ecx
- mov ecx, offset NameBuffer+5
- notnamelength:
- movzx esi, byte ptr [ecx]
- push ecx
- xor ecx, ecx
- mov cl, byte ptr [datatable1+eax]
- imul esi, ecx
- ; imul esi, byte ptr [datatable1+eax]
- pop ecx
- add ebx, esi
- inc eax
- cmp eax, 26h
- jle not26
- xor eax, eax
- not26:
- inc edx
- inc ecx
- cmp dl, byte ptr [namelength]
- jl notnamelength
-
- mov eax, ebx
- mov ecx, 0Ah
- xor edx, edx
- mov edi, offset CodeBuffer
- call Convert_Num
-
- xor eax, eax
- xor ebx, ebx
- xor edx, edx
- mov edx, 03
- mov ecx, offset [namebuffer+5]
- lessthanlength:
- movzx esi, byte ptr [ecx]
- movzx edi, byte ptr [ecx-01]
- imul esi, edi
- push ecx
- xor ecx, ecx
- mov cl, byte ptr [datatable1+eax]
- imul esi, ecx
- ; imul esi, byte ptr [datatable1+eax]
- pop ecx
- add ebx, esi
- inc eax
- cmp eax, 26h
- jle not26h
- xor eax, eax
- not26h:
- inc edx
- inc ecx
- cmp dl, byte ptr [namelength]
- jl lessthanlength
-
- mov edi, offset Code2Buffer
- xor edx, edx
- mov ecx, 0Ah
- mov eax, ebx
- call Convert_Num
-
- mov esi, offset CodeBuffer
- mov al, 00h
- call strlngth
- dec cl
-
- mov esi, offset CodeBuffer
- mov byte ptr [namelength], cl
- add esi, ecx
- mov byte ptr [esi], '-'
-
- mov esi, offset Code2Buffer
- mov al, 00h
- call strlngth
-
- dec cl
- mov esi, offset CodeBuffer
- mov edx, ecx
- mov cl, byte ptr [namelength]
- inc cl
- mov edi, offset Code2Buffer
- call cncstr
- mov byte ptr [esi-1], 00h
-
-
- ; esi = string one, ecx = length string one
- ; edi = string two, edx = length string two
- 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 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
-