home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / tools / crack-ut.arj / EMULREAD.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-02-15  |  1.8 KB  |  101 lines

  1. {$M 1024,0,0}
  2. uses
  3.    DOS;
  4.  
  5. const
  6.    PrgName=        'TEST.EXE';    { Program to crack }
  7.    Params=         '';
  8.  
  9.    Drive=          0;             { The data displayed by SHOWREAD.EXE }
  10.    Head=           0;             { You need to change these values }
  11.    Track=          0;             { for each program you crack. }
  12.    Sector=         0;
  13.    Count=          1;
  14.    Size=           512;
  15.  
  16. {$L saveread.obj}                 { The file created using BINOBJ }
  17.                                   { from a saveread.xxx file }
  18. procedure Data; external;
  19.  
  20. var
  21.    Buffer          :Pointer;
  22.  
  23. procedure ReturnData;
  24. interrupt;
  25. begin
  26.    Move(@Data^, Buffer^, Size);
  27. end;
  28.  
  29. procedure CLast13;
  30. assembler;
  31. asm
  32.    dd   0
  33.    dw   0, 0, 0
  34. end;
  35.  
  36. procedure Int13;
  37. assembler;
  38. asm
  39.    cmp  ah,2
  40.    jne  @@1
  41.    cmp  dx,Drive+(Head*256)
  42.    jne  @@1
  43.    cmp  cx,Sector+(Track*256)
  44.    jne  @@1
  45.    cmp  al,Count
  46.    jne  @@1
  47.  
  48.    push ds
  49.    push ax
  50.    mov  ax,seg @DATA
  51.    mov  ds,ax
  52.    pop  ax
  53.  
  54.    mov  word ptr Buffer,bx
  55.    mov  word ptr Buffer+2,es
  56.  
  57.    pushf
  58.    push cs
  59.    call ReturnData
  60.  
  61.    clc
  62.  
  63.    pop  ds
  64.    mov  word ptr CLast13+4,ax
  65.    mov  word ptr CLast13+6,bx
  66.    mov  word ptr CLast13+8,cx
  67.    pop  ax
  68.    pop  bx
  69.    pop  cx
  70.    push bx
  71.    push ax
  72.    mov  ax,word ptr CLast13+4
  73.    mov  bx,word ptr CLast13+6
  74.    mov  cx,word ptr CLast13+8
  75.    retf
  76.  
  77. @@1:
  78.    jmp  dword ptr CLast13
  79. end;
  80.  
  81. var
  82.    Last13          :Pointer;
  83.  
  84. begin
  85.    WriteLn('Universal Crack Utility  Copyright (c) 1994 by Sasha Peslyak');
  86.  
  87.    GetIntVec($13, Last13);
  88.    asm
  89.       mov  ax,word ptr Last13
  90.       mov  word ptr CLast13,ax
  91.       mov  ax,word ptr Last13+2
  92.       mov  word ptr CLast13+2,ax
  93.    end;
  94.  
  95.    SetIntVec($13, @Int13);
  96.    SwapVectors;
  97.    Exec(PrgName, Params);
  98.    SwapVectors;
  99.    SetIntVec($13, Last13);
  100. end.
  101.