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

  1. {$A+,B-,D+,E-,F-,G+,I+,L+,N+,O-,P-,Q-,R-,S+,T-,V+,X+}
  2.  
  3. {$M 16384,0,655360}
  4.  
  5. {$M $4000,0,65536}       {* Set heap size to zero !!! *}
  6.  
  7. Program UniversialKeymaker;
  8.  
  9. uses palette,dos,crt,keyinput,modplay;
  10.  
  11. {$L ULONGS.OBJ}                         { link in the assembly code }
  12.  
  13. FUNCTION LongADD (Addend1,Addend2:LONGINT):LONGINT;   EXTERNAL;
  14.  
  15. FUNCTION LongSUB (LongWord,Subtrahend:LONGINT):LONGINT;  EXTERNAL;
  16.  
  17. FUNCTION LongMUL (Multiplicand,Multiplier:LONGINT):LONGINT; EXTERNAL;
  18.  
  19. FUNCTION LongDIV (Dividend,Divisor:LONGINT):LONGINT;  EXTERNAL;
  20.  
  21. FUNCTION LongMOD (Dividend,Divisor:LONGINT):LONGINT;  EXTERNAL;
  22.  
  23. PROCEDURE WriteULong (LongWord:LONGINT;     { the longword          }
  24.  
  25.                       Width:BYTE;           { _minimum_ field width }
  26.  
  27.                       FillChar:CHAR;        { leading space char    }
  28.  
  29.                       Base:BYTE); EXTERNAL; { number base 2..26     }
  30.  
  31.  
  32.  
  33. Var
  34.  
  35.   sk                         : array[1..8000] of byte absolute $b800:0000;
  36.  
  37.   i,numwritten:integer;
  38.  
  39.   ToF:File;
  40.  
  41.   Output : String;
  42.  
  43.  
  44.  
  45. Type
  46.  
  47.   String8 = String[8];
  48.  
  49.  
  50.  
  51.  
  52.  
  53. Const
  54.  
  55.   AskName=1;
  56.  
  57.   AskCompany=0;
  58.  
  59.  
  60.  
  61. Procedure LongToHex(AnyLong : LongInt; Var HexString : String8);
  62.  
  63.  
  64.  
  65. Var
  66.  
  67.   ALong : LongInt;
  68.  
  69.   ch    : Char;
  70.  
  71.   Index : Byte;
  72.  
  73. begin
  74.  
  75.   HexString := '00000000';                  { default to zero   }
  76.  
  77.   Index := Length(HexString);               { String length     }
  78.  
  79.   While AnyLong <> 0 do
  80.  
  81.   begin                                     { loop 'til done    }
  82.  
  83.     ch := Chr(48 + Byte(AnyLong) and $0F);  { 0..9 -> '0'..'9'  }
  84.  
  85.     if ch > '9' then
  86.  
  87.       Inc(ch, 39);                           { 10..15 -> 'A'..'F'}
  88.  
  89.     HexString[Index] := ch;                 { insert Char       }
  90.  
  91.     Dec(Index);                             { adjust chr Index  }
  92.  
  93.     AnyLong := AnyLong SHR 4;               { For next nibble   }
  94.  
  95.   end;
  96.  
  97. end;
  98.  
  99.  
  100.  
  101. Procedure Curs(n:integer);
  102.  
  103.  
  104.  
  105. Var regs : registers;
  106.  
  107.  
  108.  
  109. Begin
  110.  
  111.   regs.ah:=1;
  112.  
  113.   case n of
  114.  
  115.   0 : begin
  116.  
  117.         regs.cl:=32;
  118.  
  119.         regs.ch:=32;
  120.  
  121.       end;
  122.  
  123.   1 : begin
  124.  
  125.         regs.cl:=8;
  126.  
  127.         regs.ch:=7;
  128.  
  129.       end;
  130.  
  131.   end;
  132.  
  133.   intr($10,regs);
  134.  
  135. End;
  136.  
  137. PROCEDURE SwitchTo25; ASSEMBLER;
  138.  
  139. ASM
  140.  
  141.    MOV AX,$1114
  142.  
  143.    INT $10
  144.  
  145. END;
  146.  
  147.  
  148.  
  149. Function GenerateReg:String;
  150.  
  151.  
  152.  
  153. Var
  154.  
  155.   lic,eax,ebx,ecx,edx,edi,esi,ebp:Longint;
  156.  
  157.   xs,Name,Company:String;
  158.  
  159.   bx,y,i,bp:integer;
  160.  
  161.   MyStr : String8;
  162.  
  163.  
  164.  
  165. Begin
  166.  
  167.   bx:=wherey;
  168.  
  169.   repeat
  170.  
  171.     GetInput(Name,'',20,25,bx,0,7,' ',false);
  172.  
  173.     val(name,lic,bp);
  174.  
  175.   until bp=0;
  176.  
  177.   writeln;
  178.  
  179.   val(name,edi,i);
  180.  
  181.   edi:=edi and $ffff;
  182.  
  183.   ecx:=longadd($90b96501,0);
  184.  
  185.   eax:=longadd($11d06967,0);
  186.  
  187.   ecx:=ecx xor edi;
  188.  
  189.   eax:=eax and $ffff;
  190.  
  191.   ecx:=longadd(ecx,ecx);
  192.  
  193.   ecx:=ecx xor eax;
  194.  
  195.   write(' ■ Lic No.            : 1RE');
  196.  
  197.   WriteULong(ecx,0,' ',10);
  198.  
  199. end;
  200.  
  201.  
  202.  
  203.  
  204.  
  205. {  end;}
  206.  
  207.  
  208.  
  209.  
  210.  
  211. Begin
  212.  
  213.   writeln('  Cabinet Manager v1.5.25 (c) Microlog');
  214.  
  215.   writeln('──────────────|  MiRaMaX  |──────────────');
  216.  
  217.   writeln('   ▄▄▄   ▄▄▄    ▄▄▄▄▄▄▄▄▄    ▄▄▄▄▄▄▄▄▄   ');
  218.  
  219.   writeln('   ███   ███    ███          ███▄▄▄      ');
  220.  
  221.   writeln('   ███▄  ███    ███▄         ███         ');
  222.  
  223.   writeln('   ▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀▀    ▀▀▀         ');
  224.  
  225.   writeln('─────────────────────────────────────────');
  226.  
  227.   writeln(' u N I T E D  c R A C K I N G  f O R C E ');
  228.  
  229.   writeln('[kEYMAKER]─────────────────────[dEC 1997]');
  230.  
  231.   writeln;
  232.  
  233.   write(' ■ Enter your Cert No.: ');
  234.  
  235.   Output:=GenerateReg;
  236.  
  237.   writeln;
  238.  
  239. end.
  240.  
  241.