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

  1. .model  tiny
  2.  
  3. .386
  4.  
  5.         org 100h
  6.  
  7. .data
  8.  
  9. GroupLogo       db 13,10
  10.                 db '            ▄▄▄▄▄ ',13,10
  11.                 db '            █ ▄ █  ',13,10
  12.                 db '    █▀▀▀▀▀▀▀▀ ▄ ▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀█ ',13,10
  13.                 db '    █ │░███████  │▓███████▀ │░███▀█▀▀▀▀▀▀▀ ▀ ▀▀▀▀ │░███▀█▀▀▀▀▀▓████▓▄  █ ',13,10
  14.                 db '    █ │▒███████  │▓███████  │▒███████  │▓███████▀ │▒███████  │▓███████ █ ',13,10
  15.                 db '    █ │▓███████  │▓███████  │▓███████  │▓███████  │▓███████  │▓███████ █ ',13,10
  16.                 db '    ▀ │▓███████  │▓███████  │▓███████  │▓███████  │▓███████  │▓███████ █▄▄▄ ',13,10
  17.                 db '    ▀ │▓███████  │▓███████  │▓███████  │▓███████  │▓███████  │▓███████▄ ▄ █ ',13,10
  18.                 db '    █ │▓███████  │▓███████  │▓███████  │▓███████  │▓███████               █ ',13,10
  19.                 db '    █ │▓███████▄▄▄▄▄█▄█▓▀   │▓███████▄▄▄▄▄█▄████  │▓███████▀▀ ▀    ▀      █ ',13,10
  20.                 db '    █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀ █▀▀▀▀▀▀▀▀▀ ▀ ▀▀ ',13,10
  21.                 db '    .::[ u n i t e d · c r æ c k i n g · f o r c e ]::. █ ▀ █ Antibody<SAC> ',13,10
  22.                 db '    █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀ █▀▀▀▀▀▀▀▀▀ ▀ ▀▀ ',13,10
  23.                 db '                                -----=====-----                                ',13,10
  24.                 db '    [■]   All Software by Design Products - Key Generator by Quantico   [■]    ',13,10
  25.                 db '                                -----=====-----                                ',13,10
  26.                 db '                                 ',13,10,'$'
  27.  
  28. Whichproduct    db 13,10
  29.                 db '                                                          ',13,10
  30.                 db '(1)  - Audition v2.8         ',13,10
  31.                 db '(2)  - BattleStar v2.5       ',13,10
  32.                 db '(3)  - Cardbase v2.6         ',13,10
  33.                 db '(4)  - Crypto v3.1           ',13,10
  34.                 db '(5)  - Disk clean up v3.1    ',13,10
  35.                 db '(6)  - DLL show v3.3         ',13,10
  36.                 db '(7)  - FXedit v2.8           ',13,10
  37.                 db '(8)  - Font Show v2.7        ',13,10
  38.                 db '(9)  - IconExtractor v3.0    ',13,10
  39.                 db '(10) - Notebook v4.2         ',13,10
  40.                 db '(11) - Password keeper v3.7  ',13,10
  41.                 db '(12) - Programmers IDE v2.4 ',13,10
  42.                 db '(13) - Reminders v3.3        ',13,10
  43.                 db '(14) - RGB v3.0              ',13,10
  44.                 db '(15) - Screen Loupe v3.9     ',13,10
  45.                 db '(16) - Shredder v2.3         ',13,10
  46.                 db '(17) - Submit It v2.3        ',13,10
  47.                 db '(18) - Toolbar v4.5          ',13,10
  48.                 db '(19) - Txedit 4.0            ',13,10
  49.                 db '',13,10
  50.                 db 'Enter a product (1-19)   : ','$',13,10
  51.                 db ' ',13,10
  52.  
  53.  
  54. IntroMsgOne     db 13,10,'   Enter a name        : ','$'
  55. IntroMsgTwo    db 13,10,'   Enter company name  : ','$'                
  56.  
  57. ErrorMsg        db 13,10,'                     Need 2-20 digits, try again...',13,10,'$'
  58.  
  59. ShowCodeMsg     db 13,10,'Registration number      : '
  60.  
  61. CodeBuffer      db 10 dup(0),13,10,'$'
  62.  
  63. NameBuffer      db 18h, 19h dup(0)
  64. CompBuffer    db 18h, 19h dup(0)
  65. ProdBuffer      db 18h, 19h dup(0)
  66.  
  67. DataTableOne    db '#serB&nz|mfM1/5(!sd$Mq.{s]+sFjtKpzSdtzoXqmb^Al@dv:s?x/'
  68. DataTableTwo    db '|b!pz*ls;rn|lf$vi^Axpe)rx5aic&9/2m5lsi4@0dmZw94cmqpfhw'
  69.  
  70. Convert_Digs     db '0123456789ABCDEF'
  71.  
  72. .code
  73.  
  74. .startup
  75.  
  76. main    proc    near
  77.         mov     ah, 09h                       ;
  78.         lea     edx, GroupLogo                ;
  79.         int     21h                           ; show group logo
  80.  
  81.         mov     ah, 09h                       ;
  82.         lea     edx, IntroMsgOne              ;
  83.         int     21h                           ; show intro and ask for input 
  84.  
  85.         mov     bx, 1402h                     
  86.         lea     edi, NameBuffer               ;
  87.         call    getstr                        ; read user input
  88.         jc      @error                        ;
  89.         
  90.         mov    ah, 09h                       ;
  91.         lea     edx, IntroMsgTwo              ;
  92.         int     21h                           ; show intro and ask for input 
  93.  
  94.         mov     bx, 1402h                     
  95.         lea     edi, CompBuffer               ;
  96.         call    getstr                        ; read user input
  97.         jc      @error                        ;
  98.  
  99.         mov    ah, 09h                       ;
  100.         lea     edx, Whichproduct             ;
  101.         int     21h                           ; show product message and ask for input 
  102.  
  103.         lea     edi, ProdBuffer               ;
  104.         call    getprod                       ; read user input
  105.         xor     eax, eax                      ; clear eax
  106.  
  107.     lea    dx, ProdBuffer+2              ; put what they typed into ax
  108.         movsx   eax, byte ptr [edx]
  109.         cmp     ax, 31h                       ; is ax = 1?
  110.         je      @digit2                       ; go to check second digit (10-18)
  111.         cmp     ax, 32h                       ; is ax = 2
  112.         je      @battlestar                   ; then go to battlestar
  113.         cmp     ax, 33h                       ; is ax = 3
  114.         je      @cardbase                     ;  
  115.         cmp     ax, 34h                       ;  
  116.         je      @crypto                       ;  
  117.         cmp     ax, 35h                       ; ax = 5 ?                   
  118.         je      @diskclean
  119.         cmp     ax, 36h                       ; ax = 6 ? 
  120.         je      @dllshow
  121.         cmp     ax, 37h                       ; ax = 7 ?       
  122.         je      @fileed
  123.         cmp     ax, 38h                       ; ax = 8 ? 
  124.         je      @fontshow
  125.         cmp     ax, 39h                       ; ax = 9 ?
  126.         je      @iconex
  127.  
  128.  
  129. @digit2:                                      ; checks the second digit of 
  130.         movsx   eax, byte ptr [edx+01]        ; user input
  131.         test    eax, eax                      ; is there no digit 2 ?
  132.         je      @audition                     ; then they entered 1
  133.         cmp     eax, 30h                      ; is it a 0 ? (10)
  134.         je      @notebook                     
  135.         cmp     eax, 31h                      ; did they enter 11?
  136.         je      @passkeep
  137.         cmp     eax, 32h                      ; did they enter 12?
  138.         je      @program
  139.         cmp     eax, 33h                      ; 12 ?
  140.         je      @remind
  141.         cmp     eax, 34h                      ; 13 ?
  142.         je      @rgb
  143.         cmp     eax, 35h                      ; 14 ?
  144.         je      @sloupe
  145.         cmp     eax, 36h                      ; 15 ?
  146.         je      @shredder
  147.         cmp     eax, 37h                      ; 16 ?
  148.         je      @submit
  149.         cmp     eax, 38h                      ; 17 ?
  150.         je      @toolbar
  151.         cmp     eax, 39h                      ; 18 ?
  152.         je      @txedit
  153.  
  154. @audition:    
  155.     mov    esi, 0AD10DADEh    
  156.         jmp     @continue 
  157.  
  158. @battlestar:    
  159.     mov    esi, 0ABADDEEDh    
  160.         jmp     @continue
  161.  
  162. @cardbase:    
  163.     mov    esi, 0CDB95840h    
  164.         jmp     @continue
  165.  
  166. @crypto:    
  167.     mov    esi, 0C69AA96Ch    
  168.         jmp     @continue
  169.  
  170. @diskclean:    
  171.     mov    esi, 0DC9559CDh    
  172.         jmp     @continue
  173.  
  174. @dllshow:    
  175.     mov    esi, 0DB95DB95h    
  176.         jmp     @continue
  177.  
  178. @fileed:    
  179.     mov    esi, 0FEDAADEFh    
  180.         jmp     @continue
  181.  
  182. @fontshow:    
  183.     mov    esi, 0F950059Fh    
  184.         jmp     @continue
  185.  
  186. @iconex:
  187.         mov     esi, 0ED0990DEh              
  188.         jmp     @continue                     
  189.  
  190. @notebook:    
  191.     mov    esi, 0BEDABABEh    
  192.         jmp     @continue
  193.  
  194. @passkeep:    
  195.     mov    esi, 00ABCDEF0h    
  196.         jmp     @continue
  197.  
  198. @program:    
  199.     mov    esi, 0CC0DEFEDh    
  200.         jmp     @continue
  201.  
  202. @remind:    
  203.     mov    esi, 0DEEDDEEDh    
  204.         jmp     @continue
  205.  
  206. @rgb:
  207.         mov     esi, 0C0DEABDEh
  208.         jmp     @continue
  209.  
  210. @sloupe:    
  211.     mov    esi, 0ABED0F00h    
  212.         jmp     @continue
  213.  
  214. @shredder:    
  215.     mov    esi, 095989598h    
  216.         jmp     @continue
  217.  
  218. @submit:    
  219.     mov    esi, 098954035h    
  220.         jmp     @continue
  221.  
  222. @toolbar:
  223.         mov     esi, 080888088h
  224.         jmp     @continue
  225.  
  226. @txedit:
  227.         mov     esi, 0EDC0DEEDh
  228.         jmp     @continue
  229.  
  230. @continue:
  231.         call    keygen                        ; create serial number
  232.  
  233.         mov     ah, 09h                       ;
  234.         lea     dx, ShowCodeMsg               ;
  235.         int     21h                           ; print serial number
  236.         jmp     @exit                         ; finished, quit
  237. @error:
  238.         mov     ah, 09h
  239.         lea     dx, ErrorMsg
  240.         int     21h        
  241. @exit:
  242.         mov     al, 00h                       ;
  243.         mov     ah, 4Ch                       ;
  244.         int     21h                           ; terminate program
  245. main    endp
  246.  
  247. keygen  proc    near
  248.         or      esi, 000000378h
  249.     push    esi
  250.     lea    esi, NameBuffer + 2
  251.     movsx    eax, byte ptr [esi - 1]
  252.     call    keysub
  253.     
  254.     pop    esi
  255.     add    esi, eax
  256.     
  257.     push    esi
  258.     lea    esi, CompBuffer + 2
  259.     movsx    eax, byte ptr [esi - 1]
  260.     call    keysub
  261.     
  262.     pop    esi
  263.     add    eax, esi
  264.     
  265.     xor    edx, edx
  266.     mov    ecx, 0000000Ah        
  267.     lea    edi, CodeBuffer
  268.     call    convert_num
  269.     ret
  270. keygen    endp
  271.  
  272. keysub    proc    near
  273.     xor    edi, edi
  274.     xor    ecx, ecx
  275. @more:
  276.     movsx    ebx, byte ptr [eax + ecx + DataTableOne] ; byte namelength+count+datetable
  277.     movsx    ebp, byte ptr [esi + ecx]                ; byte of count+name
  278.     lea    edx, dword ptr [ecx + 1]                 ; counter increase
  279.     imul    ebx, ebp                                 ; 
  280.     movsx    ecx, byte ptr [ecx + DataTableTwo]
  281.     imul    ebx, ecx                                 ; ebx*ecx
  282.     imul    ebx, edx                                 ; ebx*edx
  283.     add    edi, ebx                                 ; edi = edi+ebx
  284.     mov    ecx, edx                                 ; set counter
  285.     cmp    edx, eax                                 ; end of name ?
  286.     jl    @more                                    ; go back for more
  287.     mov    eax, edi                                 ; eax = code
  288.     ret
  289. keysub    endp
  290.  
  291. ; get string from user
  292. ; input :
  293. ;       edi = pointer to buffer
  294. ;       bl  = min length
  295. ;       bh  = max length
  296. ; output :
  297. ;    CF error, cx number of bytes read
  298. getstr  proc    near
  299.         push    dx                            ; save dx
  300.         mov     dx, di                        ;
  301.         mov     ah, 0Ah                       ;
  302.         int     021h                          ; get user input
  303.  
  304.         movsx   ecx, byte ptr [edi + 1]       ; get number of digits
  305.  
  306.         mov     byte ptr [edi + ecx + 2], 00h
  307.  
  308.         cmp     cl, bh                        ; check maximum
  309.         jg      @@0
  310.         cmp     cl, bl                        ; check minimum
  311.         jl      @@0
  312.     xor    ch, ch
  313.         clc                                   ; clear CF
  314.         jmp     @@1
  315. @@0:
  316.         stc                                   ; set CF (carry flag)        
  317. @@1:
  318.         pop     dx                            ; restore dx
  319.     ret
  320. getstr  endp
  321.  
  322. getprod proc    near
  323.         push    dx                            ; save dx
  324.         mov     dx, di                        ;
  325.         mov     ah, 0Ah                       ;
  326.         int     021h                          ; get user input
  327.  
  328.         movsx   ecx, byte ptr [edi + 1]       ; get number of digits
  329.  
  330.         mov     byte ptr [edi + ecx + 2], 00h
  331.  
  332.     xor    ch, ch
  333.         clc                                   ; clear CF
  334.         pop     dx                            ; restore dx
  335.     ret
  336. getprod  endp
  337.  
  338. Convert_Num proc near
  339.         pushf
  340.     pushAD
  341.  
  342.         sub     esp, 4
  343.         mov     ebp,esp
  344.  
  345.         cld
  346.         mov     esi, edi
  347.         push    esi
  348.  
  349. ;--- loop for each digit
  350.  
  351.         sub     bh, bh
  352.         mov     dword ptr [ebp], eax               ;save low word
  353.         mov     dword ptr [ebp+4], edx             ;save high word
  354.         sub     esi, esi                          ;count digits
  355.  
  356. Connum1:
  357.         inc     esi
  358.         mov     eax, dword ptr [ebp+4]             ;high word of value
  359.         sub     edx, edx                          ;clear for divide
  360.         sub    ebx, ebx
  361.         div     ecx                              ;divide, DX gets remainder
  362.         mov     dword ptr [ebp+4],eax             ;save quotient (new high word)
  363.  
  364.         mov     eax, dword ptr [ebp]               ;low word of value
  365.         div     ecx                              ;divide, DX gets remainder
  366.                                                 ;  (the digit)
  367.         mov     dword ptr [ebp], eax               ;save quotient (new low word)
  368.  
  369.         mov     bl, dl
  370.         mov     al, byte ptr [Convert_Digs+ebx]  ;get the digit
  371.         stosb                                   ;store
  372.  
  373.         cmp     dword ptr [ebp], 0                ;check if low word zero
  374.         jne     Connum1                         ;jump if not
  375.         cmp     dword ptr [ebp+4], 0              ;check if high word zero
  376.         jne     Connum1                         ;jump if not
  377.  
  378.         sub     al, al
  379.         stosb                                   ;store the terminator
  380.  
  381. ;--- reverse digits
  382.  
  383.         pop     ecx                              ;restore start of string
  384.         xchg    ecx, esi
  385.         shr     ecx, 1                           ;number of reverses
  386.         jz      Connum3                         ;jump if none
  387.  
  388.         xchg    edi, esi
  389.         sub     esi, 2                           ;point to last digit
  390.  
  391. Connum2 :
  392.         mov     al, byte ptr [edi]               ;load front character
  393.         xchg    al, byte ptr [esi]               ;swap with end character
  394.         stosb                                   ;store new front character
  395.         dec     esi                              ;back up
  396.         loopd   Connum2                         ;loop back for each digit
  397.  
  398. ;--- finished
  399.  
  400. Connum3  :
  401.         add     esp, 4
  402.  
  403.     popad
  404.         popf
  405.         ret
  406.  endp           ;Convert_Num
  407.  
  408. end    main