home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Quantico / km / winzip.asm.txt < prev    next >
Encoding:
Text File  |  2000-05-25  |  5.0 KB  |  224 lines

  1. ; This wasn't meant to be released as source.. but wtf....
  2. ; enjoy it! ;) - oh btw.. this was spread thru Stone's homepage - find me :)
  3.  
  4. .MODEL SMALL
  5. .STACK 100h
  6. .386
  7.  
  8. .DATA         
  9. input     DB 22h,0         ; Allow usernames up till 16 Chars - disregard more
  10. sentence  DB 22h dup ('$')   ; buffer to store real input at
  11. stat1     DW 0             ; Statistic no.1. - (half the serial)
  12. stat2     DW 0             ; Statistic no.2. - (other half the serial)
  13. count     DW 0ffFFh        ; byte need to count with
  14. flaf DB 0
  15. rightkeytxt DB 'The key is: '
  16. rightkey  DB '12345678',10,13,'$' ; Store the generated key here 
  17.  
  18. introtxt  DB 'Enter your name: ','$'
  19. lnfd      DB 10,13,'$'     ; Line feed 
  20. reginfo   DB 'Username: $'
  21. UCF       DB '─────────────────────────────────────────',10,13
  22.           DB '  ▄▄▄   ▄▄▄    ▄▄▄▄▄▄▄▄▄    ▄▄▄▄▄▄▄▄▄   ',10,13
  23.           DB '  ███   ███    ███          ███▄▄▄      ',10,13
  24.           DB '  ███▄  ███    ███▄         ███         ',10,13
  25.           DB '  ▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀▀    ▀▀▀         ',10,13
  26.           DB '─────────────────────────────────────────',10,13
  27.           DB ' u N I T E D  c R Æ C K I N G  f O R C E ',10,13
  28.           DB '─────────────────────────────────────────',10,13
  29.           DB '   WinZip 6.2 & 6.3 Beta 5 Keymaker',10,13
  30.           DB ' By Drone [F4CG] & Stone [UCF] (C) 1997',10,13,10,13,'$'
  31.  
  32.  
  33. .CODE
  34. START:
  35.     MOV AX, @DATA              ; Make DS&ES point to the DATA
  36.     MOV DS,AX
  37.     MOV ES,AX
  38.  
  39.     LEA EDX, [ucf]           ; Prime example of non efficient coding :)
  40.     MOV AH,9h
  41.     INT 21h
  42.  
  43.     LEA EDX,[introtxt]         ; Write the introductory text
  44.     MOV AH,9h
  45.     INT 21h
  46.  
  47.     LEA EDX,[input]            ; Fetch Input
  48.     XOR EBX,EBX
  49.     MOV AH,0ah
  50.     INT 21h
  51.  
  52.     CMP BYTE PTR [input+1],0   ; did the sucker type nothing?
  53.     JZ nokey
  54.  
  55.     MOVZX EBX, BYTE PTR [input +1]   ; zero-terminate
  56.     MOV BYTE PTR [sentence+EBX],0h
  57.  
  58.  
  59.     LEA EDX, [lnfd]                 ; Write a linefeed
  60.     MOV AH,9h
  61.     INT 21h
  62.  
  63.  
  64.     XOR EBX,EBX
  65.     genstat1:
  66.     INC     WORD PTR [count]             ; Increase counter
  67.     INC     EBX
  68.     LEA     EAX,[sentence+EBX-1]         
  69.     MOVZX   EAX,BYTE PTR [EAX]          
  70.     TEST    EAX,EAX                     
  71.     JZ      endstat1
  72.     LEA     EAX,[sentence+EBX-1]
  73.     MOVZX   EAX,BYTE PTR [EAX]
  74.     MOVZX   ECX,WORD PTR [count]
  75.     IMUL    EAX,ECX
  76.     MOVZX   ECX,WORD PTR [stat1]
  77.     ADD     EAX,ECX
  78.     MOV     [stat1],AX
  79.     JMP     genstat1
  80. endstat1:
  81.  
  82.     XOR EBX,EBX
  83.     MOV WORD PTR [count],0ffffh
  84.     genstat2:
  85.     INC     DWORD PTR [count]          ; Counter - ini =0
  86.     INC     EBX
  87.     LEA     EAX,[Sentence+EBX-1]        ; username
  88.     MOVZX   EAX,BYTE PTR [EAX]
  89.     TEST    EAX,EAX
  90.     JZ      endstat2
  91.     PUSH    00001021h
  92.     LEA     EAX,[Sentence+EBX-1]
  93.     MOVZX   AX,BYTE PTR [EAX]
  94.     PUSH    EAX                 
  95.     PUSH    DWORD PTR [STAT2]          ; ebp-8 = stat2
  96.     CALL    c40AF3C  
  97.  
  98.     ADD     ESP,0Ah    ;?
  99.     MOV     WORD PTR [STAT2],AX
  100.        JMP     genstat2
  101. endstat2:
  102.  
  103.     MOV AX, WORD PTR [STAT2]
  104.     ADD AX, 63h
  105.     SHL EAX,16
  106.     MOV AX, WORD PTR [stat1]
  107.     MOV ESI,EAX
  108.  
  109.         LEA EBX, [rightkey+8]
  110.         CALL al1
  111.         
  112.         MOV EAX, ESI    ; Fetch ax
  113.         SHR EAX,4
  114.         CALL al1
  115.  
  116.  
  117.         MOV EAX, ESI    ; Fetch ax
  118.         SHR EAX, 8
  119.         CALL al1
  120.  
  121.  
  122.         MOV EAX, ESI    ; Fetch ax
  123.         SHR EAX, 12
  124.         CALL al1
  125.  
  126.         MOV EAX, ESI    ; Fetch ax
  127.         SHR EAX, 16
  128.         CALL al1
  129.  
  130.         MOV EAX, ESI    ; Fetch ax
  131.         SHR EAX, 20
  132.         CALL al1
  133.  
  134.  
  135.         MOV EAX, ESI   ; Fetch ax
  136.         SHR EAX, 24
  137.         CALL al1
  138.  
  139.  
  140.         MOV EAX, ESI    ; Fetch ax
  141.         SHR EAX, 28
  142.         CALL al1
  143.  
  144.     LEA EDX, [reginfo]
  145.     MOV AH,9
  146.     INT 21h
  147.  
  148.     LEA EDX,[sentence]
  149.     MOV AH,9h
  150.     INT 21h
  151.  
  152.  
  153.     LEA EDX, [lnfd]
  154.     MOV AH,9
  155.     INT 21h
  156.  
  157.     LEA EDX, [rightkeytxt]
  158.     MOV AH,9h
  159.     INT 21h
  160.  
  161. nokey:
  162.     MOV AH,4ch
  163.     INT 21h
  164.  
  165. al1:
  166.         DEC EBX
  167.     SHL AL,4                     ; fetch first half byte
  168.     SHR AL,4
  169.     ADD AL,055d                  ; make it a letter
  170.     CMP AL,41h                 ; was it really a number?
  171.         JGE endal1
  172.         SUB AL,7
  173. endal1:
  174.     MOV BYTE PTR [EBX],AL
  175.  
  176. RET
  177.  
  178.  
  179. c40AF3C:
  180.     PUSH    EBP
  181.     MOV     EBP,ESP
  182.     ADD     ESP,04
  183.     SUB     EBP,2
  184.     PUSH    EBX
  185.     PUSH    ESI
  186.     PUSH    EDI
  187.     SHL     WORD PTR [EBP+0Ch],08
  188.     MOV     DWORD PTR [EBP-04],00000000
  189.     JMP     d40AF59
  190. d40af56:
  191.     INC     DWORD PTR [EBP-04]
  192. d40af59:
  193.     CMP     DWORD PTR [EBP-04],08
  194.     JGE     d40AF98
  195.     MOVZX   EAX,WORD PTR [EBP+0Ch]
  196.     MOVZX   ECX,WORD PTR [EBP+08]
  197.     XOR     EAX,ECX
  198.     TEST    AH,080h
  199.     JZ      d40AF8B
  200.     MOVZX   EAX,WORD PTR [EBP+08]
  201.     ADD     EAX,EAX
  202.     MOVZX   ECX,WORD PTR [EBP+010h]
  203.     XOR     EAX,ECX
  204.     MOV     [EBP+08],AX
  205.     JMP     d40AF8F
  206. d40af8b:
  207.     SHL     WORD PTR [EBP+08],1
  208. d40af8f:
  209.     SHL     WORD PTR [EBP+0Ch],1
  210.     JMP     d40AF56
  211. d40af98:
  212.     MOV     AX,[EBP+08]
  213.     POP     EDI
  214.     POP     ESI
  215.     POP     EBX
  216.     RET
  217.     
  218.  
  219. END  START
  220.  
  221.  
  222.  
  223.  
  224.