home *** CD-ROM | disk | FTP | other *** search
- ; Author can be email at: stone@one.se ;>
-
- .model SMALL
-
- .stack 100h
-
- .386
-
-
-
- .DATA
-
- input DB 39,0
-
- uname DB 39 dup (0h)
-
-
-
- d47503c dd 0e3h ; This is used as initial value for IMUL
-
-
-
- valid DB 10,13,'A valid key is: '
-
- realkey db 12 dup (30h) ; Serial number is 12 digits long
-
- enstr db 10,13,'$' ; Write termination
-
-
-
- flaffer db 39 dup (0) ; Used for the high/low bit cleaned string
-
-
-
- introtxt DB ' QuickCab 6.2 *Keymaker* ',10,13
-
- DB '──────────────| STONE |──────────────',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 Æ C K I N G f O R C E ',10,13
-
- DB '[wIN95/NT]─────────────────────[oCT 1997]',10,13
-
- DB 'Enter your username: ','$'
-
-
-
- DB '2nd&mi' ; Personal tag - not used
-
-
-
- .CODE
-
- MOV AX, @DATA ; Make DS&ES point to the DATA
-
- MOV DS, AX
-
- MOV ES, AX
-
-
-
- LEA EDX, [introtxt] ; Write intro text
-
- MOV AH, 9h
-
- INT 21h
-
-
-
- MOV AX, 0A00h
-
- LEA EDX, [input]
-
- INT 21h ; Get buffered input
-
-
-
- movzx ebx, [input+1] ; Fetch length
-
- cmp ebx,0 ; if zero - exit
-
- jz exit
-
-
-
- call upcase ; Uppercase input string
-
- call cleanit ; Clean it for high/lowbit chars
-
-
-
- xor esi,esi ; Zero Counter
-
- NextByte:
-
- movzx eax, byte ptr [input+1] ; Get length
-
- CALL genkey ; Deciede on a letter to use for num-gen
-
- movzx ebx,[flaffer+edx]
-
-
-
- nextitera: ; Generate a digit of the serial
-
- MOV EAX,0Ah
-
- CALL GENKEY
-
- DEC BL
-
- JNZ nextitera
-
-
-
- add byte ptr [realkey+esi],dl ; Make it a digit
-
- inc esi ; next byte
-
- cmp esi,12d
-
- jnz nextbyte
-
-
-
- mov ah,09h ; Write the key
-
- lea edx,[valid]
-
- int 21h
-
-
-
- exit:
-
- MOV AX,4C00h ; Exit, error code = 0
-
- INT 21h
-
-
-
-
-
- genkey proc ; Work horse of the keymaker
-
- IMUL EDX,[d47503C],08088405h
-
- INC EDX
-
- MOV [d47503C],EDX
-
- MUL EDX
-
- MOV EAX,EDX
-
- RET
-
- genkey endp
-
-
-
- upcase PROC
-
- lea edx, [uname]
-
- mov esi,edx
-
- nextletter: ; EBX = No. of letters
-
- MOV AL,[EDX] ; EDX = INTEXT
-
- CMP AL,61h
-
- JB notlowcase
-
- CMP AL,7Ah
-
- JA notlowcase
-
- SUB AL,20h ; Lowcase - make it upcase
-
- MOV [ESI],AL
-
- notlowcase:
-
- INC EDX
-
- INC ESI
-
- DEC EBX
-
- TEST EBX,EBX
-
- JNZ nextletter
-
- Ret
-
- Upcase endp
-
-
-
- cleanit PROC
-
- lea edi, [flaffer] ; Store output here
-
- lea esi, [uname] ; Get input from here
-
- movzx ecx,[input+1] ; Fetch the length
-
- nextb:
-
- movzx eax,byte ptr [esi] ; Fetch a letter
-
- cmp eax,48 ; Is it low bit?
-
- jb skip
-
- cmp eax,90 ; is it high bit?
-
- jg skip
-
- movsb ; no - copy it as it is
-
- dec ecx ; move on to next letter
-
- jnz nextb
-
- ret
-
- skip:
-
- inc esi ; skip it
-
- dec byte ptr [input+1] ; decrease length of string
-
- dec ecx ; next letter
-
- jnz nextb
-
- ret
-
- cleanit ENDP
-
-
-
- END
-
-
-
-
-
-
-
-