home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / prol / prolok.unp < prev    next >
Text File  |  1985-04-21  |  5KB  |  112 lines

  1. PROLOCK.UNP          HOW TO KILL PROLOCK     by the Lone Victor
  2.  
  3.      This file describes how to eliminate the Prolock code from almost any
  4. file.  It will work for DBASE III, FrameWork, and a number of other programs
  5. that I have tried.  All that is needed is a copy of the program, DEBUG,
  6. and this file.  The original Prolock disk is not needed.  After these fixes
  7. are applied the program will be 6K - 8K smaller and will not require the
  8. original disk to run.
  9.  
  10.      One limitation built into this script file is the search performed for
  11. the .EXE header (4D 5A).  Thus, the original program, before Prolock was applied,
  12. had to be a .EXE instead of a .COM file.  This is true of most programs, such
  13. as dBase and Framework.  Original .COM files could also be unprotected this
  14. way, but I have yet to find any.
  15.  
  16.      The following instructions use the dBase III file DBASE.EXE as an
  17. example.  Make careful note of where an example address or number is give.
  18. The numbers will be different for a different file.  Enter the commands
  19. given below which are in capital letters, not the comments and examples.
  20. <CR> means press the Carriage Return or Enter key.
  21.  
  22.  
  23. DEBUG DBASE.EXE
  24. R <CR>                          ;record the BX and CX registers
  25.         example: BX=0001    CX=C750
  26. U <CR>                          ;skip first screen
  27. U <CR>                          ;look for a LOOP instruction
  28.         example: xxxx:0167  LOOP  0160
  29.                  xxxx:0169  XCHG  DX,AX
  30.                                 ;the addresses need not be the same
  31.                                 ;as in the example.
  32. G 169 <CR>                      ;go to the address after the LOOP
  33.  
  34. S 100 3000 83 C4 08 <CR>        ;search for code
  35.         example: xxxx:0746
  36.                  xxxx:13C4      ;<- use the last address displayed
  37. A 13C4 <CR>                     ;assemble code at address found above
  38. XOR  AX,AX <CR>
  39. RET  <CR>
  40. <CR>
  41.  
  42. S 100 3000 C0 45 F8 <CR>        ;search for code
  43.         example: xxxx:1140      ;<- use this address
  44. E 1140 0B 46 <CR>               ;enter encoded int 80 at address found
  45.  
  46. M 0:C F 0:200 <CR>              ;copy BPT vector to int 80 vector
  47.  
  48. G <CR>                          ;prolock tests diskette drives
  49.  
  50. S 100 3000 4D 5A                ;search for .EXE header
  51.         example: xxxx:03D6
  52.                  xxxx:06E0
  53.                     .
  54.                     .
  55.                  xxxx:1B50      ;<- use last address displayed
  56.  
  57. ;    This number is the addres of the now decoded, original program, before
  58. ;Prolock was applied.  We need to subtract this hex number from the size of
  59. ;the original Prolock file (BX,CX we recored fist).
  60.         example   1 C750
  61.                 -   1B50
  62.                 --------
  63.                   1 AC00
  64.  
  65. ;    This can be done using debug:
  66.  
  67. H C750 1B50 <CR>                ;ask debug for sum and difference
  68.         example  E2A0  AC00     ;<- use last number
  69.  
  70. RBX <CR>                        ;load BX and CX with new file size
  71. :0001 <CR>
  72. RCX <CR>
  73. :AC00 <CR>
  74.  
  75. N DBASE <CR>                    ;choose any new file name
  76.                                 ;(use no extention)
  77. W 1B50 <CR>                     ;write out file starting at the address
  78.                                 ;of the .EXE file that we found above.
  79. Q <CR>                          ;quit debug
  80.  
  81. REN DBASE DB.EXE                ;rename new file to a .EXE filename
  82.  
  83.  
  84.      That's all there is to it.  The new file contains no Prolock code, and
  85. will run without the original disk.  Here is a brief description of what
  86. was actually done.
  87.  
  88.      The first LOOP decodes the Prolock code.  We do a GO to the end of
  89. that loop.  The Search for the bytes 83 C4 08 finds the code that prints
  90. the error message when Prolock fails to find it's special disk.  We Assemble
  91. new code at that address which returns a 0 in AX.  This tricks Prolock into
  92. thinking the disk was found, and it then decodes the original .EXE file.
  93.  
  94.     The Search for the bytes C0 45 F8 finds the code that loads the original
  95. .EXE file.  By the time this code is executed, the .EXE file is decoded and
  96. we want to stop and write it out.  We can't put a Break Point there because
  97. Prolock will destroy our BPT vector.  So we enter the code for an INT 80
  98. at this address and copy or BPT vector to the unused INT 80 vector.  In
  99. addition, this code is "encrypted" by having each byte exclusive ORed with
  100. the byte C6.  Our INT 80 code (CD 80) thus becomes the bytes 0B 46.
  101.  
  102.     The Move 0:C F 0:200 instruction copies the debug Break Point vector
  103. to the INT 80 vector for use there.  We then do a GO and Prolock checks
  104. the A: drive for a Prolock disk, thinks it finds it, and decodes the
  105. original .EXE file.  Before it can execute the file it hits our INT 80,
  106. which returns us to debug.
  107.  
  108.     Finally we search for the .EXE header, calculate how long the file
  109. is without the Prolock code, and write it out to a file.  This file
  110. is Renamed to a .EXE file and can then be run.
  111.  
  112.