home *** CD-ROM | disk | FTP | other *** search
/ Various Unprotection Examples / unprotect.zip / unprotect / UNPRIX / UNPRIX.TXT < prev   
Text File  |  1989-09-16  |  6KB  |  188 lines

  1.  
  2. Works on Grand Prix Circuit EGA version dated 1-25-89.
  3.  
  4. Place original Accolade disk 2 in drive A.
  5. Type:
  6.      dir a:\gp*.*
  7. If you get the following on the screen:
  8.      GPEGA    EXE    87817   1-25-89  10:06a
  9. follow these instructions. Otherwise you are on your own.
  10.  
  11. Using DOS or similar utility copy all the files from original disk 2
  12. onto a DOS formated disk. From here on use only the copied disk.
  13.  
  14. The symbol <-+ in this text means: Press the Carriage Return key.
  15.  
  16. Rename GPEGA.EXE as GP.TMP (Any non .EXE or .COM extension will do).
  17.  
  18. Start Debug by typing:
  19.                       debug a:\gp.tmp<-+
  20. At the prompt - Type:
  21.                       r<-+  to display the registers.
  22.  
  23. Debug will display the hex values of the registrs.
  24. My debug version displayed the following:
  25. AX=0000  BX=0001  CX=5709  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000  
  26. DS=16E4  ES=16E4  SS=16E4  CS=16E4  IP=0100   NV UP EI PL NZ NA PO NC 
  27. 16E4:0100 4D            DEC    BP                                 
  28. -
  29. Record on paper the content of CS BX and CX.
  30.  
  31. Add 800 hex to the hex value of CS to get the hex value GHIJ - Record it.
  32.  
  33. At the prompt - Type:
  34.                      sGHIJ:0 ffff 9c 58 80 e4 fe 50 9d<-+
  35.  
  36. Debug should find only one location and display:
  37. GHIJ:xyzw
  38.  
  39. Record the hex value xyzw
  40.  
  41. At the prompt - Type:
  42.                      sGHIJ:0 ffff a3 22 6e 03 c2<-+
  43.  
  44. Debug should find only one location and display:
  45. GHIJ:klmn
  46.  
  47. Record the hex value klmn
  48.  
  49. At the prompt - Type:
  50.                      uGHIJ:klmn<-+
  51.  
  52. Debug should display:
  53. GHIJ:klmn A3226E        MOV [6E22],AX      << this is location BB >>
  54. GHIJ:kl?? 03C2          ADD AX,DX
  55. GHIJ:kl?? C706266E5700  MOV WORD PTR [6E26],0057
  56. GHIJ:kl?? B85700        MOV AX,0057
  57. GHIJ:kl?? 33DB          XOR BX,BX
  58. GHIJ:kl?? A3246E        MOV [6E24],AX
  59. GHIJ:kl?? 8EDB          MOV DS,BX
  60. GHIJ:kl?? 8B261000      MOV SP,[0010]
  61. GHIJ:kl?? 1F            POP DS
  62. GHIJ:kl?? 07            POP ES
  63. GHIJ:kl?? 5F            POP DI
  64. GHIJ:kl?? 5E            POP SI
  65. GHIJ:kl?? 5D            POP BP
  66.  
  67. Deduct 11 hex from the hex value of xyzw to get XYZW   (Record XYZW)
  68.  
  69. At the prompt - Type:
  70.                      uGHIJ:XYZW<-+
  71.  
  72. Debug should display:
  73. GHIJ:XYZY B013          MOV AL,13
  74. GHIJ:XY?? A25305        MOV [0553],AL
  75. GHIJ:XY?? A29106        MOV [0691],AL
  76. GHIJ:XY?? A2FF08        MOV [08FF],AL
  77. GHIJ:XY?? A20D09        MOV [090D],AL
  78. GHIJ:XY?? A22906        MOV [0629],AL
  79. GHIJ:XY?? 9C            PUSHF              << This is location AA >>
  80. GHIJ:XY?? 58            POP AX
  81. GHIJ:XY?? 80E4FE        AND AH,FE
  82. GHIJ:XY?? 50            PUSH AX
  83. GHIJ:XY?? 9D            POPF
  84. GHIJ:XY?? B430          MOV AH,30
  85. GHIJ:XY?? CD21          INT 21
  86. GHIJ:XY?? 3C02          CMP AL,02
  87. GHIJ:XY?? 723B          JB  611E
  88.  
  89.  
  90. Now to the actual modification of the code.
  91. The new code will perform the writing to memory locations to indicate
  92. successful execution of the original code, without actually testing
  93. for an original Accolade floppy disk.
  94. The new code overwrites some of the original code beginning at location AA
  95. and jump to location BB to continue execution of the original code.
  96.  
  97. At the prompt - Type:
  98.                      aGHIJ:xyzw<-+      (This is xyzw - not XYZW hex value)
  99.                            ^  ^
  100.                            +--+-------- Offset value (hex) of location AA
  101.  
  102. Screen:
  103. GHIJ:xyzw
  104.  
  105. Type:
  106.       mov byte ptr[0513],10<-+
  107.  
  108. Screen:
  109. GHIJ:xy?? mov byte ptr[0513],10
  110. GHIJ:xy??
  111.  
  112. Type:
  113.       mov byte ptr[050d],3<-+
  114.  
  115. Screen:
  116. GHIJ:xy?? mov byte ptr[0513],10
  117. GHIJ:xy?? mov byte ptr[050d],3
  118. GHIJ:xy??
  119.  
  120. Type:
  121.       mov ax,0009<-+
  122.  
  123. Screen:
  124. GHIJ:xy?? mov byte ptr[0513],10
  125. GHIJ:xy?? mov byte ptr[050d],3
  126. GHIJ:xy?? mov ax,0009
  127. GHIJ:xy??
  128.  
  129. Type:
  130.       jmp ne klmn    << klmn = hex value of location BB >>
  131.  
  132. Screen:
  133. GHIJ:xy?? mov byte ptr[0513],10
  134. GHIJ:xy?? mov byte ptr[050d],3
  135. GHIJ:xy?? mov ax,0009
  136. GHIJ:xy?? jmp ne klmn
  137. GHIJ:xy??
  138. Press Carriage Return <-+         (Get out of assemble mode)
  139.  
  140. At the prompt - Type:
  141.                      uGHIJ:XYZW<-+
  142.  
  143. Screen:
  144. GHIJ:XY?? B013          MOV AL,13
  145. GHIJ:XY?? A25305        MOV [0553],AL
  146. GHIJ:XY?? A29106        MOV [0691],AL
  147. GHIJ:XY?? A2FF08        MOV [08FF],AL
  148. GHIJ:XY?? A20D09        MOV [090D],AL
  149. GHIJ:XY?? A22906        MOV [0629],AL
  150. GHIJ:XY?? C606130510    MOV BYTE PTR [0513],10     << Verify
  151. GHIJ:XY?? C6060D0503    MOV BYTE PTR [050D],03      |
  152. GHIJ:XY?? B80900        MOV AX,0009                 |
  153. GHIJ:XY?? E94B01        JMP klmn                    |
  154.                             ^  ^
  155.                             +--+----- Make sure this = hex value of klmn
  156.  
  157. At the prompt - Type:
  158.                      r<-+
  159. Screen:
  160. AX=0000  BX=0001  CX=5709  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000  
  161. DS=16E4  ES=16E4  SS=16E4  CS=16E4  IP=0100   NV UP EI PL NZ NA PO NC 
  162. 16E4:0100 4D            DEC    BP                                 
  163.  
  164. Compare values of CS BX and CX to those recorded at the beginning.
  165. If no change continue (If values changed see note below).
  166.  
  167. Next step writes to the floppy in drive A. Make sure drive is ready with
  168. the copied disk in the drive. (Be careful not to ruin the original disk).
  169.  
  170. At the prompt - Type:
  171.                      w<-+
  172. Screen:
  173. Writing 15709 bytes
  174.  
  175. Wait for the prompt
  176. At the prompt - Type:
  177.                      q<-+       (Quit debug)
  178.  
  179. At the DOS prompt rename GP.TMP to GPEGA.EXE
  180. Type GPEGA to start the game from your newly created backup disk.
  181.  
  182. Note: Registers CS BX and CX must equal their hex value at the beginning before
  183.       writing the modified code to the disk.
  184.       To restore the registers type: rcs<-+ then enter 4 digit hex value<-+
  185.                                      rbx<-+ then enter 4 digit hex value<-+
  186.                                      rcx<-+ then enter 4 digit hex value<-+
  187. End.
  188.