home *** CD-ROM | disk | FTP | other *** search
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- ; CUTE FTP KEY FILE GENERATOR v1.01 97-10-11 JAMMER / UCF
-
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- ; Version 2.0 FINAL - Totally new key for v2.0
-
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- ; Tested on CFTP v2.0
-
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
- ;
-
- ; BPX #0137:0043D5BF (cutftp32)
-
- ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-
-
-
- .model Tiny,STDcall
-
- .code
-
- .386
-
- .radix 16
-
- org 100h
-
-
-
- TableInit equ 019fh
-
-
-
- Start:
-
- push offset Info
-
- call Print
-
-
-
- push offset JamFill
-
- push offset Keyfile
-
- push 100
-
- call FillBlock
-
-
-
- push offset CryptTable
-
- push offset Keyfile
-
- push 20
-
- call CopyBlock
-
-
-
- push offset NameQ
-
- call Print
-
- push offset Keyfile+28
-
- push 70
-
- call GetName
-
- or ax,ax
-
- jnz GotName
-
- mov ax,4cffh
-
- int 21h
-
-
-
- GotName: push offset Keyfile
-
- call CalcCrc
-
- push offset Keyfile+20
-
- push 1c
-
- call Encrypt
-
-
-
- push dword ptr TableInit
-
- push offset CryptTable
-
- call MakeCryptTable
-
-
-
- push offset Keyfile
-
- push 4
-
- call Encrypt
-
-
-
- push offset Filename
-
- push offset Keyfile
-
- push 100
-
- call Writefile
-
- cmp ax,100
-
- jz WriteOk
-
- push offset WriteError
-
- call print
-
- mov ax,4cff
-
- int 21
-
-
-
- WriteOk: push offset copyfile
-
- call Print
-
- mov ax,4c00
-
- int 21
-
-
-
- Print proc Txt:WORD
-
- pusha
-
- mov si,[TXT]
-
- PLoop: lodsb
-
- or al,al
-
- jz PExit
-
- mov ah,2
-
- mov dl,al
-
- int 21h
-
- jmp short PLoop
-
- PExit: popa
-
- ret
-
- Print endp
-
-
-
- WriteFile proc WriteLen:WORD,Source:WORD,FName:WORD
-
- LOCAL Result:WORD
-
- mov [Result],0
-
- pusha
-
- mov ax,3c01
-
- xor cx,cx
-
- mov dx,[FName]
-
- int 21
-
- jc WFOut
-
- mov bx,ax
-
- mov ah,40
-
- mov cx,[WriteLen]
-
- mov dx,[Source]
-
- int 21
-
- jc WFOut
-
- mov [Result],ax
-
- mov ah,3e
-
- int 21
-
- WFOut: popa
-
- mov ax,[Result]
-
- ret
-
- WriteFile endp
-
-
-
- GetName proc MaxLen:WORD,RegName:WORD
-
- LOCAL NamLen:WORD
-
- pusha
-
- mov cx,[MaxLen]
-
- add cx,4
-
- sub sp,cx
-
- mov bx,sp
-
- push bx
-
- mov word ptr [bx],cx
-
- mov dx,bx
-
- mov ah,0ah
-
- int 21h
-
- pop bx
-
- movsx ax,[bx+1]
-
- or ax,ax
-
- jz GNX
-
- mov cx,ax
-
- mov [NamLen],ax
-
- lea si,[bx+2]
-
- mov di,[RegName]
-
- rep movsb
-
- GNX: xor ax,ax
-
- stosb
-
- mov ax,[MaxLen]
-
- add ax,4
-
- add sp,ax
-
- popa
-
- mov ax,[NamLen]
-
- clc
-
- ret
-
- GetName endp
-
-
-
- FillBlock proc FillSize:WORD,Dest:WORD,Source:WORD
-
- LOCAL SrcLen:WORD
-
- pusha
-
- xor ax,ax
-
- mov cx,0fffe
-
- mov di,[Source]
-
- rep scasb
-
- neg cx
-
- mov [SrcLen],cx
-
- mov ax,[FillSize]
-
- cwd
-
- div cx
-
-
-
- mov di,[Dest]
-
- mov cx,ax
-
- FBLoop: push cx
-
- mov si,[Source]
-
- mov cx,[SrcLen]
-
- rep movsb
-
- pop cx
-
- loop FBLoop
-
- mov si,[Source]
-
- mov cx,dx
-
- or cx,cx
-
- jz FBOut
-
- rep movsb
-
-
-
- FBOut: popa
-
- ret
-
- FillBlock endp
-
-
-
- CopyBlock proc uses si di, BlockLen:WORD,Dest:WORD, Source:WORD
-
- mov si,[Source]
-
- mov di,[Dest]
-
- mov cx,[BlockLen]
-
- shr cx,2
-
- jz CB
-
- rep movsd
-
- CB: mov cx,[BlockLen]
-
- and cx,3
-
- jz CBOut
-
- rep movsb
-
- CBOut: ret
-
- CopyBlock endp
-
-
-
- MakeCryptTable proc TableOfs:WORD,Crypt:DWORD
-
- xor esi,esi
-
- movsx edi,[TableOfs]
-
- MakeLoop: call CryptTableProc
-
- movsx edx,ax
-
- xor edx,esi
-
- inc esi
-
- mov [edi],edx
-
- add edi,4
-
- cmp esi,8
-
- jl MakeLoop
-
- ret
-
- MakeCryptTable endp
-
-
-
- CryptTableProc proc
-
- mov ecx,[Crypt]
-
- lea edx,[ecx*2+ecx]
-
- lea edx,[edx*4+ecx]
-
- shl edx,4
-
- add edx,ecx
-
- shl edx,8
-
- sub edx,ecx
-
- lea ecx,[edx*4+ecx+269ec3]
-
- mov [Crypt],ecx
-
- mov eax,ecx
-
- shr eax,10
-
- and ax,7fff
-
- ret
-
- CryptTableProc endp
-
-
-
- Encrypt proc Count:WORD,EncryptOfs:WORD
-
- cmp [Count],0
-
- jz EncryptOut
-
- EncryptLoop: movsx esi,[EncryptOfs]
-
- push si
-
- push offset CryptTable
-
- call EncryptMain
-
- add [EncryptOfs],8
-
- dec [Count]
-
- jnz EncryptLoop
-
- EncryptOut: ret
-
- Encrypt endp
-
-
-
- EncryptMain proc uses esi edi, TableOfs:WORD,InData:WORD
-
- push bp
-
- movsx ecx,word ptr [TableOfs]
-
- mov esi,ecx
-
- mov bp,[InData]
-
- mov ebx,[bp]
-
- mov edi,[bp+4]
-
- mov ecx,[si]
-
- add ecx,ebx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+04]
-
- mov eax,edi
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+08]
-
- mov edx,ebx
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor edi,eax
-
- mov edx,[si+0C]
-
- mov ecx,edi
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+10]
-
- mov eax,ebx
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+14]
-
- mov edx,edi
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si+18]
-
- mov ecx,ebx
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+1C]
-
- mov eax,edi
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si]
-
- add edx,ebx
-
- mov ecx,esi
-
- push edx
-
- call EncryptLookup
-
- xor edi,eax
-
- mov edx,[si+04]
-
- mov ecx,edi
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+08]
-
- mov eax,ebx
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+0C]
-
- mov edx,edi
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si+10]
-
- mov ecx,ebx
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+14]
-
- mov eax,edi
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+18]
-
- mov edx,ebx
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor edi,eax
-
- mov edx,[si+1C]
-
- mov ecx,edi
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov eax,[si]
-
- add eax,ebx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+04]
-
- mov edx,edi
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si+08]
-
- mov ecx,ebx
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+0C]
-
- mov eax,edi
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+10]
-
- mov edx,ebx
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor edi,eax
-
- mov edx,[si+14]
-
- mov ecx,edi
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+18]
-
- mov eax,ebx
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+1C]
-
- mov edx,edi
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si+1C]
-
- mov ecx,ebx
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+18]
-
- mov eax,edi
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+14]
-
- mov edx,ebx
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor edi,eax
-
- mov edx,[si+10]
-
- mov ecx,edi
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov ecx,[si+0C]
-
- mov eax,ebx
-
- add eax,ecx
-
- mov cx,si
-
- push eax
-
- call EncryptLookup
-
- xor edi,eax
-
- mov ecx,[si+08]
-
- mov edx,edi
-
- add edx,ecx
-
- mov cx,si
-
- push edx
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov edx,[si+4]
-
- mov ecx,ebx
-
- add ecx,edx
-
- push ecx
-
- mov cx,si
-
- call EncryptLookup
-
- xor edi,eax
-
- mov eax,[si]
-
- add eax,edi
-
- push eax
-
- mov cx,si
-
- call EncryptLookup
-
- xor ebx,eax
-
- mov [bp],edi
-
- mov [bp+4],ebx
-
- pop bp
-
- ret
-
- EncryptMain endp
-
-
-
- EncryptLookup proc uses esi, Crypt:DWORD
-
- mov eax,[Crypt]
-
- xor esi,esi
-
- mov si,cx
-
- mov ecx,eax
-
- shr ecx,18
-
- movsx edx,byte ptr [esi+ecx+20]
-
- mov ecx,eax
-
- shr ecx,10
-
- and ecx,0ff
-
- shl edx,8
-
- movsx ecx,byte ptr [esi+ecx+120]
-
- or edx,ecx
-
- xor ecx,ecx
-
- mov cl,ah
-
- and eax,0ff
-
- shl edx,8
-
- movsx ecx,byte ptr [esi+ecx+220]
-
- movsx eax,byte ptr [esi+eax+320]
-
- or edx,ecx
-
- shl edx,8
-
- or edx,eax
-
- mov eax,edx
-
- shl eax,0bh
-
- shr edx,15
-
- or eax,edx
-
- ret
-
- EncryptLookup endp
-
-
-
- CalcCrc proc Key:WORD
-
- pusha
-
- mov bx,[Key]
-
- xor eax,eax
-
- xor edx,edx
-
- mov cx,78-28
-
- mov si,[Key]
-
- add si,28
-
- CrcLoop: lodsb
-
- add edx,eax
-
- loop CrcLoop
-
- mov bx,[Key]
-
- mov dword ptr [bx+20],edx
-
- popa
-
- ret
-
- CalcCrc endp
-
-
-
- info db 'CUTEFTP v2.0 FINAL *KEYMAKER* [JAM]',0dh,0ah
-
- db '───────────── JAMMER ─────────────',0dh,0ah
-
- db ' ▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ',0dh,0ah
-
- db ' ███ ███ ███ ███▄▄▄ ',0dh,0ah
-
- db ' ███▄ ███ ███▄ ███ ',0dh,0ah
-
- db ' ▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀ ▀▀▀ ',0dh,0ah
-
- db '────────────────────────────────────────',0dh,0ah
-
- db ' u N I T E D c R A C K I N G f O R C E',0dh,0ah
-
- db '[KEYMAKER]────────────────────[OCT 1997]',0dh,0ah,0
-
- NameQ db 'Enter your REAL name: ',0
-
- WriteError db 'Error! Could not create file!',0
-
- CopyFile db 'CUTEFTP.KEY created! Copy it to your CFTP directory!',0
-
- FileName db 'CUTEFTP.KEY',0
-
- JamFill db 'JAM',0
-
-
-
- CryptTable db 'CUTE FTP 2.0 [F]'
-
- db 'KEYFILE BY JAMMY'
-
-
-
- .radix 10
-
- Lookuptable label byte
-
- db 239,225,232,238,230,235,227,228,233,231,226,237,236,224,229,234, 79, 65, 72
-
- db 78, 70, 75, 67, 68, 73, 71, 66, 77, 76, 64, 69, 74,223,209,216,222,214,219
-
- db 211,212,217,215,210,221,220,208,213,218, 31, 17, 24, 30, 22, 27, 19, 20, 25
-
- db 23, 18, 29, 28, 16, 21, 26, 47, 33, 40, 46, 38, 43, 35, 36, 41, 39, 34, 45
-
- db 44, 32, 37, 42,255,241,248,254,246,251,243,244,249,247,242,253,252,240,245
-
- db 250,191,177,184,190,182,187,179,180,185,183,178,189,188,176,181,186,143,129
-
- db 136,142,134,139,131,132,137,135,130,141,140,128,133,138, 63, 49, 56, 62, 54
-
- db 59, 51, 52, 57, 55, 50, 61, 60, 48, 53, 58,175,161,168,174,166,171,163,164
-
- db 169,167,162,173,172,160,165,170,111, 97,104,110,102,107, 99,100,105,103, 98
-
- db 109,108, 96,101,106,207,193,200,206,198,203,195,196,201,199,194,205,204,192
-
- db 197,202, 95, 81, 88, 94, 86, 91, 83, 84, 89, 87, 82, 93, 92, 80, 85, 90,159
-
- db 145,152,158,150,155,147,148,153,151,146,157,156,144,149,154, 15, 1, 8, 14
-
- db 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,127,113,120,126,118,123,115
-
- db 116,121,119,114,125,124,112,117,122,167,173,174,163,160,166,169,170,161,162
-
- db 168,165,171,172,164,175, 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11
-
- db 12, 4, 15,151,157,158,147,144,150,153,154,145,146,152,149,155,156,148,159
-
- db 231,237,238,227,224,230,233,234,225,226,232,229,235,236,228,239,103,109,110
-
- db 99, 96,102,105,106, 97, 98,104,101,107,108,100,111, 55, 61, 62, 51, 48, 54
-
- db 57, 58, 49, 50, 56, 53, 59, 60, 52, 63,247,253,254,243,240,246,249,250,241
-
- db 242,248,245,251,252,244,255, 87, 93, 94, 83, 80, 86, 89, 90, 81, 82, 88, 85
-
- db 91, 92, 84, 95, 23, 29, 30, 19, 16, 22, 25, 26, 17, 18, 24, 21, 27, 28, 20
-
- db 31,215,221,222,211,208,214,217,218,209,210,216,213,219,220,212,223,199,205
-
- db 206,195,192,198,201,202,193,194,200,197,203,204,196,207,119,125,126,115,112
-
- db 118,121,122,113,114,120,117,123,124,116,127,183,189,190,179,176,182,185,186
-
- db 177,178,184,181,187,188,180,191, 71, 77, 78, 67, 64, 70, 73, 74, 65, 66, 72
-
- db 69, 75, 76, 68, 79, 39, 45, 46, 35, 32, 38, 41, 42, 33, 34, 40, 37, 43, 44
-
- db 36, 47,135,141,142,131,128,134,137,138,129,130,136,133,139,140,132,143, 44
-
- db 33, 42, 47, 41, 34, 38, 40, 32, 45, 35, 36, 46, 39, 37, 43,204,193,202,207
-
- db 201,194,198,200,192,205,195,196,206,199,197,203, 76, 65, 74, 79, 73, 66, 70
-
- db 72, 64, 77, 67, 68, 78, 71, 69, 75, 28, 17, 26, 31, 25, 18, 22, 24, 16, 29
-
- db 19, 20, 30, 23, 21, 27,124,113,122,127,121,114,118,120,112,125,115,116,126
-
- db 119,117,123,172,161,170,175,169,162,166,168,160,173,163,164,174,167,165,171
-
- db 188,177,186,191,185,178,182,184,176,189,179,180,190,183,181,187,108, 97,106
-
- db 111,105, 98,102,104, 96,109, 99,100,110,103,101,107,140,129,138,143,137,130
-
- db 134,136,128,141,131,132,142,135,133,139, 92, 81, 90, 95, 89, 82, 86, 88, 80
-
- db 93, 83, 84, 94, 87, 85, 91, 60, 49, 58, 63, 57, 50, 54, 56, 48, 61, 51, 52
-
- db 62, 55, 53, 59,252,241,250,255,249,242,246,248,240,253,243,244,254,247,245
-
- db 251,220,209,218,223,217,210,214,216,208,221,211,212,222,215,213,219, 12, 1
-
- db 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,236,225,234,239,233
-
- db 226,230,232,224,237,227,228,238,231,229,235,156,145,154,159,153,146,150,152
-
- db 144,157,147,148,158,151,149,155, 77, 66, 72, 68, 70, 79, 75, 65, 74, 73, 67
-
- db 78, 69, 64, 76, 71,189,178,184,180,182,191,187,177,186,185,179,190,181,176
-
- db 188,183, 45, 34, 40, 36, 38, 47, 43, 33, 42, 41, 35, 46, 37, 32, 44, 39,237
-
- db 226,232,228,230,239,235,225,234,233,227,238,229,224,236,231,253,242,248,244
-
- db 246,255,251,241,250,249,243,254,245,240,252,247, 13, 2, 8, 4, 6, 15, 11
-
- db 1, 10, 9, 3, 14, 5, 0, 12, 7,141,130,136,132,134,143,139,129,138,137
-
- db 131,142,133,128,140,135,221,210,216,212,214,223,219,209,218,217,211,222,213
-
- db 208,220,215, 61, 50, 56, 52, 54, 63, 59, 49, 58, 57, 51, 62, 53, 48, 60, 55
-
- db 205,194,200,196,198,207,203,193,202,201,195,206,197,192,204,199,157,146,152
-
- db 148,150,159,155,145,154,153,147,158,149,144,156,151,125,114,120,116,118,127
-
- db 123,113,122,121,115,126,117,112,124,119, 93, 82, 88, 84, 86, 95, 91, 81, 90
-
- db 89, 83, 94, 85, 80, 92, 87,173,162,168,164,166,175,171,161,170,169,163,174
-
- db 165,160,172,167,109, 98,104,100,102,111,107, 97,106,105, 99,110,101, 96,108
-
- db 103, 29, 18, 24, 20, 22, 31, 27, 17, 26, 25, 19, 30, 21, 16, 28, 23
-
- Keyfile label byte
-
- end start
-
-