home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Mendoza / C101.TXT < prev    next >
Text File  |  2000-05-25  |  141KB  |  3,094 lines

  1.                           CRACKING 101 - 1990 edition
  2.  
  3.                                 ┌──────────────┐
  4.                                 │ INTRODUCTION │
  5.                                 └──────────────┘
  6.  
  7.                                by Buckaroo Banzai
  8.  
  9.  
  10.               A long time a go, in a galaxy far far away, a great
  11.          adventure took ... What, oh sorry, wrong textfile.
  12.  
  13.  
  14.               Hello my children.  Let me introduce myself, I am the
  15.          great cracking guru BUCKAROO BANZAI (the original) and I'm
  16.          back after a couple of years of hiding (from the Feds? from
  17.          the IRS? No, from this girl MaryLou.  Let me tell you, she
  18.          could ... oh well let's get back to the textfile).
  19.  
  20.               Let me tell you a little history about cracking on the
  21.          IBMpc.  It all started about 11 years ago with an apple IIe.
  22.          See, I owned one and always wanted to learn how to crack (I
  23.          was already a good pirate).  Unfortunately, I just never
  24.          could get the hang of it.
  25.  
  26.               Well anyway, then I got my PC, and right away started to
  27.          learn to program.  Soon, I had pick up oh 4 languages one of
  28.          which was assemble language.  So I started down the long road
  29.          to becoming a crackist.
  30.  
  31.               But the road was hard since unlike the apple, there were
  32.          NO textfiles on cracking the PC.  Several unprotects, but
  33.          nothing that really told you what to do.  But thanks to some
  34.          of the better known crackists of the day (Thanks SPI for the
  35.          help) I got through.
  36.  
  37.               It was at that point I decided to give something back.
  38.          And thus, after a long (and I mean long) night of sex, drugs
  39.          and rock and roll I started on my first cracking textfile.
  40.          (Ok, so there really wasn't any drugs)
  41.  
  42.               Since then, I have written about 10 different textfiles,
  43.          4 utilities and cracked several dozen programs.  So, why the
  44.          long pause, well I never really stopped cracking.  I just
  45.          basicly stuck to myself.  I never released any of my cracks
  46.          cause I was never first but several of my cracking programs
  47.          (most known is SECTOR-C) reached the pirate world.
  48.  
  49.               So, why am I back.  3 reasons.  First is because now DOC
  50.          CHECKS have taken over the scene and nobody has really
  51.          written about them (plus I'm tired of seeing my old textfiles
  52.          butchered in "CRACKING" mags).  Second is because I have some
  53.          free time, and third, because it was there.
  54.  
  55.               It feels kinda funny.  I have written this intro file
  56.          several times, and the whole series has been rewritten.  What
  57.          started off as 4 simple textfiles has grown.  I have givin up
  58.          trying to write a book.  What I'm doing is as a new game
  59.          reaches me, I will crack it, and then tell how it was done,
  60.          highlight the odd quirks about the crack.
  61.  
  62.               I have also compiled a preaty good reference on INT 13h.
  63.          I have included it with this series.  And in the near future,
  64.          I hope to release several utilities that I use to help me
  65.          crack.
  66.  
  67.               As of this writing, I have 2 actual lessons done, and 2
  68.          ready to be written.  For the first 2 lessons I touch on both
  69.          types on copy protection (On disk copy protection with
  70.          I.B.M.'s DRAWING ASSISTANT and dos checks with EOA's ESCAPE
  71.          FROM HELL).  I still have to compose 2 more files, 1 more on
  72.          each type (usings STAR CONTROL and CHAMBER OF THE SCI-MUNTANT
  73.          PREISTEST).  From there, who the hells knows.
  74.  
  75.               So anyway, sit back, watch, listen, learn and if that
  76.          doesn't work, kick a small kid in the head...
  77.  
  78.               -Buckaroo Banzai
  79.                -the cracking guru
  80.  
  81.  
  82. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  83.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  84.  
  85.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  86.  Burn This Flag                           Zardoz               408/363-9766
  87.  realitycheck                             Poindexter Fortran   510/527-1662
  88.  Lies Unlimited                           Mick Freen           801/278-2699
  89.  The New Dork Sublime                     Biffnix              415/864-DORK
  90.  The Shrine                               Rif Raf              206/794-6674
  91.  Planet Mirth                             Simon Jester         510/786-6560
  92.  
  93.                           "Raw Data for Raw Nerves"
  94. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  95.                           CRACKING 101 - 1990 edition
  96.  
  97.                                    Lession #1
  98.  
  99.                              ┌────────────────────┐
  100.                              │ CRACKING DOS Files │
  101.                              └────────────────────┘
  102.  
  103.                                By Buckaroo Banzai
  104.  
  105.  
  106.               Today I'm here to about is cracking a dos format (either
  107.          .EXE or .COM) file.  This, in my mind is releativly the
  108.          simplest (in theory although pratice might say otherwise)
  109.          type of crack to do.
  110.  
  111.               There are really 3 steps in cracking a dos file.  Step
  112.          1, is finding where the protection routine is.  How to go
  113.          about it, well, there are several diffrent methods.  Here are
  114.          the steps that I often use.
  115.  
  116.               First, I will run the program under PC-WATCH (PW)
  117.          trapping INT13 all functions and INT21 functions 3Dh and 3Fh.
  118.          Why trap the functions.  This will give (hopefully) a
  119.          starting place to look for the protection.  Once you have set
  120.          the breakpoints, press [F4] to execute and you will drop to
  121.          dos.  When you do, PW should display several calls to INT13.
  122.          What closly at the CS:IP of these calls.  Record it for later
  123.          because these are calls from dos.  We will uses this data to
  124.          recognize what is a call to the protection and what is not.
  125.  
  126.               Next, run the program to be cracked.  As it executes,
  127.          PC-WATCH will show what files are opened (including the file
  128.          you just ran since DOS uses function 3Dh to open a file when
  129.          it executes one) and what (and more improtantly WHERE) data
  130.          is read to.  Makes a list saying what data is read in from
  131.          what file.  Here is an example.  Lets say you ran the program
  132.          "XXX.COM".  While running, "XXX.COM", you noticed that 2
  133.          other files "YYY.BIN" and "ZZZ.BIN" were also opened.  So
  134.          make a list like this:
  135.  
  136.              XXX.COM       YYY.BIN       ZZZ.BIN
  137.              ───────       ───────       ───────
  138.  
  139.               Now, lets say that after "XXX.COM" was opened, PW showed
  140.          that there were 2 reads from "XXX.COM" (the way to tell where
  141.          the data is being read from is by checking the BX register on
  142.          calls to 3Fh and the AX registers after calls to 3Dh.  Yes,
  143.          you should select both INPUT REGISTERS and OUTPUT REGISTERS
  144.          from the PW menu) 1 at aaaa:bbbb and 1 as cccc:dddd.  Right
  145.          after "YYY.BIN" was opened, PW showed data was read to
  146.          eeee:ffff and then after "ZZZ.BIN" was opened, data was
  147.          written to gggg:hhhh and iiii:jjjj.  Now, our list looks like
  148.          this:
  149.  
  150.              XXX.COM       YYY.BIN       ZZZ.BIN
  151.              ───────       ───────       ───────
  152.              aaaa:bbbb     eeee:ffff     gggg:hhhh
  153.              cccc:dddd                   iiii:jjjj
  154.  
  155.               What we have just created in a program load map.  This
  156.          map shows where to program to be cracked is loaded in memory.
  157.          Next, scan though the calls to INT13.  Look for either calls
  158.          that return with errors, calls that have high values in the
  159.          CH ( > 28) or CL ( > 9) registers, or calls not made by dos
  160.          (those calls that have a CS:IP diffrent from the one we
  161.          copied down before we executed the program).  Now, look at
  162.          the CS:IP of the call to INT13.  Match the segment address
  163.          against the program load map.  If only 1 match occurs, then
  164.          you now know what module the check is in so continue on to
  165.          step #2.  If more than 1 match occurs, check the offset (IP).
  166.          Find the one that is closest to one of the write address's
  167.          offset.  Once you find a match, then go on to step #2.  If no
  168.          match occurs after both steps, it's time to track through the
  169.          program.
  170.  
  171.               Tracking your way though the program is a real bitch.  I
  172.          do not like to do because it can just take to long.  But here
  173.          is an overview on how it is done.
  174.  
  175.               The object, is to keep narowing down calls until disk
  176.          access if found.  How to do this.  Well, load the program
  177.          under debug.  Keep tracing through the program in till a
  178.          "CALL" instruction is found.  Jot down you current IP and
  179.          PROCEED (using debug P command) over the instruction without
  180.          tracing in to it.  If you end up at the next instruction
  181.          without access that disk, then you have not found the routine
  182.          you are looking for so keep going.  Search for the next
  183.          "CALL" and then the next and then the next etc.  At some
  184.          point, when you proceed over a call, the disk will either
  185.          check protection or load in a new module.
  186.  
  187.               How to tell the diffrence, well PW is still active and
  188.          will tell you if it was a call to INT13 or INT21 or BOTH.  If
  189.          it was the call to INT13 or a call to BOTH then you have
  190.          found a call to the protection routine (although the actual
  191.          call may be 100 levels deeper, you are on the right track).
  192.          Exit and restart but this time when you reach the call,
  193.          trace into it.  Now do the same process until you get to the
  194.          call to the next level, then again for the next, etc.
  195.          Finally you should find where it is.
  196.  
  197.               But hopefully, you won't have to do that.  As I said, it
  198.          is very time consumming.  Hopefully, you will know which
  199.          module to look in.  If you do, here is how to find the call
  200.          to the protection.  First, try the simple search method.
  201.          Load up the module using DEBUG and simply type:
  202.  
  203.                    S CS:100 FFFF CD 13  (use CS:100 if .EXE)
  204.  
  205.               Debug will hopefully list 1 or more address.  If not,
  206.          try the same command only using CS:0000.  If again you are
  207.          not givin any address, you have some tricky debugging at hand
  208.          (an I suggest rereading the exercise in self-modifying code).
  209.  
  210.               I will explain in detail how to find self-modifying code
  211.          later but for now, lets assume we have found the protection
  212.          routine.  Next, is to figure out what the copy protection is
  213.          trying to do.  First, look to the printout from PW.  Look
  214.          through it until you find the calls the INT13 from the
  215.          protection routine.  Look at the AH register.  If it is 00h
  216.          then the protection routine is probally reading in data from
  217.          the protected tracks.  If not, then the protection is simply
  218.          looking for some KEY (in other words a damaged track or
  219.          sector) that DOS canno't duplicate.
  220.  
  221.               The second choice is much eaiser to defeat.  2 quick
  222.          methods to defeating this type.  First, you can fake the call
  223.          and simply set the registers.  Take the follow check to a
  224.          protection routine:
  225.  
  226.          1:      mov AX,0201h      ; Read 1 sectors using int 13h
  227.          2:      mov CX,2909h      ; Track 29h sector 09h
  228.          3:      xor DX,DX         ; Drive 0, head 0
  229.          4:      int 13h           ; Read sector
  230.          5:      jnc Bad           ; If no error then it's a copy
  231.          6:      cmp AH,10h        ; Was it a CRC error
  232.          7:      jne Bad           ; No, then it's a copy
  233.          8:      mov AX,0h         ; clear error flag
  234.          9:      jmp Done          ; we are done
  235.          Bad:    mov AX,1          ; set error flag
  236.          Done:   ret               ; we are done
  237.  
  238.               What is the above code trying to do.  Well, it's
  239.          checking for a KEY on track 29h.  That key is sector 09h.
  240.          Normally sector 09h would not have an error.  On a read to
  241.          the original disk, after the int13 (line 4) is executed, the
  242.          carry flag (CF) would be set.  The jnc in line 5 would jump
  243.          if CF is not set (indicating no error, which is bad since the
  244.          original disk would have an error there).  The next line
  245.          checks AH to see if it is 10h.  This is checking to see if
  246.          the error was a Bad CRC on the read (the error that should be
  247.          there).  If it was not, then again it is not the protected
  248.          disk.  Only after both of thoses conditions are met, will the
  249.          protection routine return a "GOOD" result.
  250.  
  251.               The key here is the value returned in AX an possibly
  252.          CF.  When the disk is the original, AX would return the value
  253.          of 0000h and CF = 1 but when it was a copy, it would return
  254.          0001h and CF = 0 or 1.  Since on a bad return, CF can be 0 or
  255.          1 then it is preaty safe to assume CF is not used to signal
  256.          the return.  So what must we do to beat the protection
  257.          routine, well, simply return from this CHECK with AX = 0000h.
  258.          Simple.  Just change line 1 to "mov AX,0000h" and line 2 to
  259.          "RET".  This will just bypass the check.
  260.  
  261.               Now, this example is quite simple and would probally
  262.          never be used in a REAL protection routine.  I kept it simple
  263.          to show the point, see the example on how to crack DRAWING
  264.          ASSISTANT for a better example.
  265.  
  266.               The second and more perferd method is to simply bypass
  267.          the call to the protection routine and kill of the section of
  268.          code that test for the check position.  Take the following
  269.          example:
  270.  
  271.          10:     call 1                  ; call the first example
  272.          11:     cmp AX,0                ; Was it the original
  273.          12:     jz  Good2               ; Yes, then good
  274.          13:     ... BAD it was a copy   ; No, then bad
  275.          Good2:
  276.  
  277.               The above example, when used with the last example show
  278.          a typical call to a protection routine.  The perfered method
  279.          to crack this protection would not be to simply fake the
  280.          return, but to remove the call to the protection.  How to do
  281.          it, simple.  Just jump over the check.  Change line 10 to
  282.          "jmp Good2".  This will bypass the protection routine.
  283.  
  284.               Now, you might ask why would you want to take the extra
  285.          step of finding the call to the protection routine rather
  286.          than simply faking an int13 and returning with the proper
  287.          registers set.  2 reasons.  First, What if there wasn't
  288.          enough room to setup the registers the way you needed them.
  289.          Then you would have to take the extra step.  Second, what if
  290.          somewhere down the line, that routine is used for something
  291.          else (like the int13 is modified into an int10 in a game).
  292.          Since you have changed the bytes at that location, the
  293.          modifying routine would create code that wasn't exepcted.
  294.          But as always, if you can fake the return, and the program
  295.          works, leave it.  After all, not to many people go around
  296.          look at other peoples cracks (do they???).
  297.  
  298.               Now, what to do, if the program actually reads in
  299.          important data from the disk.  Well, there are 2 ways to go
  300.          about this (possibly more).  First, you could patch the
  301.          program so that when it calls it's protection routine, it
  302.          jumps to your user routine that opens a file and reads in the
  303.          data to the right place.  This method is preaty simple to add
  304.          to a .COM file but a much harder to patch on to the back of a
  305.          .EXE.  I won't really go in to this method much more than to
  306.          say use your brains.  It's not a difficult concept.
  307.  
  308.               The other method, is to create a LOADER or a TSR.  I
  309.          suggest creating an Interrupt Service Routine (ISR) that
  310.          handles loading in the data.  For example, let say you wrote
  311.          a routine to read in the needed data for a file.  It is not
  312.          to difficult to convert that routine into an ISR.  (For notes
  313.          on ISR and TSRs, try reading The Waite Group's "MS-DOS
  314.          PAPERS".  It has one of the best sections on the subject).
  315.  
  316.                         Consider this following example:
  317.  
  318.  
  319.          A:            call 1           ; test protection
  320.          B:            jnc Good         ; was it successfull
  321.          C:            ... BAD load     ; no then it's a copy
  322.                        ... EXIT TO DOS  ; so exit to dos
  323.          Good:         ... Good load    ; yes then it original
  324.                        call 7C00:0000   ; then jump of protection
  325.                                         ; data
  326.  
  327.          1:            mov ax,0209      ; Read 9 sectors starting from
  328.          2:            mov cx,290a      ; Track 29h Sector 0Ah (10)
  329.          3:            xor dx,dx        ; for drive A: head 0
  330.          4:            mov bx,7c00      ; read to 7c00:0
  331.          5:            mov es,bx        ;
  332.          6:            mov bx,0         ;
  333.          7:            int 13h          ;
  334.          8:            ret
  335.  
  336.  
  337.  
  338.               What the above example dos.  Lines 1-8 try to read in
  339.          sectors 0Ah - 12h for track 29h on drive A:.  This is the
  340.          protection check routine.  Lines A - Good attempt to check
  341.          the protection, and then if the check is good (CF = 0) then
  342.          a call to the loaded in code (the data loaded in by the
  343.          protection check) is made.
  344.  
  345.               What we want to do, is somehow when INT 13h is called,
  346.          load in the needed data for disk.  Well, here is my
  347.          suggestion.  First, I would change line 7 from "int 13h" to
  348.          "int BBh".  Next, I would create a small .COM loader that
  349.          would execute the main program as a child process (read the
  350.          DOS TECH REF on the EXEC function).  But before I did that, I
  351.          would write an ISR (interrupt service routine) for INT BBh.
  352.          Here is the general outline for the ISR
  353.  
  354.               ■ Use dos to open the file containing the needed data
  355.               ■ Read in the data to ES:BX (where int 13h would put it)
  356.               ■ Close the file
  357.               ■ set AX to 0000 and clear CF
  358.               ■ iret
  359.  
  360.               The loader would go like this :
  361.  
  362.               ■ Get current int BBh address (DOS func. 35h)
  363.               ■ Set int BBh address to ours (DOS func. 25h)
  364.               ■ use DOS to EXECUTE (Dos func. 4Bh) the program to be
  365.                 cracked
  366.               ■ Restore the address of BBh
  367.  
  368.               Well, that about all I have to say about cracking a dos
  369.          file.  I hope this section has been usefull to you.  Next I
  370.          will show by example the techinques in this section while
  371.          cracking I.B.M. Drawing Assistance (1.00).
  372.  
  373.               One last thing.  After you have cracked the program, try
  374.          running it from a hard drive with PW set to trap calls to INT
  375.          21h function 1Bh (get fat byte).  If the program make a call
  376.          to here, get the address and find that section of code.  What
  377.          the program is trying to do is check to see if you are
  378.          running from a hard drive (most programs have diffrent
  379.          protection routines for hard drives).  When you find it,
  380.          simply replace the "INT 21h" with a "MOV DS:[BX],FDh".  This
  381.          will fake the program in to thinking you are working on a
  382.          floppy disk.
  383.  
  384.               Ok, for our example we will be removing the code from
  385.          IBM's Drawing assistant.  Now now, I know it's not the best
  386.          program out there, but shit, It's hard to find shit with on
  387.          disk copy protection anymore.  So here we go...
  388.  
  389.               I needed 3 programs in cracking the assist. series.
  390.          Locksmith by Alph Logic, Periscope debugger, and DEBUG
  391.          (supplied with DOS).  By using these three programs together,
  392.          I was able to figure out and remove the copy protection in
  393.          under 30 minutes.
  394.  
  395.               Drawing Assistant (DA) is IBM's answer to colorpaint for
  396.          the Jr.  It is a simple drawing program (a more advanced
  397.          version is included in StoryBoard Deluxe) but easy to learn
  398.          and use.  So far, I have only seen version 1.00 of this
  399.          program.
  400.  
  401.               DA made calls to the copy protection routine in 3
  402.          diffrent modules.  The files "SETDRAW.EXE", "DRAWASST.EXE"
  403.          and "DRAWASST.TWO" all contained calls to the copy
  404.          protection.  Also, "DRAWASST.TWO" and "DRAWASST.EXE" are for
  405.          all intensive puporses then same file.
  406.  
  407.               I first started off by loading DRAWASST.EXE with debug
  408.          and searched for any int 13's by executing the debug command
  409.  
  410.                 s CS:0 FFFF CD 13         Search CS:0 - CS:FFFF for CD
  411.                                           13 (int 13)
  412.  
  413.            I located 2 diffrent calls to int 13h, so I then listed
  414.          them.  Here is what I found...
  415.  
  416.                      { First, some initialization routines }
  417.  
  418.                      18FD:0343 1E            PUSH   DS
  419.                      18FD:0344 B80000        MOV    AX,0000
  420.                      18FD:0347 50            PUSH   AX
  421.                      18FD:0348 B89724        MOV    AX,2497
  422.                      18FD:034B 8ED8          MOV    DS,AX
  423.                      18FD:034D BB1000        MOV    BX,0010
  424.                      18FD:0350 2E            CS:
  425.                      18FD:0351 8A07          MOV    AL,[BX]
  426.                      18FD:0353 3C00          CMP    AL,00
  427.                      18FD:0355 7418          JZ     036F
  428.  
  429.  
  430.                 { This set is called if DA has been installed }
  431.                              { on the hard drive }
  432.                   { When cracked, this will NEVER be called }
  433.  
  434.                      18FD:0357 B419          MOV    AH,19
  435.                      18FD:0359 CD21          INT    21
  436.                      18FD:035B 8AD0          MOV    DL,AL
  437.                      18FD:035D FEC2          INC    DL
  438.                      18FD:035F B41C          MOV    AH,1C
  439.                      18FD:0361 CD21          INT    21
  440.                      18FD:0363 8A07          MOV    AL,[BX]
  441.                      18FD:0365 BB9724        MOV    BX,2497
  442.                      18FD:0368 8EDB          MOV    DS,BX
  443.                      18FD:036A 3CF8          CMP    AL,F8
  444.                      18FD:036C 7475          JZ     03E3
  445.                      18FD:036E CB            RETF
  446.  
  447.             { This set is called if DA is running from the floppy }
  448.  
  449.                      18FD:036F B419          MOV    AH,19
  450.                      18FD:0371 CD21          INT    21
  451.                      18FD:0373 FEC0          INC    AL
  452.                      18FD:0375 B400          MOV    AH,00
  453.                      18FD:0377 A320C6        MOV    [C620],AX
  454.                      18FD:037A 8AD0          MOV    DL,AL
  455.                      18FD:037C B41C          MOV    AH,1C
  456.                      18FD:037E CD21          INT    21
  457.                      18FD:0380 8A07          MOV    AL,[BX]
  458.                      18FD:0382 BB9724        MOV    BX,2497
  459.                      18FD:0385 8EDB          MOV    DS,BX
  460.                      18FD:0387 3CF8          CMP    AL,F8
  461.                      18FD:0389 7408          JZ     0393
  462.  
  463.                  { Here is the called to read in the key disk }
  464.  
  465.                      18FD:038B E8A675        CALL   7934
  466.                      18FD:038E 3D0100        CMP    AX,0001
  467.                      18FD:0391 7450          JZ     03E3
  468.  
  469.            Let's take these code segments 1 at a time.  The fist, is
  470.          some simple initialization routines.  Here is the code, only
  471.          this time full comments are added.
  472.  
  473.          { First, some initialization routines }
  474.          ; Setup for return to DOS
  475.  
  476.          18FD:0343 1E            PUSH   DS
  477.          18FD:0344 B80000        MOV    AX,0000
  478.          18FD:0347 50            PUSH   AX
  479.  
  480.          ; Setup DS to point to the data segment
  481.  
  482.          18FD:0348 B89724        MOV    AX,2497
  483.          18FD:034B 8ED8          MOV    DS,AX
  484.  
  485.  
  486.          18FD:034D BB1000        MOV    BX,0010    ; CS:10 points to
  487.                                                    ; installed flag
  488.          18FD:0350 2E            CS:
  489.          18FD:0351 8A07          MOV    AL,[BX]
  490.  
  491.          18FD:0353 3C00          CMP    AL,00      ; If not installed,
  492.                                                    ; jump to diskette
  493.          18FD:0355 7418          JZ     036F       ; routines
  494.  
  495.            What we are want to do, is fool DA in to thinking that it
  496.          is stilling loading from diskette.  Nothing really needs to
  497.          be changed in this segment, but, just to be safe, we will
  498.          force the jump at 355.  To change the current values, use
  499.          DEBUG's [A]ssembler command.
  500.  
  501.                  A CS:355
  502.                  18FD:355 JMP 36F
  503.  
  504.            Now, we have forced the jump, we can move on to the third
  505.          code segment skipping over the second since it will never be
  506.          called again.  The 3rd code segment checks to see if you are
  507.          using a hard drive.  It does so by first getting the logical
  508.          drive letter, then reading in the FAT descriptor byte for
  509.          that drive.  Here is the commented code.
  510.  
  511.          { This set is called if DA is running from the floppy }
  512.  
  513.          ; First, get the current drive
  514.  
  515.          18FD:036F B419          MOV    AH,19     ; DOS function 19h -
  516.                                                   ; Get Current Drive
  517.          18FD:0371 CD21          INT    21
  518.  
  519.          18FD:0373 FEC0          INC    AL         ; Add 1 for BIOS
  520.          18FD:0375 B400          MOV    AH,00      ; Clear AH
  521.          18FD:0377 A320C6        MOV    [C620],AX  ; Store it at C620
  522.          18FD:037A 8AD0          MOV    DL,AL      ; Store it in DL
  523.          18FD:037C B41C          MOV    AH,1C      ; DOS function 1Ch
  524.                                                    ; Get Fat desc.
  525.          18FD:037E CD21          INT    21         ; returns pointer
  526.                                                    ; in DS:BX
  527.          18FD:0380 8A07          MOV    AL,[BX]    ; Get the actual
  528.                                                    ; byte
  529.          18FD:0382 BB9724        MOV    BX,2497    ; Restore DS
  530.          18FD:0385 8EDB          MOV    DS,BX
  531.  
  532.          18FD:0387 3CF8          CMP    AL,F8      ; Check to see if
  533.                                                    ; it is a H/D
  534.          18FD:0389 7408          JZ     0393       ; Yes, then jump
  535.          abort
  536.  
  537.          { Fall in to the check for the key disk }
  538.  
  539.            As you can see, this section of code is quite straigth
  540.          forward.  It just checks to see if you are using a hard
  541.          drive.  What we want to do is to fake an DOS function 1Ch and
  542.          return the value for a floppy.  This is done by putting the
  543.          value of FDh in AL then NOPing the rest.  Again use the
  544.          Debug's [A] command.
  545.  
  546.  
  547.                  A CS:37C
  548.  
  549.                  18FD:037C MOV AL,FD
  550.                  18FD:0380 NOP
  551.                  18FD:0381 NOP
  552.                  18FD:0382 NOP
  553.                  18FD:0383 NOP
  554.  
  555.            Now, you might ask why I didn't simple force a jump over
  556.          the code.  The answer is what if DA uses the value at C620 at
  557.          a later time (which it doesn't but let's pretend).  If I had
  558.          forced the jump then the value might not have been
  559.          initialized and the crack might not work.  Now that we have
  560.          simulated running from diskette, we must deal for the check
  561.          for the key disk.
  562.  
  563.               This is where Periscope came in to play.  Using
  564.          periscope, I made the above corrections and ran the program
  565.          up till CS:038B (the call to the check). Here is the code,
  566.          including the actual check.  I have indented the check to
  567.          make it easier to read.
  568.  
  569.  
  570.          { Here is the called to read in the key disk }
  571.  
  572.          18FD:038B E8A675        CALL   7934    ; Check key on disk
  573.                                                 ; (track 27h side 0)
  574.  
  575.            18FD:7934 A120C6        MOV   AX,[C620]     ; Get drive
  576.                                                        ; letter
  577.            18FD:7937 FEC8          DEC   AL
  578.            18FD:7939 A23BC6        MOV   [C63B],AL     ; Store it for
  579.                                                        ; later
  580.            18FD:793C 1E            PUSH  DS
  581.            18FD:793D 07            POP   ES
  582.            ; Setup pointers to what sectors to try to read
  583.  
  584.            18FD:793E BB30C6        MOV   BX,C630
  585.            18FD:7941 891E39C6      MOV   [C639],BX
  586.            18FD:7945 C6063CC603    MOV   BYTE PTR [C63C],03
  587.            18FD:794A C6063DC601    MOV   BYTE PTR [C63D],01
  588.  
  589.            ; Reset the disk
  590.  
  591.            18FD:794F B400          MOV   AH,00
  592.            18FD:7951 CD13          INT   13
  593.  
  594.            ; Get address of sector to read an put it in CL
  595.  
  596.            18FD:7953 8B1E39C6      MOV   BX,[C639]
  597.            18FD:7957 8A0F          MOV   CL,[BX]
  598.  
  599.  
  600.            ; Setup the rest of the read information
  601.  
  602.            18FD:7959 BBAE3D        MOV   BX,3DAE
  603.            18FD:795C 81C3D007      ADD   BX,07D0
  604.            18FD:7960 B001          MOV   AL,01
  605.            18FD:7962 B527          MOV   CH,27
  606.            18FD:7964 8A163BC6      MOV   DL,[C63B]
  607.            18FD:7968 B600          MOV   DH,00
  608.            18FD:796A B402          MOV   AH,02
  609.            18FD:796C CD13          INT   13
  610.  
  611.            ; Test for an error and jump if none is present (ie: the
  612.            ; copy protection has been removed)
  613.  
  614.            18FD:796E 80FC00        CMP   AH,00
  615.            18FD:7971 740C          JZ    797F
  616.  
  617.            ; test the bad read (protection is missing) 3 times
  618.  
  619.            18FD:7973 FE0E3CC6      DEC   BYTE PTR [C63C]
  620.            18FD:7977 75D6          JNZ   794F
  621.            18FD:7979 B80000        MOV   AX,0000
  622.            18FD:797C EB13          JMP   7991
  623.  
  624.            ; Get next sector to check.  If finished, set the flag and
  625.            ; return.
  626.  
  627.            18FD:797F FF0639C6      INC   WORD PTR [C639]
  628.            18FD:7983 FE063DC6      INC   BYTE PTR [C63D]
  629.            18FD:7987 803E3DC603    CMP   BYTE PTR [C63D],03
  630.            18FD:798C 75C1          JNZ   794F
  631.            18FD:798E B80100        MOV   AX,0001
  632.            18FD:7991 C3            RET
  633.  
  634.          ; Check to see if the OK flag was set (ax = 0001h means check
  635.          ; was good)
  636.          18FD:038E 3D0100        CMP    AX,0001
  637.          18FD:0391 7450          JZ     03E3
  638.  
  639.  
  640.            The key check used in DA is quite simple.  It simple tries
  641.          to read in the illegaly numbered sectors on Track 27h side
  642.          0h.  If they are missing, it assumes that it is running a
  643.          pirated copy.  What we must do, is to fool the scheme in to
  644.          thinking a good read happened.  I choses to fake the read
  645.          using the easiest method.  Since the protection scheme only
  646.          check to see if AX returns the value > 0000h, I simply
  647.          modified the routine at 1BFD:7934 to set AX to 0000h and then
  648.          return.  Here is the new code (enter using debug's A
  649.          command)...
  650.  
  651.                  A 1BFD:7934
  652.                  1BFD:7934 MOV AX,0000
  653.                  1BFD:7936 RET
  654.  
  655.            Now, this file is unprotected and if you type "G" at
  656.          debug's command prompt, the program will execute, sort-of.
  657.          See DRAWASST.EXE calls DRAWASST.TWO which also has the
  658.          protection scheme.  So both must be changed.  To make to
  659.          changes perement in DRAWASST.EXE, rename the file to
  660.          DRAWASST.DEB and edit it.  To find the address of the start
  661.          of the protection code, use debug's search command...
  662.  
  663.                  S CS:0 FFFF B4 19 CD 21 8A D0
  664.  
  665.            Now, just uses the modified address to change the program
  666.          (the code will still be the same, just all calls and jumps
  667.          will be to diffrent addresses).  Use the same process to stip
  668.          DRAWASST.TWO (it uses the exact same code).  When you have
  669.          both of those files unprotected, you can move on to
  670.          unprotecting the setup program "SETDRAW.EXE"
  671.  
  672.  
  673.               DRAWASST.EXE AND .TWO are not the only programs that
  674.          make calls to the protection routine.  SETDRAW.EXE also makes
  675.          the above calls.  Although the check here is much easier to
  676.          bypass.  Here is the asm listing of SETDRAW with all of the
  677.          calls to the protection.  This time, I will not go in to
  678.          quite as much detail as I did for the other two version.
  679.  
  680.            I will tell you this.  When SETDRAW checks the key disk,
  681.          first it checks to see if the protection exists and then to
  682.          see if the track hasn't been modified.  It again uses AX to
  683.          determine what happeded.  I used Periscope to trace through
  684.          the original version to find out what the correct values are.
  685.            Here is the asm code...
  686.  
  687.          ; Initialization - checks the current mode and saves it.
  688.  
  689.          18FD:0000 1E            PUSH     DS
  690.          18FD:0001 B80000        MOV      AX,0000
  691.          18FD:0004 50            PUSH     AX
  692.          18FD:0005 B8321A        MOV      AX,1A32
  693.          18FD:0008 8ED8          MOV      DS,AX
  694.          18FD:000A B40F          MOV      AH,0F
  695.          18FD:000C CD10          INT      10
  696.          18FD:000E 3C02          CMP      AL,02
  697.          18FD:0010 740D          JZ       001F
  698.          18FD:0012 3C03          CMP      AL,03
  699.          18FD:0014 7409          JZ       001F
  700.          18FD:0016 A28900        MOV      [0089],AL
  701.          18FD:0019 B002          MOV      AL,02
  702.          18FD:001B B400          MOV      AH,00
  703.          18FD:001D CD10          INT      10
  704.  
  705.          ; Gets the current drive
  706.  
  707.          18FD:001F B400          MOV      AH,00
  708.          18FD:0021 B419          MOV      AH,19
  709.          18FD:0023 CD21          INT      21
  710.          18FD:0025 A28700        MOV      [0087],AL
  711.          18FD:0028 8AD0          MOV      DL,AL
  712.          18FD:002A FEC2          INC      DL
  713.  
  714.          ; Checks the FAT descriptor
  715.  
  716.          18FD:002C B41C          MOV      AH,1C
  717.          18FD:002E CD21          INT      21
  718.          18FD:0030 8A07          MOV      AL,[BX]
  719.          18FD:0032 BB321A        MOV      BX,1A32
  720.          18FD:0035 8EDB          MOV      DS,BX
  721.          18FD:0037 C606880000    MOV      BYTE PTR [0088],00
  722.          18FD:003C 3CF8          CMP      AL,F8
  723.          18FD:003E 742A          JZ       006A
  724.  
  725.          ; Read in protection scheme
  726.  
  727.          18FD:0040 8A168700      MOV      DL,[0087]
  728.          18FD:0044 E87E0A        CALL     0AC5
  729.          18FD:0047 C606880000    MOV      BYTE PTR [0088],00
  730.          18FD:004C 3D0000        CMP      AX,0000
  731.          18FD:004F 7419          JZ       006A
  732.  
  733.          ; Read in the dummy scheme
  734.  
  735.          18FD:0051 C606880001    MOV      BYTE PTR [0088],01
  736.          18FD:0056 8A168700      MOV      DL,[0087]
  737.          18FD:005A B84500        MOV      AX,0045
  738.          18FD:005D E8BD0A        CALL     0B1D
  739.          18FD:0060 3D0000        CMP      AX,0000
  740.          18FD:0063 7405          JZ       006A
  741.  
  742.          ; Start of actual routine.
  743.  
  744.          18FD:0065 C606880000    MOV      BYTE PTR [0088],00
  745.  
  746.            There is isn't much to say about the above code.  To bypass
  747.          it, we will change the hard drive check (int 21 function 1c).
  748.          Do the same thing we did for DRAWASST.EXE
  749.  
  750.                 A 18FD:2C
  751.                 18FD:002C mov AL,FD
  752.                 18FD:002E nop
  753.                 18FD:002F nop
  754.                 18FD:0030 nop
  755.                 18FD:0031 nop
  756.  
  757.            Now, just jump over the check to the key disk.
  758.  
  759.                A 18FD:40
  760.  
  761.                18FD:0040 jmp 0065
  762.  
  763.            And thats it.  Now SETDRAW is unprotected.  Drawing
  764.          Assistant may be used, copied or backed up at your pleasure.
  765.  
  766.  
  767.               As you can see, this was a good example although the
  768.          fact that if you only made the changes in DRAWASST.EXE and
  769.          not in DRAWASST.TWO then the program would copy DRAWASST.TWO
  770.          to DRAWASST.EXE to restore the protection was a bit strange.
  771.  
  772.               Well, I hope you are proud.  But be warned, next we take
  773.          on DOC checks, so get a good nights sleep.  Till then, play
  774.          lots of SMASH T.V.
  775.  
  776.                                                       -Buckaroo Banzai
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.                                      page 9
  821.  
  822.  
  823. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  824.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  825.  
  826.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  827.  Burn This Flag                           Zardoz               408/363-9766
  828.  realitycheck                             Poindexter Fortran   510/527-1662
  829.  Lies Unlimited                           Mick Freen           801/278-2699
  830.  The New Dork Sublime                     Biffnix              415/864-DORK
  831.  The Shrine                               Rif Raf              206/794-6674
  832.  Planet Mirth                             Simon Jester         510/786-6560
  833.  
  834.                           "Raw Data for Raw Nerves"
  835. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  836.  
  837.                           CRACKING 101 - 1990 edition
  838.  
  839.                                     Lesson 2
  840.  
  841.                               ┌──────────────────┐
  842.                               │ DOC CHECK PRIMER │
  843.                               └──────────────────┘
  844.  
  845.                                by Buckaroo Banzai
  846.  
  847.  
  848.               Ok, in   this  textfile,  I  will  start  talking  about
  849.          removing doc check protection schemes.  I find, the doc check
  850.          scheme to be slightly more difficult  to  work on than normal
  851.          INT 13 schemes.
  852.  
  853.               What is  a  doc  check.   Usually, a doc  check  when  a
  854.          program ask the  user to enter a phrase or code supplied with
  855.          the manual.  Now, one might think  that  "Shit,  we  can just
  856.          type all the codes in to a textfile and upload  it  with  the
  857.          DOCS", but that  way of thinking breaks down on programs such
  858.          as Future Classics where there  are  6  pages  with about 200
  859.          codes per page.   So  it is just better to remove  the  check
  860.          completely.
  861.  
  862.               In this  primer, I will get in to the theory of removing
  863.          a doc check, then start with  a  simple  example  (Electronic
  864.          Art's ESCAPE FROM HELL).  Then in the next file,  I will take
  865.          you deeper in  to  the world of doc checks and work with more
  866.          difficult examples.  But for now, lets get started.
  867.  
  868.               A doc check, in basic theory works much like normal
  869.          INT 13 copy protection.  Somewhere  in  the  beginning of the
  870.          program before it really starts, the check is  made.   If the
  871.          result is ok  (ie the user enters the correct word or phrase)
  872.          then the program continues.  If  not, then the program simply
  873.          exits to dos.
  874.  
  875.               Simple right,  well  not  really.   Usually,  the  input
  876.          routine is part  of the standard input routine of the program
  877.          so you just can't go about modify  the  call  to INT 16h (the
  878.          keyboard interrupt) like you could with INT 13h.   So,  where
  879.          do we start.   If  you  think back to cracking the old INT 13
  880.          protection schemes, you would  use  a program like PCWATCH or
  881.          TRAP13 to get a rough idea of where the call  resides.   With
  882.          doc checks, this is really not the best way to do it.
  883.  
  884.               I suggest  that  you try to break in to the program well
  885.          before the protection is checked.   Remember,  we must remove
  886.          the check without messing with the actual input routine so we
  887.          want to come in highest level.
  888.  
  889.               So, how  do we break in.  By using a good  debugger.   I
  890.          suggest Periscope.  I find it is the best and easiest to use.
  891.          Once we are  in,  all  the  is  left  is to trace through the
  892.          program until we find the topmost call to the doc check.  Now
  893.          we're moving.
  894.  
  895.               So let's say we have broken  in to the program and found
  896.          the topmost call to the doc check.  What next.   We  must try
  897.          to figure out   what   the   program   does.    There  are  2
  898.          possibilities.  First, the program  could  simply  check  the
  899.          inputed string against a value in memory, and  if  they don't
  900.          match simply exit  to  dos and if they do, just continue with
  901.          the program; or if the input  matches  it  can  set a flag in
  902.          memory that is checked by some routine later.
  903.  
  904.               So, on  to  the  example.   NOTE! All address  might  be
  905.          different.  This is  how  it  looked when I cracked it.  ALSO
  906.          NOTE, you should  be cracking  without  any  memory  resident
  907.          programs.  Make sure MEMORY is clear, and that  you  load the
  908.          system the same   way  each  time.   Remember,  if  you  load
  909.          everything the same, everything  will  be  in the same memory
  910.          location.
  911.  
  912.               So, what is our first step.  Well, I suggest picking out
  913.          the right tools to do the job.  In this case,  You  will only
  914.          need PERISCOPE (and  the  addin  program  that  comes with it
  915.          called PSKEY) and a good file editor  (when I say good I mean
  916.          it can edit and search in hex).  So let's get started.
  917.  
  918.               First, we  load  PERISCOPE (PS from now  on).   This  is
  919.          gonna be the  debugger  we use.  Next, we need a quick way in
  920.          to the debugger.  Since ESCAPE FROM HELL (EFH from now on) is
  921.          not all the picky about how it  keeps  a  crackest out, PSKEY
  922.          will do just fine but not without using a little trick.
  923.  
  924.               Normally, when using PSKEY (for those of  you who do not
  925.          know what PSKEY does, it allows up to break in to PS usings a
  926.          TSR hotkey) and  you  hit  the  hotkey,  PSKEY does an INT 2h
  927.          (NMI).  This then brings up PS  and  you  are  set.  But, EFH
  928.          revectors INT 2h (NMI) to simply an IRET so this  method does
  929.          not work.  How  do  we  get  around this, well, INT 2h is the
  930.          default used with PSKEY but not the only way to work it.  You
  931.          can also use  INT  3h  (Breakpoint   interrupt)  or  INT  15h
  932.          (Extended services interrrupt) to activate PS.   In this case
  933.          we will use  INT  3h;  so  when  we  invoke  PSKEY we add the
  934.          command line parameter "3" (ie:  "PSKEY  3CAL"  invokes PSKEY
  935.          using INT 3h setting the hotkey to CTRL-ALT-LEFT_SHIFT).
  936.  
  937.               So, now that we have a way in to EFH, where  do  we want
  938.          to break out.   Well  boys  (and Girls, and BTW: if there are
  939.          any Fems reading this, give me  a ring, I'd like to hear from
  940.          ya) I don't have any formula to give, but remember, I suggest
  941.          that we try  to  break  in  to  the  outermost   loop.    So,
  942.          experiance (and a  good  fucking guess) tells me to break out
  943.          in the title screen before the music begins.
  944.  
  945.               It just so happens that this time I was right (And noone
  946.          had to get nail to anything -D.A.)   Right  after  the  title
  947.          picture comes up, press your hotkey (oooh).  The PS debugging
  948.          screen should come up and you should see the  follow  section
  949.          of code..
  950.  
  951.          2309:019C CF            IRET
  952.          2309:019D 3D0085        CMP AX,8500
  953.          etc.
  954.  
  955.               This is  the exit code from PSKEY.  By usings the J(ump)
  956.          command, and executing the IRET,  you  will be put back right
  957.          to the spot  where  you pressed the hotkey (boy  I'm  getting
  958.          excited).  I would love to give you a code fragment here, but
  959.          each time you press the hotkey you will end up at a different
  960.          point.
  961.  
  962.               So what  do we do next.  Well, we will just have to keep
  963.          executing code until we find some  reference point.  Remember
  964.          how I said we wanted to break out before we reached  to music
  965.          at the title  screen.   Well,  you can bet that we are in the
  966.          outermost loop since the music comes before the doc check and
  967.          we haven't reached the call to  the music routine yet.  So we
  968.          start executing code.
  969.  
  970.               Then all  of  the  sudden  BOOM!  you  execute   a  CALL
  971.          instruction and music  bursts  through  the  speaker.  AHa, a
  972.          reference point.  We know we are on the right track.
  973.  
  974.               Press <ESC> during the music  so  that  we  can skip the
  975.          stupid intro for now.  After pressing <ESC> you should regain
  976.          control at the  instruction  after  the  call  to  the  music
  977.          routine.
  978.  
  979.               From here  on  out,  we  want  to procede rather slowly.
  980.          Each time you reach a CALL instruction you want to write down
  981.          the address where it is located.   Sooner  or  later you will
  982.          execute a CALL instruction and EFH will jump  in  to it's doc
  983.          check routine.  But  damn,  you  have the address of the that
  984.          call WRITTEN DOWN  right.   So   simply   reboot  and  reload
  985.          everything.
  986.  
  987.               Break out   in  to  PS  at  the  title  picture.    Now,
  988.          unassemble the address   you  wrote  down.   You  should  see
  989.          something like this
  990.  
  991.          21DD:3EA4 9AA5368132     CALL 3281:36A5  (current line)
  992.          21DD:3EA4 9A522F8132     CALL 3281:2F52
  993.          21DD:3EA4 C706BB070000   MOV WORD PTR [07BB],0000
  994.          21DD:3EA4 8BE5           MOV SP,BP
  995.          21DD:3EA4 5D             POP BP
  996.          21DD:3EA4 CB             RETF
  997.  
  998.               The first call, is the call  to the doc check, therefore
  999.          it can for  now  be assumed that the second call  is  to  the
  1000.          actual game (remember,    most    programmers   follow   good
  1001.          programming practice and will exit  the routine that does the
  1002.          doc check to  finish the game).  Please NOTE,  from  here  on
  1003.          out, if I  say  go back to STEP 1, reboot the machine, reload
  1004.          and get to this point.  Ok.
  1005.  
  1006.               Our first though in seeing  code like this is shit maybe
  1007.          they just check the keyword and exit to dos if  it's bad;  if
  1008.          it it's good,  then  they just exit that subroutine and start
  1009.          the game.  So having lots of time  on  our hands, we try just
  1010.          executing the second CALL and bypass the first  (you  can  do
  1011.          that by setting  the IP (instruction pointer) register to the
  1012.          offset of the second call [In  our  case 3EA9]).  When you do
  1013.          this, the screen clears, and you see the character  (Richard)
  1014.          on the screen.   But just as you think it worked, it switches
  1015.          back to text mode and prints the message "Hell is HOT".  Shit
  1016.          I hate it when that happens.
  1017.  
  1018.               So now we know that somewhere  in the doc check routine,
  1019.          EFH sets a  flag in memory.  We must figure  out  where  this
  1020.          flag is and  figure out a way to fake it.  So go back to step
  1021.          1, this time, let's trace (using the T command) in to the doc
  1022.          check routine.
  1023.  
  1024.               I have included the entire  outerloop  of  the doc check
  1025.          routine here.  The   small  subroutines  are   not   of   any
  1026.          importants and infact  when I first crack EFH, I never traced
  1027.          in to any of them.  It wasn't  until  I  was out getting this
  1028.          information that I took a look to see what they did.
  1029.  
  1030.               Here is  the  dos check code.  I have place  some  basic
  1031.          instructions that should  help you as you go along.  Although
  1032.          you address might be different than mine, I will use mine for
  1033.          reference.  Also, I have noted some special subroutines along
  1034.          the way.
  1035.  
  1036.          ( - Unassembled DOC CHECK for ESCAPE FROM HELL [outer loop] )
  1037.  
  1038.               First, we start off with  some  initialization routines.
  1039.          You don't need to be all to concerned with them.
  1040.  
  1041.          3281:36A5 55            PUSH BP
  1042.          3281:36A6 8BEC          MOV BP,SP
  1043.          3281:36A8 83EC2A        SUB SP,+2A
  1044.          3281:36AB C746DE0000    MOV WORD PTR [BP-22],0000
  1045.          3281:36B0 B80600        MOV AX,0006
  1046.          3281:36B3 50            PUSH AX
  1047.          3281:36B4 9AE3169900    CALL 0099:16E3
  1048.          3281:36B9 59            POP CX
  1049.          3281:36BA 48            DEC AX
  1050.          3281:36BB 8946DA        MOV [BP-26],AX
  1051.          3281:36BE B80F00        MOV AX,000F
  1052.          3281:36C1 50            PUSH AX
  1053.          3281:36C2 9AE3169900    CALL 0099:16E3
  1054.          3281:36C7 59            POP CX
  1055.          3281:36C8 48            DEC AX
  1056.          3281:36C9 8946DC        MOV [BP-24],AX
  1057.          3281:36CC C706CB070E00  MOV WORD PTR [07CB],000E
  1058.          3281:36D2 C746D60000    MOV WORD PTR [BP-2A],0000
  1059.          3281:36D7 E9C002        JMP 399A
  1060.          3281:36DA C746D80000    MOV WORD PTR [BP-28],0000
  1061.          3281:36DF E92501        JMP 3807
  1062.          3281:36E2 9A9B479900    CALL 0099:479B
  1063.          3281:36E7 B83866        MOV AX,6638
  1064.          3281:36EA 50            PUSH AX
  1065.          3281:36EB A03407        MOV AL,[0734]
  1066.          3281:36EE B400          MOV AH,00
  1067.          3281:36F0 50            PUSH AX
  1068.          3281:36F1 B80C00        MOV AX,000C
  1069.          3281:36F4 50            PUSH AX
  1070.          3281:36F5 B8CF00        MOV AX,00CF
  1071.          3281:36F8 50            PUSH AX
  1072.          3281:36F9 8B46DC        MOV AX,[BP-24]
  1073.          3281:36FC BA5800        MOV DX,0058
  1074.          3281:36FF F7E2          MUL DX
  1075.          3281:3701 8BD8          MOV BX,AX
  1076.          3281:3703 8A87F640      MOV AL,[BX+40F6]
  1077.          3281:3707 B400          MOV AH,00
  1078.          3281:3709 8BD8          MOV BX,AX
  1079.          3281:370B 81C39400      ADD BX,0094
  1080.          3281:370F D1E3          SHL BX,1
  1081.          3281:3711 D1E3          SHL BX,1
  1082.          3281:3713 FFB7F25D      PUSH [BX+5DF2]
  1083.          3281:3717 FFB7F05D      PUSH [BX+5DF0]
  1084.          3281:371B 9AE7019900    CALL 0099:01E7
  1085.          3281:3720 83C40C        ADD SP,+0C
  1086.          3281:3723 8B46DA        MOV AX,[BP-26]
  1087.          3281:3726 3D0500        CMP AX,0005
  1088.          3281:3729 7603          JBE 372E
  1089.          3281:372B E9B200        JMP 37E0
  1090.          3281:372E 8BD8          MOV BX,AX
  1091.          3281:3730 D1E3          SHL BX,1
  1092.          3281:3732 2E            CS:
  1093.          3281:3733 FFA73737      JMP [BX+3737]
  1094.          3281:3737 43            INC BX
  1095.          3281:3738 37            AAA
  1096.          3281:3739 5E            POP SI
  1097.          3281:373A 37            AAA
  1098.          3281:373B 7837          JS 3774
  1099.          3281:373D 92            XCHG DX,AX
  1100.          3281:373E 37            AAA
  1101.          3281:373F AC            LODSB
  1102.          3281:3740 37            AAA
  1103.          3281:3741 C637B8        MOV BYTE PTR [BX],B8
  1104.          3281:3744 2000          AND [BX+SI],AL
  1105.          3281:3746 50            PUSH AX
  1106.          3281:3747 B82E01        MOV AX,012E
  1107.          3281:374A 50            PUSH AX
  1108.          3281:374B B88100        MOV AX,0081
  1109.          3281:374E 50            PUSH AX
  1110.          3281:374F B87348        MOV AX,4873
  1111.          3281:3752 50            PUSH AX
  1112.          3281:3753 9AD6029900    CALL 0099:02D6
  1113.          3281:3758 83C408        ADD SP,+08
  1114.          3281:375B E98200        JMP 37E0
  1115.          3281:375E B82000        MOV AX,0020
  1116.          3281:3761 50            PUSH AX
  1117.          3281:3762 B82E01        MOV AX,012E
  1118.          3281:3765 50            PUSH AX
  1119.          3281:3766 B88100        MOV AX,0081
  1120.          3281:3769 50            PUSH AX
  1121.          3281:376A B88648        MOV AX,4886
  1122.          3281:376D 50            PUSH AX
  1123.          3281:376E 9AD6029900    CALL 0099:02D6
  1124.          3281:3773 83C408        ADD SP,+08
  1125.          3281:3776 EB68          JMP 37E0
  1126.          3281:3778 B82000        MOV AX,0020
  1127.          3281:377B 50            PUSH AX
  1128.          3281:377C B82E01        MOV AX,012E
  1129.          3281:377F 50            PUSH AX
  1130.          3281:3780 B88100        MOV AX,0081
  1131.          3281:3783 50            PUSH AX
  1132.          3281:3784 B8AD48        MOV AX,48AD
  1133.          3281:3787 50            PUSH AX
  1134.          3281:3788 9AD6029900    CALL 0099:02D6
  1135.          3281:378D 83C408        ADD SP,+08
  1136.          3281:3790 EB4E          JMP 37E0
  1137.          3281:3792 B82000        MOV AX,0020
  1138.          3281:3795 50            PUSH AX
  1139.          3281:3796 B82E01        MOV AX,012E
  1140.          3281:3799 50            PUSH AX
  1141.          3281:379A B88100        MOV AX,0081
  1142.          3281:379D 50            PUSH AX
  1143.          3281:379E B8C748        MOV AX,48C7
  1144.          3281:37A1 50            PUSH AX
  1145.          3281:37A2 9AD6029900    CALL 0099:02D6
  1146.          3281:37A7 83C408        ADD SP,+08
  1147.          3281:37AA EB34          JMP 37E0
  1148.          3281:37AC B82000        MOV AX,0020
  1149.          3281:37AF 50            PUSH AX
  1150.          3281:37B0 B82E01        MOV AX,012E
  1151.          3281:37B3 50            PUSH AX
  1152.          3281:37B4 B88100        MOV AX,0081
  1153.          3281:37B7 50            PUSH AX
  1154.          3281:37B8 B8E848        MOV AX,48E8
  1155.          3281:37BB 50            PUSH AX
  1156.          3281:37BC 9AD6029900    CALL 0099:02D6
  1157.          3281:37C1 83C408        ADD SP,+08
  1158.          3281:37C4 EB1A          JMP 37E0
  1159.          3281:37C6 B82000        MOV AX,0020
  1160.          3281:37C9 50            PUSH AX
  1161.          3281:37CA B82E01        MOV AX,012E
  1162.          3281:37CD 50            PUSH AX
  1163.          3281:37CE B88100        MOV AX,0081
  1164.          3281:37D1 50            PUSH AX
  1165.          3281:37D2 B80F49        MOV AX,490F
  1166.          3281:37D5 50            PUSH AX
  1167.          3281:37D6 9AD6029900    CALL 0099:02D6
  1168.          3281:37DB 83C408        ADD SP,+08
  1169.          3281:37DE EB00          JMP 37E0
  1170.          3281:37E0 B82D00        MOV AX,002D
  1171.          3281:37E3 50            PUSH AX
  1172.          3281:37E4 B88200        MOV AX,0082
  1173.          3281:37E7 50            PUSH AX
  1174.          3281:37E8 9A96029900    CALL 0099:0296
  1175.          3281:37ED 59            POP CX
  1176.          3281:37EE 59            POP CX
  1177.          3281:37EF B82849        MOV AX,4928
  1178.          3281:37F2 50            PUSH AX
  1179.          3281:37F3 9A3F039900    CALL 0099:033F
  1180.          3281:37F8 59            POP CX
  1181.          3281:37F9 837ED800      CMP WORD PTR [BP-28],+00
  1182.          3281:37FD 7505          JNZ 3804
  1183.  
  1184.               Here is the first point of interest.  The call on the
  1185.          following line will display the "what is xxxx" message. ─┐
  1186.                                                                   │
  1187.          3281:37FF 9A1B019900    CALL 0099:011B <─────────────────┘
  1188.  
  1189.          3281:3804 FF46D8        INC WORD PTR [BP-28]
  1190.          3281:3807 837ED802      CMP WORD PTR [BP-28],+02
  1191.          3281:380B 7D03          JGE 3810
  1192.          3281:380D E9D2FE        JMP 36E2
  1193.          3281:3810 8B46DA        MOV AX,[BP-26]
  1194.          3281:3813 3D0500        CMP AX,0005
  1195.          3281:3816 7603          JBE 381B
  1196.          3281:3818 E97401        JMP 398F
  1197.          3281:381B 8BD8          MOV BX,AX
  1198.          3281:381D D1E3          SHL BX,1
  1199.          3281:381F 2E            CS:
  1200.          3281:3820 FFA72438      JMP [BX+3824]
  1201.          3281:3824 3038          XOR [BX+SI],BH
  1202.          3281:3826 6E            DB 6E
  1203.          3281:3827 38AC38EA      CMP [SI+EA38],CH
  1204.          3281:382B 3827          CMP [BX],AH
  1205.          3281:382D 396439        CMP [SI+39],SP
  1206.          3281:3830 B81000        MOV AX,0010
  1207.          3281:3833 50            PUSH AX
  1208.          3281:3834 16            PUSH SS
  1209.          3281:3835 8D46E2        LEA AX,[BP-1E]
  1210.          3281:3838 50            PUSH AX
  1211.          3281:3839 9AFB149900    CALL 0099:14FB
  1212.          3281:383E 83C406        ADD SP,+06
  1213.          3281:3841 8D46E2        LEA AX,[BP-1E]
  1214.          3281:3844 50            PUSH AX
  1215.          3281:3845 9A0F00B81B    CALL 1BB8:000F
  1216.          3281:384A 59            POP CX
  1217.          3281:384B 8B46DC        MOV AX,[BP-24]
  1218.          3281:384E BA5800        MOV DX,0058
  1219.          3281:3851 F7E2          MUL DX
  1220.          3281:3853 05F740        ADD AX,40F7
  1221.          3281:3856 50            PUSH AX
  1222.          3281:3857 8D46E2        LEA AX,[BP-1E]
  1223.          3281:385A 50            PUSH AX
  1224.          3281:385B 9A0E00661A    CALL 1A66:000E
  1225.          3281:3860 59            POP CX
  1226.          3281:3861 59            POP CX
  1227.          3281:3862 0BC0          OR AX,AX
  1228.          3281:3864 7505          JNZ 386B
  1229.          3281:3866 C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1230.          3281:386B E92101        JMP 398F
  1231.          3281:386E B81000        MOV AX,0010
  1232.          3281:3871 50            PUSH AX
  1233.          3281:3872 16            PUSH SS
  1234.          3281:3873 8D46E2        LEA AX,[BP-1E]
  1235.          3281:3876 50            PUSH AX
  1236.          3281:3877 9AFB149900    CALL 0099:14FB
  1237.          3281:387C 83C406        ADD SP,+06
  1238.          3281:387F 8D46E2        LEA AX,[BP-1E]
  1239.          3281:3882 50            PUSH AX
  1240.          3281:3883 9A0F00B81B    CALL 1BB8:000F
  1241.          3281:3888 59            POP CX
  1242.          3281:3889 8B46DC        MOV AX,[BP-24]
  1243.          3281:388C BA5800        MOV DX,0058
  1244.          3281:388F F7E2          MUL DX
  1245.          3281:3891 050841        ADD AX,4108
  1246.          3281:3894 50            PUSH AX
  1247.          3281:3895 8D46E2        LEA AX,[BP-1E]
  1248.          3281:3898 50            PUSH AX
  1249.          3281:3899 9A0E00661A    CALL 1A66:000E
  1250.          3281:389E 59            POP CX
  1251.          3281:389F 59            POP CX
  1252.          3281:38A0 0BC0          OR AX,AX
  1253.          3281:38A2 7505          JNZ 38A9
  1254.          3281:38A4 C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1255.          3281:38A9 E9E300        JMP 398F
  1256.          3281:38AC B81000        MOV AX,0010
  1257.          3281:38AF 50            PUSH AX
  1258.          3281:38B0 16            PUSH SS
  1259.          3281:38B1 8D46E2        LEA AX,[BP-1E]
  1260.          3281:38B4 50            PUSH AX
  1261.          3281:38B5 9AFB149900    CALL 0099:14FB
  1262.          3281:38BA 83C406        ADD SP,+06
  1263.          3281:38BD 8D46E2        LEA AX,[BP-1E]
  1264.          3281:38C0 50            PUSH AX
  1265.          3281:38C1 9A0F00B81B    CALL 1BB8:000F
  1266.          3281:38C6 59            POP CX
  1267.          3281:38C7 8B46DC        MOV AX,[BP-24]
  1268.          3281:38CA BA5800        MOV DX,0058
  1269.          3281:38CD F7E2          MUL DX
  1270.          3281:38CF 051941        ADD AX,4119
  1271.          3281:38D2 50            PUSH AX
  1272.          3281:38D3 8D46E2        LEA AX,[BP-1E]
  1273.          3281:38D6 50            PUSH AX
  1274.          3281:38D7 9A0E00661A    CALL 1A66:000E
  1275.          3281:38DC 59            POP CX
  1276.          3281:38DD 59            POP CX
  1277.          3281:38DE 0BC0          OR AX,AX
  1278.          3281:38E0 7505          JNZ 38E7
  1279.          3281:38E2 C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1280.          3281:38E7 E9A500        JMP 398F
  1281.          3281:38EA B81000        MOV AX,0010
  1282.          3281:38ED 50            PUSH AX
  1283.          3281:38EE 16            PUSH SS
  1284.          3281:38EF 8D46E2        LEA AX,[BP-1E]
  1285.          3281:38F2 50            PUSH AX
  1286.          3281:38F3 9AFB149900    CALL 0099:14FB
  1287.          3281:38F8 83C406        ADD SP,+06
  1288.          3281:38FB 8D46E2        LEA AX,[BP-1E]
  1289.          3281:38FE 50            PUSH AX
  1290.          3281:38FF 9A0F00B81B    CALL 1BB8:000F
  1291.          3281:3904 59            POP CX
  1292.          3281:3905 8B46DC        MOV AX,[BP-24]
  1293.          3281:3908 BA5800        MOV DX,0058
  1294.          3281:390B F7E2          MUL DX
  1295.          3281:390D 052A41        ADD AX,412A
  1296.          3281:3910 50            PUSH AX
  1297.          3281:3911 8D46E2        LEA AX,[BP-1E]
  1298.          3281:3914 50            PUSH AX
  1299.          3281:3915 9A0E00661A    CALL 1A66:000E
  1300.          3281:391A 59            POP CX
  1301.          3281:391B 59            POP CX
  1302.          3281:391C 0BC0          OR AX,AX
  1303.          3281:391E 7505          JNZ 3925
  1304.          3281:3920 C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1305.          3281:3925 EB68          JMP 398F
  1306.          3281:3927 B81000        MOV AX,0010
  1307.          3281:392A 50            PUSH AX
  1308.          3281:392B 16            PUSH SS
  1309.          3281:392C 8D46E2        LEA AX,[BP-1E]
  1310.          3281:392F 50            PUSH AX
  1311.  
  1312.               Next point of interest.  When you execute this line, the
  1313.          game will pause and wait for you to enter the code word from
  1314.          the manual.  ────────────────────────────────┐
  1315.                                                       │
  1316.                                                       │
  1317.          3281:3930 9AFB149900    CALL 0099:14FB <─────┘
  1318.  
  1319.          3281:3935 83C406        ADD SP,+06
  1320.          3281:3938 8D46E2        LEA AX,[BP-1E]
  1321.          3281:393B 50            PUSH AX
  1322.          3281:393C 9A0F00B81B    CALL 1BB8:000F
  1323.          3281:3941 59            POP CX
  1324.          3281:3942 8B46DC        MOV AX,[BP-24]
  1325.          3281:3945 BA5800        MOV DX,0058
  1326.          3281:3948 F7E2          MUL DX
  1327.          3281:394A 053B41        ADD AX,413B
  1328.          3281:394D 50            PUSH AX
  1329.          3281:394E 8D46E2        LEA AX,[BP-1E]
  1330.          3281:3951 50            PUSH AX
  1331.          3281:3952 9A0E00661A    CALL 1A66:000E
  1332.          3281:3957 59            POP CX
  1333.          3281:3958 59            POP CX
  1334.          3281:3959 0BC0          OR AX,AX
  1335.          3281:395B 7505          JNZ 3962
  1336.          3281:395D C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1337.          3281:3962 EB2B          JMP 398F
  1338.          3281:3964 33D2          XOR DX,DX
  1339.          3281:3966 B8B80B        MOV AX,0BB8
  1340.          3281:3969 52            PUSH DX
  1341.          3281:396A 50            PUSH AX
  1342.  
  1343.               Next point of interest.  This call is the final
  1344.          evaluation of the entered word (or phrase).  On return, it
  1345.          checks a checksum value.  This whole next section of code
  1346.          (up to 3281:39Ad) simply test the validity of the keyword you
  1347.          entered. I have marked the all jumps that happened when I
  1348.          entered my keyword with an " * ".
  1349.  
  1350.          3281:396B 9A71139900    CALL 0099:1371
  1351.          3281:3970 59            POP CX
  1352.          3281:3971 59            POP CX
  1353.          3281:3972 8946E0        MOV [BP-20],AX
  1354.          3281:3975 8B46DC        MOV AX,[BP-24]
  1355.          3281:3978 BA5800        MOV DX,0058
  1356.          3281:397B F7E2          MUL DX
  1357.          3281:397D 8BD8          MOV BX,AX
  1358.          3281:397F 8B874C41      MOV AX,[BX+414C]
  1359.          3281:3983 3B46E0        CMP AX,[BP-20]
  1360.          3281:3986 7505         *JNZ 398D
  1361.          3281:3988 C746DEFFFF    MOV WORD PTR [BP-22],FFFF
  1362.          3281:398D EB00          JMP 398F
  1363.          3281:398F 837EDE00      CMP WORD PTR [BP-22],+00
  1364.          3281:3993 7402         *JZ 3997
  1365.          3281:3995 EB0C          JMP 39A3
  1366.          3281:3997 FF46D6        INC WORD PTR [BP-2A]
  1367.          3281:399A 837ED602      CMP WORD PTR [BP-2A],+02
  1368.          3281:399E 7D03         *JGE 39A3
  1369.          3281:39A0 E937FD        JMP 36DA
  1370.          3281:39A3 837EDE00      CMP WORD PTR [BP-22],+00
  1371.          3281:39A7 7504         *JNZ 39AD
  1372.          3281:39A9 0E            PUSH CS
  1373.          3281:39AA E8E8FC        CALL 3695
  1374.  
  1375.               This is the last point of interest.  The next
  1376.          instruction is where we set the key (by moving FFFFh to the
  1377.          memory location DS:0744h).  This is what we need to fake to
  1378.          allow the system to run.  ───────────────────────────┐
  1379.                                                               │
  1380.          3281:39AD C7064407FFFF  MOV WORD PTR [0744],FFFF <───┘
  1381.          3281:39B3 B8FFFF        MOV AX,FFFF
  1382.          3281:39B6 50            PUSH AX
  1383.          3281:39B7 9AC0479900    CALL 0099:47C0
  1384.          3281:39BC 59            POP CX
  1385.          3281:39BD 8BE5          MOV SP,BP
  1386.          3281:39BF 5D            POP BP
  1387.          3281:39C0 CB            RETF
  1388.  
  1389.               Ok, we have now finished the doc check, and control has
  1390.          returned (when the RETF instruction was executed) to
  1391.          21DD:3EA9.  We are now ready to continue with the game.
  1392.  
  1393.  
  1394.               Notice the instruction at 3281:39AD.  This  is where EFH
  1395.          sets that external  flag.   But  how  did  I  determine this.
  1396.          Well, by luck.  If you look through  the  entire routine, you
  1397.          will not find any other instructions placing  a  value in the
  1398.          data segment (DS).   And since I decided a long time ago that
  1399.          EFH was written in a higher level  language,  we  can  assume
  1400.          that it is writting to some variable.
  1401.  
  1402.               So, hoping that we have found the flag,  we  go  back to
  1403.          step 1.  This  time,  we manualy edit the word at DS:0744 and
  1404.          place the value FFFFh there.  We  then skip over the call the
  1405.          the doc check  and execute the game.  Then before  our  eyes,
  1406.          shit happenes.  The  game  comes  up, and everything is fine.
  1407.          By George you've got it.
  1408.  
  1409.               So how do we fix the program to always return a good doc
  1410.          check.  Well, we could go about it 2 ways.  The first, is you
  1411.          could simple modify the instruction at 3281:3935 to perform a
  1412.          long jump to 3281:39AD.  This  would  force  set the value no
  1413.          matter what was  typed.  But who the fuck wants  to  have  to
  1414.          type anything.  I sure don't so lets think of another way.
  1415.  
  1416.               If we  look at the entire doc check routine, we will see
  1417.          that it does nothing but handle  the doc check (remember when
  1418.          we first bypassed  the  check.   The  screen   came   up  and
  1419.          everything looked fine  until  it dropped you out.  So we can
  1420.          assume that the actual screen is  not setup in doc check.  So
  1421.          I suggest placing a small patch right in the begining  of the
  1422.          doc check.
  1423.  
  1424.               But what  should  this  patch  do? (BTW: it's late and I
  1425.          don't know If I'm using ?s right.   So  if  not  TOO  FUCKING
  1426.          BAD).  Well, all  it should do is place the  value  FFFFh  at
  1427.          DS:0744h.  Here is the assembly language routine to do it.
  1428.  
  1429.                         50       PUSH AX
  1430.                         B8FFFF   MOV AX,FFFF
  1431.                         3E       DS:
  1432.                         A34407   MOV WORD PTR [0744],AX
  1433.                         58       POP AX
  1434.                         CB       RETF
  1435.  
  1436.               This small  routine will place the value FFFFh at DS:744
  1437.          and then exit back to the main  loop.   Simple huh (note, you
  1438.          don't really need the save AX or load AX with  FFFFh for that
  1439.          matter but I did it for clarity).
  1440.  
  1441.               So now  that we have the patch, and now where to put it,
  1442.          how do we get it there.  Well,  thats  where  the file editor
  1443.          comes in, but  first  you  will  need  2  things.    The  hex
  1444.          equivlent of out   patch   (in  this  case  the  10  bytes  :
  1445.          50,B8,FF,FF,3E,A3,44,07,58,CB) and some string to search for.
  1446.          I suggest usings the first 14  bytes  of  the routines we are
  1447.          going to write  over (the code at address 3281:36A5).   Those
  1448.          bytes are 55, 8B, EC, 83, EC ,2A ,C7, 46, DE ,00 ,00, B8, 06,
  1449.          and 00.  When   selecting  the  search  string,  select  only
  1450.          instructions that ARN'T call,  jump,  loop or any instruction
  1451.          that has a memory address in them.  This value  will  NOT  be
  1452.          the same when you do the search.
  1453.  
  1454.               Now, using for file editor (I used PCTOOLS, but NORTON's
  1455.          will do) search  for  our  string  (55,8B,  etc).  When it is
  1456.          found (somewhere near sector 200)  write  down  the sector #.
  1457.          Now, go and edit that sector.  Find our search string (55,8B,
  1458.          etc) and replace  it  with the patch string (50,B8,FF,  etc).
  1459.          Now save the sector.
  1460.  
  1461.               Your down.   Try  playing  the game.  It should load up,
  1462.          and then go right from the title  page  (or the intro) to the
  1463.          game without stopping  at  the doc check.  If  your  doesn't,
  1464.          then you fucked  up.   Restart  from  the beginning (NO, this
  1465.          file didn't fuck up, and I DON'T MAKE MISTAKES).
  1466.  
  1467.               Well, you did it.  You have  now  removed your first doc
  1468.          check.  Don't ya feel real good.  With time, you will be able
  1469.          to remove any type of doc check.
  1470.  
  1471.  
  1472.                                                       -BUCKAROO BANZAI
  1473.  
  1474.  
  1475.                      At this time I would just like to say
  1476.  
  1477.                           `ALL CRACKING GROUPS SUCK!'
  1478.  
  1479.  
  1480. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1481.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  1482.  
  1483.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  1484.  Burn This Flag                           Zardoz               408/363-9766
  1485.  realitycheck                             Poindexter Fortran   510/527-1662
  1486.  Lies Unlimited                           Mick Freen           801/278-2699
  1487.  The New Dork Sublime                     Biffnix              415/864-DORK
  1488.  The Shrine                               Rif Raf              206/794-6674
  1489.  Planet Mirth                             Simon Jester         510/786-6560
  1490.  
  1491.                           "Raw Data for Raw Nerves"
  1492. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1493.  
  1494.                           CRACKING 101 - 1990 edition
  1495.  
  1496.                                     Lesson 3
  1497.  
  1498.                     ┌─────────────────────────────────────┐
  1499.                     │ CHAMBER OF THE SCI-MUTANT PREISTEST │
  1500.                     └─────────────────────────────────────┘
  1501.  
  1502.  
  1503.               Oh shit, I have finally found a newer program that has
  1504.          on disk copy protection.  Good, you'all need a refresher
  1505.          course on so here it is (YO JB study hard, you might learn
  1506.          something).
  1507.  
  1508.               CHAMBER of the SCI-MUTANT PREISTEST (CSMP) is a really
  1509.          fucked up game but was simple to unprotect.  So, lets dive
  1510.          right in.  We will be using DEBUG here (although I used
  1511.          periscope but then shit I'm special) to do the crack.  Lets
  1512.          dive in.  When we first load CSMP (the file ERE.COM) and
  1513.          unassemble it here is what we get.
  1514.  
  1515.          u 100 10B
  1516.  
  1517.          119A:0100 8CCA          MOV DX,CS
  1518.          119A:0102 81C2C101      ADD DX,01C1
  1519.          119A:0106 52            PUSH DX
  1520.          119A:0107 BA0F00        MOV DX,000F
  1521.          119A:010A 52            PUSH DX
  1522.          119A:010B CB            RETF
  1523.  
  1524.               I included the register listing for a reason.  NOTICE
  1525.          that this piece of code just seem to stop (the RETF)
  1526.          statement.  Well, what is really does is place the address
  1527.          (segment and offset) of the real starting point on to the
  1528.          stack and the execute a far return to that location.  Now
  1529.          this might fool a real beginner (or at least make him worry a
  1530.          bit but us...no way).
  1531.  
  1532.               If you take the current CS value and add 1C1 to it (in
  1533.          segment addition) you will get the segment address 135B (that
  1534.          is if you are using my example of 119A.  If not then you will
  1535.          not get 135B but trust me, it's the right value).
  1536.  
  1537.               So since we want to be at the real program, execute the
  1538.          code until 10B (ie use the command "G 10B") then trace
  1539.          through the next instruction.
  1540.  
  1541.               If you now unassemble the code, here is what it should
  1542.          look like.
  1543.  
  1544.          -u 000f 36
  1545.  
  1546.          135B:000F 9C            PUSHF
  1547.          135B:0010 50            PUSH AX
  1548.          135B:0011 1E            PUSH DS
  1549.          135B:0012 06            PUSH ES
  1550.          135B:0013 0E            PUSH CS
  1551.          135B:0014 1F            POP DS
  1552.          135B:0015 0E            PUSH CS
  1553.          135B:0016 07            POP ES
  1554.          135B:0017 FC            CLD
  1555.          135B:0018 89260B00      MOV [000B],SP
  1556.          135B:001C C70600000102  MOV WORD PTR [0000],0201
  1557.          135B:0022 B013          MOV AL,13
  1558.          135B:0024 A23500        MOV [0035],AL
  1559.          135B:0027 A2FF01        MOV [01FF],AL
  1560.          135B:002A A22F02        MOV [022F],AL
  1561.          135B:002D A23901        MOV [0139],AL
  1562.          135B:0030 B280          MOV DL,80
  1563.          135B:0032 B408          MOV AH,08
  1564.          135B:0034 CD21          INT 21
  1565.          135B:0036 7232          JB 006A
  1566.  
  1567.  
  1568.               Since we are looking for a disk based copy protection,
  1569.          it might be a good time to look for INT 13.  So search the
  1570.          current segment for INT 13 with the command
  1571.  
  1572.                               S 135B:0 FFFF CD 13
  1573.  
  1574.               But shit, nothing.  You mean this program doesn't use
  1575.          int 13.  Be real.  Reread the first lesson.  You know the one
  1576.          that talks about self modifing code.  This is what we have
  1577.          here.  Let's take a closer look at the last bit of code but
  1578.          this time, with my comments added.
  1579.  
  1580.          -u 000f 36
  1581.  
  1582.          ; The first part of the code simple sets up for the return to
  1583.          ; dos as well as sets ES and DS
  1584.  
  1585.          135B:000F 9C            PUSHF
  1586.          135B:0010 50            PUSH AX
  1587.          135B:0011 1E            PUSH DS
  1588.          135B:0012 06            PUSH ES
  1589.          135B:0013 0E            PUSH CS
  1590.          135B:0014 1F            POP DS       ; Set DS to CS
  1591.          135B:0015 0E            PUSH CS
  1592.          135B:0016 07            POP ES       ; Set ES to DS
  1593.          135B:0017 FC            CLD
  1594.  
  1595.          135B:0018 89260B00      MOV [000B],SP
  1596.  
  1597.          ; The next instruction sets up a variable that is used in the
  1598.          ; routine that reads in the sectors from the disk.  More on
  1599.          ; later.
  1600.  
  1601.          135B:001C C70600000102  MOV WORD PTR [0000],0201
  1602.  
  1603.          ; Now, here is the self modifing code.  Notice at AL is 13
  1604.          ; (INT 13h ... Get it).  Look at the first memory location
  1605.          ; (35h) and remember that DS = CS.  With this in mind, when
  1606.          ; then instuction at 135B:0024 is executed byte at 135B:0035
  1607.          ; will be changed to 13h.  That will in fact change the
  1608.          ; INT 21h at 135B:0034 to an INT 13h.  And so on, and so on.
  1609.  
  1610.          135B:0022 B013          MOV AL,13       ; New value
  1611.          135B:0024 A23500        MOV [0035],AL   ; Change to INT 13h
  1612.          135B:0027 A2FF01        MOV [01FF],AL   ; Change to INT 13h
  1613.          135B:002A A22F02        MOV [022F],AL   ; Change to INT 13h
  1614.          135B:002D A23901        MOV [0139],AL   ; Change to INT 13h
  1615.  
  1616.          ; If you lookup DOS function 08 you will find it's CONSOLE
  1617.          ; INPUT.  Now does that seem out of place to you.
  1618.  
  1619.          135B:0030 B280          MOV DL,80
  1620.          135B:0032 B408          MOV AH,08
  1621.          135B:0034 CD21          INT 21     ; Changed to INT 13h
  1622.          135B:0036 7232          JB 006A
  1623.  
  1624.  
  1625.               Whoa, that was tricky.  If you execute up to 135B:30
  1626.          here is what it should look like..
  1627.  
  1628.  
  1629.          135B:0030 B280          MOV DL,80
  1630.          135B:0032 B408          MOV AH,08
  1631.          135B:0034 CD13          INT 13
  1632.          135B:0036 7232          JB 006A
  1633.  
  1634.               AHA, now we are getting somewhere.  If we lookup what
  1635.          disk function 08 means, you won't be suprised.  Function 08h
  1636.          is GET DRIVE TYPE.  It will tell what type of disk drive we
  1637.          have.  Remember, if you are loading off of a hard disk then
  1638.          it wants to use a different routine.  Since we want it to
  1639.          think we are loading off of disk, then we want to take this
  1640.          jump.  So for now, force the jmp by setting IP to 6A.
  1641.  
  1642.               At 135B:006A you find another jmp instruction
  1643.  
  1644.          135B:006A EB6B          JMP 00D7
  1645.  
  1646.  
  1647.               This jumps to the routine that does the actual disk
  1648.          check.  Here is the outer loop of that code (With my comments
  1649.          of course).
  1650.  
  1651.          ; This first part of this routine simply test to see how many
  1652.          ; disk drives you have.
  1653.  
  1654.  
  1655.          135B:00D7 CD11          INT 11
  1656.          135B:00D9 25C000        AND AX,00C0
  1657.          135B:00DC B106          MOV CL,06
  1658.          135B:00DE D3E8          SHR AX,CL
  1659.          135B:00E0 FEC0          INC AL
  1660.          135B:00E2 FEC0          INC AL
  1661.          135B:00E4 A20200        MOV [0002],AL
  1662.  
  1663.          ; Next, so setup for the actual disk check
  1664.  
  1665.  
  1666.          135B:00E7 C606090000    MOV BYTE PTR [0009],00
  1667.          135B:00EC B9F127        MOV CX,27F1
  1668.          135B:00EF 8BE9          MOV BP,CX
  1669.          135B:00F1 B107          MOV CL,07
  1670.          135B:00F3 F8            CLC
  1671.  
  1672.          ; This calls the protection routine part 1
  1673.  
  1674.          135B:00F4 E82F00        CALL 0126
  1675.  
  1676.          135B:00F7 B9DE27        MOV CX,27DE
  1677.          135B:00FA 8BE9          MOV BP,CX
  1678.          135B:00FC B108          MOV CL,08
  1679.          135B:00FE F9            STC
  1680.  
  1681.          ; This calls the protection routine part 2
  1682.  
  1683.          135B:00FF E82400        CALL 0126
  1684.  
  1685.          135B:0102 8D1E5802      LEA BX,[0258]
  1686.          135B:0106 8D361C01      LEA SI,[011C]
  1687.          135B:010A 8BCD          MOV CX,BP
  1688.          135B:010C AC            LODSB
  1689.          135B:010D 8AC8          MOV CL,AL
  1690.  
  1691.          ; This calls the protection routine part 3
  1692.  
  1693.          135B:010F E8E300        CALL 01F5
  1694.  
  1695.          ; Makes the final check
  1696.  
  1697.          135B:0112 7271          JB 0185
  1698.          135B:0114 AC            LODSB
  1699.          135B:0115 0AC0          OR AL,AL
  1700.          135B:0117 75F4          JNZ 010D  ; If not correct, try again
  1701.          135B:0119 EB77          JMP 0192  ; Correct, continue program
  1702.          135B:011B 90            NOP
  1703.  
  1704.  
  1705.               There are calls to 2 different subroutines.  The routine
  1706.          at 126 and the routine at 1F5.  If you examine the routine at
  1707.          126 you find that it makes several calls to the routine at
  1708.          1F5.  Then you you examine the routine at 1F5 you see the
  1709.          actual call to INT 13.  Here is the code for both routine
  1710.          with comments
  1711.  
  1712.  
  1713.          ; First, it sets up the sector, head and drive information.
  1714.          ; DS:000A holds the sector to read
  1715.  
  1716.          135B:0126 880E0A00      MOV [000A],CL
  1717.          135B:012A 8A160900      MOV DL,[0009]
  1718.          135B:012E B600          MOV DH,00
  1719.  
  1720.          ; Sets the DTA
  1721.  
  1722.          135B:0130 8D365802      LEA SI,[0258]
  1723.          135B:0134 7213          JB 0149
  1724.  
  1725.          ; Resets the disk
  1726.  
  1727.          135B:0136 33C0          XOR AX,AX
  1728.          135B:0138 CD13          INT 13
  1729.  
  1730.          ; Calls the the check
  1731.  
  1732.          135B:013A B90114        MOV CX,1401  ; TRACK 14 sector 1
  1733.          135B:013D 8BDE          MOV BX,SI
  1734.          135B:013F E8B300        CALL 01F5
  1735.  
  1736.  
  1737.          ; The next track/sector to read in is stored in BP
  1738.  
  1739.          135B:0142 8BCD          MOV CX,BP
  1740.          135B:0144 E8AE00        CALL 01F5
  1741.          135B:0147 7234          JB 017D     ; If an error occured,
  1742.                                              ; trap it.
  1743.  
  1744.  
  1745.          135B:0149 88160900      MOV [0009],DL   ; Reset drive
  1746.          135B:014D 8A0E0A00      MOV CL,[000A]   ; reset sector
  1747.          135B:0151 E8A100        CALL 01F5       ; check protection
  1748.          135B:0154 722F          JB 0185         ; Check for an error
  1749.  
  1750.          135B:0156 8D5C20        LEA BX,[SI+20]
  1751.  
  1752.          135B:0159 8BCD          MOV CX,BP       ; Get next T/S
  1753.          135B:015B B010          MOV AL,10       ; Ignore this
  1754.          135B:015D E89500        CALL 01F5       ; Check protection
  1755.          135B:0160 7223          JB 0185         ; check for error
  1756.  
  1757.          ; The next sector of code checks to see if what was read in
  1758.          ; is the actual protected tracks
  1759.  
  1760.          ; First check
  1761.  
  1762.          135B:0162 8DBCAC00      LEA DI,[SI+00AC]
  1763.          135B:0166 B91000        MOV CX,0010
  1764.          135B:0169 F3            REPZ
  1765.          135B:016A A7            CMPSW
  1766.  
  1767.          ; NOTE: If it was a bad track, it will jmp to 185.  A good
  1768.          ; read should just continue
  1769.  
  1770.          135B:016B 7518          JNZ 0185
  1771.  
  1772.          ; Second check
  1773.  
  1774.          135B:016D 8D365802      LEA SI,[0258]
  1775.          135B:0171 8D3E3702      LEA DI,[0237]
  1776.          135B:0175 B90400        MOV CX,0004
  1777.          135B:0178 F3            REPZ
  1778.          135B:0179 A7            CMPSW
  1779.  
  1780.          ; see NOTE above
  1781.  
  1782.          135B:017A 7509          JNZ 0185
  1783.  
  1784.          ; This exit back to the main routine.
  1785.  
  1786.          135B:017C C3            RET
  1787.  
  1788.          ; Here is the start of the error trap routines.  Basicly what
  1789.          ; they do is check an error count.  If it's not 0 then it
  1790.          ; retries everything.  If it is 0 then it exit back to dos.
  1791.  
  1792.          135B:017D FEC2          INC DL
  1793.          135B:017F 3A160200      CMP DL,[0002]
  1794.          135B:0183 72B1          JB 0136
  1795.          135B:0185 E85400        CALL 01DC
  1796.          135B:0188 8B260B00      MOV SP,[000B]
  1797.          135B:018C 2BC9          SUB CX,CX
  1798.          135B:018E 58            POP AX
  1799.          135B:018F 50            PUSH AX
  1800.          135B:0190 EB1F          JMP 01B1
  1801.  
  1802.  
  1803.          ** Here is the actual code the does the check  **
  1804.  
  1805.          ; ES:BX points to the buffer
  1806.  
  1807.          135B:01F5 1E            PUSH DS
  1808.          135B:01F6 07            POP ES
  1809.  
  1810.          ; SI is set to the # of retries
  1811.  
  1812.          135B:01F7 56            PUSH SI
  1813.          135B:01F8 BE0600        MOV SI,0006
  1814.  
  1815.          ; Remember how I said we would use what was in DS:0000 later.
  1816.          ; well, here is where you use it.  It loads in the FUNCTION
  1817.          ; and # of sectors from what is stored in DS:0000.  This is
  1818.          ; just a trick to make the int 13 call more vague.
  1819.  
  1820.          135B:01FB A10000        MOV AX,[0000]
  1821.          135B:01FE CD13          INT 13
  1822.  
  1823.          ; If there is no errors, then exit this part of the loop
  1824.  
  1825.          135B:0200 7309          JNB 020B
  1826.          135B:0202 F6C480        TEST AH,80
  1827.  
  1828.          ; Check to see if it was a drive TIMEOUT.  If so, then set
  1829.          ; an error flag and exit
  1830.  
  1831.          135B:0205 7503          JNZ 020A
  1832.  
  1833.          ; It must have been a load error.  Retry 6 times
  1834.  
  1835.          135B:0207 4E            DEC SI
  1836.          135B:0208 75F1          JNZ 01FB
  1837.  
  1838.          ; Set the error flag
  1839.  
  1840.          135B:020A F9            STC
  1841.  
  1842.          ; restore SI and return
  1843.  
  1844.          135B:020B 5E            POP SI
  1845.          135B:020C C3            RET
  1846.  
  1847.  
  1848.               If you follow through all of that.  You will see that
  1849.          the only real way out is the jmp to "135B:0192" at 135B:0119.
  1850.          So, how do we test it.  Simple.  Exit back to dos and let's
  1851.          add a temporary patch.
  1852.  
  1853.               Reload ERE.COM under debug.  Execute the program setting
  1854.          a breakpoint at 135B:0022 (if you remember, that is right at
  1855.          the begining of the self modifing code).  When execution
  1856.          stops, change you IP register to 192.  Now execute the code.
  1857.  
  1858.               Well shit, we are at the main menu.  We just bypassed
  1859.          the entire protection routine.  So, now where to add the
  1860.          patch.  We will be adding the patch at 135B:0022.  But what
  1861.          should the patch be.  In this case, simply jumping to
  1862.          135B:0192 will do.  So, reload ERE.COM under debug.  Execute
  1863.          the code until 135B:0022.  Now unassemble it.  Here is the
  1864.          code fragment we need.
  1865.  
  1866.          135B:0022 B013          MOV AL,13
  1867.          135B:0024 A23500        MOV [0035],AL
  1868.          135B:0027 A2FF01        MOV [01FF],AL
  1869.          135B:002A A22F02        MOV [022F],AL
  1870.          135B:002D A23901        MOV [0139],AL
  1871.  
  1872.               Here is the code we want to use as the patch
  1873.  
  1874.          135B:0022 E96D01        JMP 192
  1875.  
  1876.               So, to add the patch, we search the file ERE.COM using
  1877.          PC-TOOLS.  For our search string we use
  1878.  
  1879.                  B0 13 A2 35 00 A2 FF 01 A2 2F 02 A2 39 01
  1880.  
  1881.               PC-TOOLS should find the search string at reletive
  1882.          sector #13.  Edit the sector and change "B0 13 A2" to
  1883.          "E9 6D 01" (our patch) and save the sector.
  1884.  
  1885.               BOOM! your done and CSMP is cracked.  Fun huh.  You just
  1886.          kicked 5 seconds off of the load time.  Preaty fucken good.
  1887.          Well, I hope this textfile helped.
  1888.  
  1889.  
  1890.               -Buckaroo Banzai
  1891.                -Cracking Guru
  1892.  
  1893.  
  1894. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1895.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  1896.  
  1897.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  1898.  Burn This Flag                           Zardoz               408/363-9766
  1899.  realitycheck                             Poindexter Fortran   510/527-1662
  1900.  Lies Unlimited                           Mick Freen           801/278-2699
  1901.  The New Dork Sublime                     Biffnix              415/864-DORK
  1902.  The Shrine                               Rif Raf              206/794-6674
  1903.  Planet Mirth                             Simon Jester         510/786-6560
  1904.  
  1905.                           "Raw Data for Raw Nerves"
  1906. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  1907.  
  1908.                           CRACKING 101 - 1990 Edition
  1909.  
  1910.                                     Lesson 4
  1911.                                    revision 1
  1912.  
  1913.                   ┌─────────────────────────────────────────┐
  1914.                   │ REMOVING THE DOC CHECK FOR STAR CONTROL │
  1915.                   └─────────────────────────────────────────┘
  1916.  
  1917.          <
  1918.  
  1919.           Added for revision 1 -
  1920.  
  1921.               First, let  me  tell  you  about  a major fuckup I made.
  1922.          When I first wrote this file, I  left out a major part of the
  1923.          patch.  For all of the user who got that version,  I'm  sorry
  1924.          but even I  make  mistakes  at  3:00 in the morning.  Anyway,
  1925.          just replace the original with this updated version
  1926.  
  1927.                                             - Buckaroo Banzai
  1928.  
  1929.          >
  1930.  
  1931.               Hey, Buckaroo Banzai .. Cracking Guru back once again to
  1932.          help you lesser crackist learn.   This time, we will be going
  1933.          over Star Control.  This is the last lesson in  the  original
  1934.          4.  From here  on  out,  I  will  simply release lessons as I
  1935.          write them.
  1936.  
  1937.               I want to say a few things  about some of the groups out
  1938.          there right now.  Speed isn't everything.  I really wish that
  1939.          for example when you remove a doc check, most  of  us want it
  1940.          REMOVED.  We don't  want  to have to enter your group name or
  1941.          even typing 1 letter is to much.   We  shouldn't even see the
  1942.          menu for the doc check.  Now, I don't direct  this  to all of
  1943.          you, but there  seems  to  have  been  a move from quality to
  1944.          quickness.  Let's go back to the  days  of  SPI (and INC when
  1945.          they were first getting started) and crack right.   If  there
  1946.          is a doc check, remove it, not just fake it.
  1947.  
  1948.               Nuff said, on with the tutorial.
  1949.  
  1950.               Star Control  (SC  for  here out) is a preaty good game.
  1951.          The protection on it wasn't too  hard, but if you didn't read
  1952.          enough in to it, you would just kill the title music also.
  1953.  
  1954.               So, how do we go about cracking SC.  Well for this one I
  1955.          opted to break out when SC asks for the code  from  the  code
  1956.          wheel.  Originaly I  did this just for the hell of it, but it
  1957.          turned out to be a luck guess and made life a lot easier.
  1958.  
  1959.               As usual we will be using periscope to crack SC.  I used
  1960.          PSKEY (using int 3 as the trap interrupt not int 2) to pop in
  1961.          at the input routine.  So lets  get  started.  Load up PS and
  1962.          PSKEY, then execute Star Control.  When you get  to  the  doc
  1963.          check, break out.
  1964.  
  1965.               Now you  should  be at the usual IRET insturction that's
  1966.          part of PSKEY.  Now comes the  tricky  part.   Since  we  are
  1967.          using a key trap to break out during the input  sequence,  we
  1968.          could be anywhere  inside  the  entire  input routine.  So in
  1969.          cases like this I suggest finding a reference point.
  1970.  
  1971.               So how  do you pick the reference  point.   Well,  since
  1972.          this doc check must be entered via the keyboard  you  can bet
  1973.          somewhere it will  call  INT  16h  (bios  keyboard) (although
  1974.          there are times when this is not  true, it rare).  I think we
  1975.          should go off and find that call to that interrupt.
  1976.  
  1977.               So we  trace (using the 'T' command) through  some  code
  1978.          and finally come apon the follow subroutine ....
  1979.  
  1980.          ( NOTE: all comments were added by me )
  1981.  
  1982.  
  1983.          ; This is the actual routine that is used to get a key
  1984.  
  1985.          2A00:09D4 55            PUSH BP
  1986.          2A00:09D5 8BEC          MOV BP,SP
  1987.          2A00:09D7 8A6606        MOV AH,[BP+06]
  1988.          2A00:09DA 8AD4          MOV DL,AH
  1989.          2A00:09DC 80E20F        AND DL,0F
  1990.          2A00:09DF CD16          INT 16      ; Call to bios.  We will
  1991.          2A00:09E1 7509          JNZ   09EC      ;  use  this  as  our
  1992.          2A00:09E3 80FA01        CMP DL,01   ; reference point
  1993.          2A00:09E6 7504          JNZ 09EC
  1994.          2A00:09E8 33C0          XOR AX,AX
  1995.          2A00:09EA EB0A          JMP 09F6
  1996.          2A00:09EC 80FA02        CMP DL,02
  1997.          2A00:09EF 7405          JZ 09F6
  1998.          2A00:09F1 0BC0          OR AX,AX
  1999.          2A00:09F3 7501          JNZ 09F6
  2000.          2A00:09F5 48            DEC AX
  2001.          2A00:09F6 5D            POP BP
  2002.          2A00:09F7 CB            RETF
  2003.  
  2004.               So we write down the address  of our REFERENCE point and
  2005.          get ready to procede.  Now, It's really kinda  boring to keep
  2006.          trying to trace through the entire input routine while trying
  2007.          to enter the  code  string, so what we want to do next, is to
  2008.          figure out the input routine.   A  quick  look  at  this last
  2009.          section of code shows that it only reads in a  character  but
  2010.          really does not handle it.
  2011.  
  2012.               So, we  exit via the RETF at 9F7 enter the next level of
  2013.          the subroutine.  Again,  if you  manual  trace  through  this
  2014.          routine (as well as the next level up) you see that it simple
  2015.          exits out rather quickly.  This is definitly not the top loop
  2016.          of the imput routine.
  2017.  
  2018.               So, we trace through the next level up,  and  again exit
  2019.          quickly to a  higher  level.   But  this  time,  as  we trace
  2020.          through, we find that the it loops  back on itself.  AHA, the
  2021.          outer input loop.  Here is the code to the entire input loop.
  2022.          I have marked the place where you should enter from the lower
  2023.          level.
  2024.  
  2025.          ( String input loop -- Outer level )
  2026.  
  2027.          7C00:0835 FF365220      PUSH [2052]
  2028.          7C00:0839 FF365020      PUSH [2050]
  2029.          7C00:083D 9A2802FD41    CALL 41FD:0228     ;  Entery here
  2030.          7C00:0842 888670FE      MOV [BP+FE70],AL
  2031.          7C00:0946 0AC0          OR AL,AL
  2032.          7C00:0848 7503          JNZ 084D
  2033.          7C00:084A E99200        JMP 08DF
  2034.          7C00:084D 2AE4          SUB AH,AH
  2035.          7C00:084F 2D0800        SUB AX,0008
  2036.          7C00:0852 745A          JZ 08AE
  2037.          7C00:0854 48            DEC AX
  2038.          7C00:0855 48            DEC AX
  2039.          7C00:0856 7503          JNZ 085B
  2040.          7C00:0858 E90901        JMP 0964
  2041.          7C00:085B 2D0300        SUB AX,0003
  2042.          7C00:085E 7503          JNZ 0863
  2043.          7C00:0860 E90101        JMP 0964
  2044.          7C00:0863 8A9E70FE      MOV BL,[BP+FE70]
  2045.          7C00:0867 2AFF          SUB BH,BH
  2046.          7C00:0869 F687790B57    TEST BYTE PTR [BX+0B79],57
  2047.          7C00:086E 746F          JZ 08DF
  2048.          7C00:0870 F687790B03    TEST BYTE PTR [BX+0B79],03
  2049.          7C00:0875 740C          JZ 0883
  2050.          7C00:0877 F687790B02    TEST BYTE PTR [BX+0B79],02
  2051.          7C00:087C 7405          JZ 0883
  2052.          7C00:087E 80AE70FE20    SUB BYTE PTR [BP+FE70],20
  2053.          7C00:0883 8A8670FE      MOV AL,[BP+FE70]
  2054.          7C00:0887 C49E7EFE      LES BX,[BP+FE7E]
  2055.          7C00:088B 8BB682FE      MOV SI,[BP+FE82]
  2056.          7C00:088F 26            ES:
  2057.          7C00:0890 8800          MOV [BX+SI],AL
  2058.          7C00:0892 FF8682FE      INC WORD PTR [BP+FE82]
  2059.          7C00:0896 FFB688FE      PUSH [BP+FE88]
  2060.          7C00:089A 8D8678FE      LEA AX,[BP+FE78]
  2061.          7C00:089E 50            PUSH AX
  2062.          7C00:089F 9A56049324    CALL 2493:0456
  2063.          7C00:08A4 83C404        ADD SP,+04
  2064.          7C00:08A7 0BC0          OR AX,AX
  2065.          7C00:08A9 7534          JNZ 08DF
  2066.          7C00:08AB EB27          JMP 08D4
  2067.          7C00:08AD 90            NOP
  2068.          7C00:08AE 83BE82FE00    CMP WORD PTR [BP+FE82],+00
  2069.          7C00:08B3 7404          JZ 08B9
  2070.          7C00:08B5 FF8E82FE      DEC WORD PTR [BP+FE82]
  2071.          7C00:08B9 B008          MOV AL,08
  2072.          7C00:08BB 50            PUSH AX
  2073.          7C00:08BC 9A1003443D    CALL 3D44:0310
  2074.          7C00:08C1 8D8684FE      LEA AX,[BP+FE84]
  2075.          7C00:08C5 16            PUSH SS
  2076.          7C00:08C6 50            PUSH AX
  2077.          7C00:08C7 9A6A00843D    CALL 3D84:006A
  2078.          7C00:08CC B047          MOV AL,47
  2079.          7C00:08CE 50            PUSH AX
  2080.          7C00:08CF 9A1003443D    CALL 3D44:0310
  2081.          7C00:08D4 8D8678FE      LEA AX,[BP+FE78]
  2082.          7C00:08D8 16            PUSH SS
  2083.          7C00:08D9 50            PUSH AX
  2084.          7C00:08DA 9A8202C93C    CALL 3CC9:0282
  2085.          7C00:08DF 83BE8CFE00    CMP WORD PTR [BP+FE8C],+00
  2086.          7C00:08E4 7503          JNZ 08E9
  2087.          7C00:08E6 E94CFF        JMP 0835    ; <───┐
  2088.                                                    │
  2089.               as you can see, at this point it loops back  on  itself.
  2090.          This is what  tells  use  that  it's the outer loop.  Knowing
  2091.          that, we can just set a code  breakpoint  at  8E9  (the  next
  2092.          instruction after the loop) and execute the code.
  2093.  
  2094.               At this  point,  the SC will pause waiting  for  you  to
  2095.          enter the code key.  Use the code wheel and enter the correct
  2096.          key (after all,  it's  kinda  hard  to  crack  a game without
  2097.          having the proper codes right...)
  2098.  
  2099.               So, we have now exited the  input  loop  with everything
  2100.          intact (ie: the proper code was entered).  Next  step  is  to
  2101.          figure out what  happens  when  the  proper  code is entered.
  2102.          Well, since you have entered  the  proper  code,  just follow
  2103.          this routine out.  Remember back to lesson 2.   What  we want
  2104.          to do is find the call the to routine that does the doc check
  2105.          and remove it  somehow (a PROPER crack).  So since everything
  2106.          is in the right place, if we just  keep jumping over the code
  2107.          we should find our way out.
  2108.  
  2109.               So after jumping over many instructions, we come the the
  2110.          follow piece of code
  2111.  
  2112.          7C00:0B74 8BE5          MOV SP,BP
  2113.          7C00:0B76 5D            POP BP
  2114.          7C00:0B77 CB            RETF
  2115.  
  2116.               By now, you should know that what you are  looking at is
  2117.          the exit routine for a higher level language's (C or pascal)
  2118.          code.  So we  have  found  the  end  of the doc check.  After
  2119.          tracing through the RETF you find yourself looking down a cmp
  2120.          and a conditional jump.  Here  is  the  code  (NOTE!  I  have
  2121.          included the actual call to the doc check just for reference)
  2122.  
  2123.          45E2:0235 9A46010F4A    CALL 7C00:146   ; Call to Doc Check
  2124.          45E2:023A 83C404        ADD  SP,+04
  2125.          45E2:023D 0BC0          OR   AX,AX
  2126.          45E2:023F 7465          JZ   02A6
  2127.  
  2128.               Notice the value of the AX register.  Since  right after
  2129.          the doc check, it is acted upon, then it has some importance.
  2130.          So, now that  we know where the doc check takes place, how do
  2131.          we remove it.
  2132.  
  2133.               Well, We could patch it with the code
  2134.  
  2135.          45E2:0235 B40100        MOV  AX,0001
  2136.          45E2:0238 90            NOP
  2137.          45E2:0239 90            NOP
  2138.  
  2139.               This patch will work (I know,  it's  how I first patched
  2140.          the program).  But there is one small problem.   If  you  run
  2141.          the program after  adding  this patch, you will find that the
  2142.          title music doesn't play.  So,  this  is  now a good place to
  2143.          put the patch.
  2144.  
  2145.               So where  then.  Well, make note of the address  of  the
  2146.          call to the  doc  check.   Now,  restart the process but this
  2147.          time right after SC switches in to graphics mode, break out.
  2148.  
  2149.               Now, set a breakpoint at  the  address from above (in my
  2150.          case 45E2:0235).  Let SC run in to the intro.   You will find
  2151.          that although the  title  screen  comes up, the music doesn't
  2152.          kick in before the breakpoint is reached.
  2153.  
  2154.               No, they couldn't...they wouldn't..  well they did.  The
  2155.          music routines for  the intro are stored in the  routine  for
  2156.          the doc check.   Here  is  the  entire  doc  check.   I  have
  2157.          commented on some of the code
  2158.  
  2159.  
  2160.          ; these first few calls seem to load something from disk
  2161.  
  2162.  
  2163.          7C00:0146 55            PUSH BP
  2164.          7C00:0147 8BEC          MOV BP,SP
  2165.          7C00:0149 81EC9001      SUB SP,0190
  2166.          7C00:014D 57            PUSH DI
  2167.          7C00:014E 56            PUSH SI
  2168.          7C00:014F 8B4608        MOV AX,[BP+08]
  2169.          7C00:0152 0B4606        OR AX,[BP+06]
  2170.          7C00:0155 740E          JZ 0165
  2171.          7C00:0157 FF7608        PUSH [BP+08]
  2172.          7C00:015A FF7606        PUSH [BP+06]
  2173.          7C00:015D 9A65341E2D    CALL 2D1E:3465
  2174.          7C00:0162 83C404        ADD SP,+04
  2175.          7C00:0165 FF365220      PUSH [2052]
  2176.          7C00:0169 FF365020      PUSH [2050]
  2177.          7C00:016D 9A2802FD41    CALL 41FD:0228
  2178.          7C00:0172 0AC0          OR AL,AL
  2179.          7C00:0174 75EF          JNZ 0165
  2180.          7C00:0176 B80200        MOV AX,0002
  2181.          7C00:0179 898664FF      MOV [BP+FF64],AX
  2182.          7C00:017D 898672FF      MOV [BP+FF72],AX
  2183.          7C00:0181 2BC0          SUB AX,AX
  2184.          7C00:0183 898662FF      MOV [BP+FF62],AX
  2185.          7C00:0187 89866AFF      MOV [BP+FF6A],AX
  2186.          7C00:018B 898674FF      MOV [BP+FF74],AX
  2187.          7C00:018F B80100        MOV AX,0001
  2188.          7C00:0192 898666FF      MOV [BP+FF66],AX
  2189.          7C00:0196 89866CFF      MOV [BP+FF6C],AX
  2190.          7C00:019A 898670FF      MOV [BP+FF70],AX
  2191.          7C00:019E 898676FF      MOV [BP+FF76],AX
  2192.          7C00:01A2 B80300        MOV AX,0003
  2193.          7C00:01A5 898668FF      MOV [BP+FF68],AX
  2194.          7C00:01A9 89866EFF      MOV [BP+FF6E],AX
  2195.          7C00:01AD 898678FF      MOV [BP+FF78],AX
  2196.  
  2197.          ; Although I have NO IDEA what the hell is being setup
  2198.          ; here I suspect that it is the must
  2199.  
  2200.          7C00:01B1 C746860400    MOV WORD PTR [BP-7A],0004
  2201.          7C00:01B6 C746880100    MOV WORD PTR [BP-78],0001
  2202.          7C00:01BB C7468A0200    MOV WORD PTR [BP-76],0002
  2203.          7C00:01C0 C7468C0000    MOV WORD PTR [BP-74],0000
  2204.          7C00:01C5 C7468E0000    MOV WORD PTR [BP-72],0000
  2205.          7C00:01CA C746900500    MOV WORD PTR [BP-70],0005
  2206.          7C00:01CF C746920600    MOV WORD PTR [BP-6E],0006
  2207.          7C00:01D4 C746940700    MOV WORD PTR [BP-6C],0007
  2208.          7C00:01D9 C746960C00    MOV WORD PTR [BP-6A],000C
  2209.          7C00:01DE 894698        MOV [BP-68],AX
  2210.          7C00:01E1 C7469A0500    MOV WORD PTR [BP-66],0005
  2211.          7C00:01E6 C7469C0D00    MOV WORD PTR [BP-64],000D
  2212.          7C00:01EB C7469E0000    MOV WORD PTR [BP-62],0000
  2213.          7C00:01F0 C746A00100    MOV WORD PTR [BP-60],0001
  2214.          7C00:01F5 C746A20200    MOV WORD PTR [BP-5E],0002
  2215.          7C00:01FA C746A40800    MOV WORD PTR [BP-5C],0008
  2216.          7C00:01FF B80400        MOV AX,0004
  2217.          7C00:0202 8946A6        MOV [BP-5A],AX
  2218.          7C00:0205 8946A8        MOV [BP-58],AX
  2219.          7C00:0208 C746AA0600    MOV WORD PTR [BP-56],0006
  2220.          7C00:020D C746AC0800    MOV WORD PTR [BP-54],0008
  2221.          7C00:0212 C746AE0700    MOV WORD PTR [BP-52],0007
  2222.          7C00:0217 C746B00900    MOV WORD PTR [BP-50],0009
  2223.          7C00:021C C746B20A00    MOV WORD PTR [BP-4E],000A
  2224.          7C00:0221 8946B4        MOV [BP-4C],AX
  2225.          7C00:0224 C746B60C00    MOV WORD PTR [BP-4A],000C
  2226.          7C00:0229 C746B80300    MOV WORD PTR [BP-48],0003
  2227.          7C00:022E C746BA0B00    MOV WORD PTR [BP-46],000B
  2228.          7C00:0233 C746BC0D00    MOV WORD PTR [BP-44],000D
  2229.          7C00:0238 C746BE0B00    MOV WORD PTR [BP-42],000B
  2230.          7C00:023D C746C00500    MOV WORD PTR [BP-40],0005
  2231.          7C00:0242 C746C20100    MOV WORD PTR [BP-3E],0001
  2232.          7C00:0247 C746C40700    MOV WORD PTR [BP-3C],0007
  2233.          7C00:024C C746C60000    MOV WORD PTR [BP-3A],0000
  2234.          7C00:0251 C746C80600    MOV WORD PTR [BP-38],0006
  2235.          7C00:0256 C746CA0200    MOV WORD PTR [BP-36],0002
  2236.          7C00:025B C746CC0300    MOV WORD PTR [BP-34],0003
  2237.          7C00:0260 C746CE0800    MOV WORD PTR [BP-32],0008
  2238.          7C00:0265 C746D00900    MOV WORD PTR [BP-30],0009
  2239.          7C00:026A C746D20A00    MOV WORD PTR [BP-2E],000A
  2240.          7C00:026F C746D40B00    MOV WORD PTR [BP-2C],000B
  2241.          7C00:0274 C746D60C00    MOV WORD PTR [BP-2A],000C
  2242.          7C00:0279 C746D80A00    MOV WORD PTR [BP-28],000A
  2243.          7C00:027E C746DA0500    MOV WORD PTR [BP-26],0005
  2244.          7C00:0283 C746DC0D00    MOV WORD PTR [BP-24],000D
  2245.          7C00:0288 C746DE0800    MOV WORD PTR [BP-22],0008
  2246.          7C00:028D C746E00900    MOV WORD PTR [BP-20],0009
  2247.          7C00:0292 C746E20300    MOV WORD PTR [BP-1E],0003
  2248.          7C00:0297 C746E40B00    MOV WORD PTR [BP-1C],000B
  2249.          7C00:029C C78692FE0000  MOV WORD PTR [BP+FE92],0000
  2250.          7C00:02A2 C78694FE2B00  MOV WORD PTR [BP+FE94],002B
  2251.          7C00:02A8 C78696FE0200  MOV WORD PTR [BP+FE96],0002
  2252.          7C00:02AE C78698FE0300  MOV WORD PTR [BP+FE98],0003
  2253.          7C00:02B4 89869AFE      MOV [BP+FE9A],AX
  2254.          7C00:02B8 C7869CFE0500  MOV WORD PTR [BP+FE9C],0005
  2255.          7C00:02BE C7869EFE0600  MOV WORD PTR [BP+FE9E],0006
  2256.          7C00:02C4 C786A0FE0E00  MOV WORD PTR [BP+FEA0],000E
  2257.          7C00:02CA C786A2FE2B00  MOV WORD PTR [BP+FEA2],002B
  2258.          7C00:02D0 C786A4FE0900  MOV WORD PTR [BP+FEA4],0009
  2259.          7C00:02D6 C786A6FE0A00  MOV WORD PTR [BP+FEA6],000A
  2260.          7C00:02DC C786A8FE0B00  MOV WORD PTR [BP+FEA8],000B
  2261.          7C00:02E2 C786AAFE0C00  MOV WORD PTR [BP+FEAA],000C
  2262.          7C00:02E8 C786ACFE2B00  MOV WORD PTR [BP+FEAC],002B
  2263.          7C00:02EE C786AEFE0F00  MOV WORD PTR [BP+FEAE],000F
  2264.          7C00:02F4 C786B0FE0D00  MOV WORD PTR [BP+FEB0],000D
  2265.          7C00:02FA C786B2FE1000  MOV WORD PTR [BP+FEB2],0010
  2266.          7C00:0300 C786B4FE1100  MOV WORD PTR [BP+FEB4],0011
  2267.          7C00:0306 C786B6FE1200  MOV WORD PTR [BP+FEB6],0012
  2268.          7C00:030C C786B8FE1300  MOV WORD PTR [BP+FEB8],0013
  2269.          7C00:0312 C786BAFE1400  MOV WORD PTR [BP+FEBA],0014
  2270.          7C00:0318 C786BCFE1500  MOV WORD PTR [BP+FEBC],0015
  2271.          7C00:031E C786BEFE1600  MOV WORD PTR [BP+FEBE],0016
  2272.          7C00:0324 C786C0FE1700  MOV WORD PTR [BP+FEC0],0017
  2273.          7C00:032A C786C2FE0800  MOV WORD PTR [BP+FEC2],0008
  2274.          7C00:0330 C786C4FE1800  MOV WORD PTR [BP+FEC4],0018
  2275.          7C00:0336 C786C6FE2B00  MOV WORD PTR [BP+FEC6],002B
  2276.          7C00:033C C786C8FE1900  MOV WORD PTR [BP+FEC8],0019
  2277.          7C00:0342 C786CAFE2B00  MOV WORD PTR [BP+FECA],002B
  2278.          7C00:0348 C786CCFE1A00  MOV WORD PTR [BP+FECC],001A
  2279.          7C00:034E C786CEFE1B00  MOV WORD PTR [BP+FECE],001B
  2280.          7C00:0354 C786D0FE1C00  MOV WORD PTR [BP+FED0],001C
  2281.          7C00:035A C786D2FE1D00  MOV WORD PTR [BP+FED2],001D
  2282.          7C00:0360 C786D4FE1E00  MOV WORD PTR [BP+FED4],001E
  2283.          7C00:0366 C786D6FE1F00  MOV WORD PTR [BP+FED6],001F
  2284.          7C00:036C C786D8FE2000  MOV WORD PTR [BP+FED8],0020
  2285.          7C00:0372 C786DAFE2100  MOV WORD PTR [BP+FEDA],0021
  2286.          7C00:0378 C786DCFE0700  MOV WORD PTR [BP+FEDC],0007
  2287.          7C00:037E C786DEFE2200  MOV WORD PTR [BP+FEDE],0022
  2288.          7C00:0384 C786E0FE2300  MOV WORD PTR [BP+FEE0],0023
  2289.          7C00:038A C786E2FE2400  MOV WORD PTR [BP+FEE2],0024
  2290.          7C00:0390 C786E4FE2500  MOV WORD PTR [BP+FEE4],0025
  2291.          7C00:0396 C786E6FE2600  MOV WORD PTR [BP+FEE6],0026
  2292.          7C00:039C C786E8FE2B00  MOV WORD PTR [BP+FEE8],002B
  2293.          7C00:03A2 C786EAFE2700  MOV WORD PTR [BP+FEEA],0027
  2294.          7C00:03A8 C786ECFE2800  MOV WORD PTR [BP+FEEC],0028
  2295.          7C00:03AE C786EEFE2900  MOV WORD PTR [BP+FEEE],0029
  2296.          7C00:03B4 C786F0FE2A00  MOV WORD PTR [BP+FEF0],002A
  2297.          7C00:03BA 8D46F4        LEA AX,[BP-0C]
  2298.          7C00:03BD 50            PUSH AX
  2299.          7C00:03BE 8D867AFF      LEA AX,[BP+FF7A]
  2300.          7C00:03C2 50            PUSH AX
  2301.          7C00:03C3 8D862CFF      LEA AX,[BP+FF2C]
  2302.          7C00:03C7 50            PUSH AX
  2303.          7C00:03C8 8D8628FF      LEA AX,[BP+FF28]
  2304.          7C00:03CC 50            PUSH AX
  2305.          7C00:03CD E832FC        CALL 0002   ; Music Plays
  2306.          7C00:03D0 0BC0          OR AX,AX
  2307.          7C00:03D2 7503          JNZ 03D7
  2308.          7C00:03D4 E99B07        JMP 0B72
  2309.          7C00:03D7 FF36AA1E      PUSH [1EAA]
  2310.          7C00:03DB 9A0200443D    CALL 3D44:0002
  2311.          7C00:03E0 FF36AE1E      PUSH [1EAE]
  2312.          7C00:03E4 FF36AC1E      PUSH [1EAC]
  2313.          7C00:03E8 9A0C008D3D    CALL 3D8D:000C
  2314.          7C00:03ED B80201        MOV AX,0102
  2315.          7C00:03F0 50            PUSH AX
  2316.          7C00:03F1 9ADE02443D    CALL 3D44:02DE
  2317.          7C00:03F6 B80400        MOV AX,0004
  2318.          7C00:03F9 BA4000        MOV DX,0040
  2319.          7C00:03FC 52            PUSH DX
  2320.          7C00:03FD 50            PUSH AX
  2321.          7C00:03FE 8D868CFE      LEA AX,[BP+FE8C]
  2322.          7C00:0402 50            PUSH AX
  2323.          7C00:0403 9A7000963B    CALL 3B96:0070    ; Music plays
  2324.          7C00:0408 89868EFE      MOV [BP+FE8E],AX
  2325.          7C00:040C 899690FE      MOV [BP+FE90],DX
  2326.          7C00:0410 0BD0          OR DX,AX
  2327.          7C00:0412 7471          JZ 0485
  2328.          7C00:0414 2BC0          SUB AX,AX
  2329.          7C00:0416 898686FE      MOV [BP+FE86],AX
  2330.          7C00:041A 898684FE      MOV [BP+FE84],AX
  2331.          7C00:041E FFB690FE      PUSH [BP+FE90]
  2332.          7C00:0422 FFB68EFE      PUSH [BP+FE8E]
  2333.          7C00:0426 9A0A00F93C    CALL 3CF9:000A
  2334.          7C00:042B 898688FE      MOV [BP+FE88],AX
  2335.          7C00:042F 89968AFE      MOV [BP+FE8A],DX
  2336.          7C00:0433 833EB41E00    CMP WORD PTR [1EB4],+00
  2337.          7C00:0438 7514          JNZ 044E
  2338.          7C00:043A 8B4608        MOV AX,[BP+08]
  2339.          7C00:043D 0B4606        OR AX,[BP+06]
  2340.          7C00:0440 740C          JZ 044E
  2341.          7C00:0442 B80100        MOV AX,0001
  2342.          7C00:0445 50            PUSH AX
  2343.          7C00:0446 9AF4019324    CALL 2493:01F4
  2344.          7C00:044B 83C402        ADD SP,+02
  2345.          7C00:044E 2AC0          SUB AL,AL
  2346.          7C00:0450 50            PUSH AX
  2347.          7C00:0451 9A4803443D    CALL 3D44:0348
  2348.          7C00:0456 9A57331E2D    CALL 2D1E:3357
  2349.          7C00:045B 9A9911A73B    CALL 3BA7:1199
  2350.          7C00:0460 8D8684FE      LEA AX,[BP+FE84]
  2351.          7C00:0464 16            PUSH SS
  2352.          7C00:0465 50            PUSH AX
  2353.          7C00:0466 9A04007E3D    CALL 3D7E:0004    ; Music plays
  2354.          7C00:046B FFB68AFE      PUSH [BP+FE8A]
  2355.          7C00:046F FFB688FE      PUSH [BP+FE88]
  2356.          7C00:0473 9AF001F93C    CALL 3CF9:01F0
  2357.          7C00:0478 FFB690FE      PUSH [BP+FE90]
  2358.          7C00:047C FFB68EFE      PUSH [BP+FE8E]
  2359.          7C00:0480 9A78068D3D    CALL 3D8D:0678    ; Music plays
  2360.          7C00:0485 8B4608        MOV AX,[BP+08]
  2361.          7C00:0488 0B4606        OR AX,[BP+06]
  2362.          7C00:048B 7429          JZ 04B6
  2363.          7C00:048D 833EB41E00    CMP WORD PTR [1EB4],+00
  2364.          7C00:0492 740C          JZ 04A0
  2365.          7C00:0494 B80100        MOV AX,0001
  2366.          7C00:0497 50            PUSH AX
  2367.          7C00:0498 9AF4019324    CALL 2493:01F4    ; Music Plays
  2368.          7C00:049D 83C402        ADD SP,+02
  2369.          7C00:04A0 9A8C341E2D    CALL 2D1E:348C
  2370.          7C00:04A5 FF7608        PUSH [BP+08]
  2371.          7C00:04A8 FF7606        PUSH [BP+06]
  2372.          7C00:04AB 9A2A006342    CALL 4263:002A
  2373.          7C00:04B0 50            PUSH AX
  2374.          7C00:04B1 9A54006342    CALL 4263:0054
  2375.  
  2376.          ; this is the start of the actual  doc check.  OH! As you can
  2377.          ; tell, I wasn't too intrested in the music routines, but
  2378.          ; thought it might be fun to track them down
  2379.  
  2380.          7C00:04B6 9AD0098D3D    CALL 3D8D:09D0  ; Show Doc check
  2381.                                                  ; screen
  2382.          7C00:04BB B80301        MOV AX,0103
  2383.          7C00:04BE 50            PUSH AX
  2384.          7C00:04BF 9ADE02443D    CALL 3D44:02DE
  2385.          7C00:04C4 C746F60B00    MOV WORD PTR [BP-0A],000B
  2386.          7C00:04C9 C746F87900    MOV WORD PTR [BP-08],0079
  2387.          7C00:04CE C746FA2801    MOV WORD PTR [BP-06],0128
  2388.          7C00:04D3 C746FC4500    MOV WORD PTR [BP-04],0045
  2389.          7C00:04D8 B008          MOV AL,08
  2390.          7C00:04DA 50            PUSH AX
  2391.          7C00:04DB 9A1003443D    CALL 3D44:0310
  2392.          7C00:04E0 8D867AFF      LEA AX,[BP+FF7A]
  2393.          7C00:04E4 16            PUSH SS
  2394.          7C00:04E5 50            PUSH AX
  2395.          7C00:04E6 9A36007E3D    CALL 3D7E:0036  ; Show alien's face
  2396.  
  2397.          7C00:04EB C746E6A000    MOV WORD PTR [BP-1A],00A0
  2398.          7C00:04F0 C746EA0100    MOV WORD PTR [BP-16],0001
  2399.          7C00:04F5 C746840300    MOV WORD PTR [BP-7C],0003
  2400.          7C00:04FA 2AC0          SUB AL,AL
  2401.          7C00:04FC 50            PUSH AX
  2402.          7C00:04FD 9A1003443D    CALL 3D44:0310
  2403.          7C00:0502 8B46F8        MOV AX,[BP-08]
  2404.          7C00:0505 050700        ADD AX,0007
  2405.          7C00:0508 8946E8        MOV [BP-18],AX
  2406.          7C00:050B FFB62EFF      PUSH [BP+FF2E]
  2407.          7C00:050F FFB62CFF      PUSH [BP+FF2C]
  2408.          7C00:0513 FFB62EFF      PUSH [BP+FF2E]
  2409.          7C00:0517 FFB62CFF      PUSH [BP+FF2C]
  2410.          7C00:051B 9AE400FC44    CALL 44FC:00E4
  2411.          7C00:0520 8BF0          MOV SI,AX
  2412.          7C00:0522 9A1201E245    CALL 45E2:0112
  2413.          7C00:0527 B90500        MOV CX,0005
  2414.          7C00:052A 8BD0          MOV DX,AX
  2415.          7C00:052C 8BC6          MOV AX,SI
  2416.          7C00:052E 8BDA          MOV BX,DX
  2417.          7C00:0530 2BD2          SUB DX,DX
  2418.          7C00:0532 F7F1          DIV CX
  2419.          7C00:0534 8BD0          MOV DX,AX
  2420.          7C00:0536 4A            DEC DX
  2421.          7C00:0537 8BC3          MOV AX,BX
  2422.          7C00:0539 8BDA          MOV BX,DX
  2423.          7C00:053B 2BD2          SUB DX,DX
  2424.          7C00:053D F7F3          DIV BX
  2425.          7C00:053F 42            INC DX
  2426.          7C00:0540 8BC2          MOV AX,DX
  2427.          7C00:0542 D1E2          SHL DX,1
  2428.          7C00:0544 D1E2          SHL DX,1
  2429.          7C00:0546 03D0          ADD DX,AX
  2430.          7C00:0548 52            PUSH DX
  2431.          7C00:0549 9A2801FC44    CALL 44FC:0128
  2432.          7C00:054E 89868EFE      MOV [BP+FE8E],AX
  2433.          7C00:0552 899690FE      MOV [BP+FE90],DX
  2434.          7C00:0556 C78672FE0000  MOV WORD PTR [BP+FE72],0000
  2435.  
  2436.          ; This is the start of the loop the prints out the stupid
  2437.          ; message
  2438.  
  2439.          7C00:055C 52            PUSH DX
  2440.          7C00:055D 50            PUSH AX
  2441.          7C00:055E 9A4602FC44    CALL 44FC:0246
  2442.          7C00:0563 8946EC        MOV [BP-14],AX
  2443.          7C00:0566 8956EE        MOV [BP-12],DX
  2444.          7C00:0569 FFB690FE      PUSH [BP+FE90]
  2445.          7C00:056D FFB68EFE      PUSH [BP+FE8E]
  2446.          7C00:0571 9AF201FC44    CALL 44FC:01F2
  2447.          7C00:0576 8946F0        MOV [BP-10],AX
  2448.          7C00:0579 8D46E6        LEA AX,[BP-1A]
  2449.          7C00:057C 16            PUSH SS
  2450.          7C00:057D 50            PUSH AX
  2451.          7C00:057E 9A8202C93C    CALL 3CC9:0282
  2452.          7C00:0583 8346E80A      ADD WORD PTR [BP-18],+0A
  2453.          7C00:0587 FFB690FE      PUSH [BP+FE90]
  2454.          7C00:058B FFB68EFE      PUSH [BP+FE8E]
  2455.          7C00:058F B80100        MOV AX,0001
  2456.          7C00:0592 50            PUSH AX
  2457.          7C00:0593 9A7E01FC44    CALL 44FC:017E
  2458.          7C00:0598 89868EFE      MOV [BP+FE8E],AX
  2459.          7C00:059C 899690FE      MOV [BP+FE90],DX
  2460.          7C00:05A0 FF8672FE      INC WORD PTR [BP+FE72]
  2461.          7C00:05A4 83BE72FE05    CMP WORD PTR [BP+FE72],+05
  2462.          7C00:05A9 7CB1          JL 055C
  2463.  
  2464.          ; Reads in the code to check  (I think.  Oh hell it really
  2465.          ; doesn't matter)
  2466.  
  2467.          7C00:05AB 9A1201E245    CALL 45E2:0112
  2468.          7C00:05B0 B90C00        MOV CX,000C
  2469.          7C00:05B3 99            CWD
  2470.          7C00:05B4 F7F9          IDIV CX
  2471.          7C00:05B6 895682        MOV [BP-7E],DX
  2472.          7C00:05B9 9A1201E245    CALL 45E2:0112
  2473.          7C00:05BE B90C00        MOV CX,000C
  2474.          7C00:05C1 99            CWD
  2475.          7C00:05C2 F7F9          IDIV CX
  2476.          7C00:05C4 8956F2        MOV [BP-0E],DX
  2477.          7C00:05C7 9A1201E245    CALL 45E2:0112
  2478.          7C00:05CC B90C00        MOV CX,000C
  2479.          7C00:05CF 99            CWD
  2480.          7C00:05D0 F7F9          IDIV CX
  2481.          7C00:05D2 8956FE        MOV [BP-02],DX
  2482.          7C00:05D5 9A1201E245    CALL 45E2:0112
  2483.          7C00:05DA B90C00        MOV CX,000C
  2484.          7C00:05DD 99            CWD
  2485.          7C00:05DE F7F9          IDIV CX
  2486.          7C00:05E0 8996F4FE      MOV [BP+FEF4],DX
  2487.          7C00:05E4 FFB62AFF      PUSH [BP+FF2A]
  2488.          7C00:05E8 FFB628FF      PUSH [BP+FF28]
  2489.          7C00:05EC FF7682        PUSH [BP-7E]
  2490.          7C00:05EF 9A2801FC44    CALL 44FC:0128
  2491.          7C00:05F4 89868EFE      MOV [BP+FE8E],AX
  2492.          7C00:05F8 899690FE      MOV [BP+FE90],DX
  2493.          7C00:05FC 52            PUSH DX
  2494.          7C00:05FD 50            PUSH AX
  2495.          7C00:05FE 8D86F6FE      LEA AX,[BP+FEF6]
  2496.          7C00:0602 16            PUSH SS
  2497.          7C00:0603 50            PUSH AX
  2498.          7C00:0604 9A9A02FC44    CALL 44FC:029A
  2499.          7C00:0609 FFB62AFF      PUSH [BP+FF2A]
  2500.          7C00:060D FFB628FF      PUSH [BP+FF28]
  2501.          7C00:0611 8B46FE        MOV AX,[BP-02]
  2502.          7C00:0614 050C00        ADD AX,000C
  2503.          7C00:0617 50            PUSH AX
  2504.          7C00:0618 9A2801FC44    CALL 44FC:0128
  2505.          7C00:061D 89868EFE      MOV [BP+FE8E],AX
  2506.          7C00:0621 899690FE      MOV [BP+FE90],DX
  2507.          7C00:0625 52            PUSH DX
  2508.          7C00:0626 50            PUSH AX
  2509.          7C00:0627 8DBEF6FE      LEA DI,[BP+FEF6]
  2510.          7C00:062B 16            PUSH SS
  2511.          7C00:062C 07            POP ES
  2512.          7C00:062D B9FFFF        MOV CX,FFFF
  2513.          7C00:0630 33C0          XOR AX,AX
  2514.          7C00:0632 F2            REPNZ
  2515.          7C00:0633 AE            SCASB
  2516.          7C00:0634 F7D1          NOT CX
  2517.          7C00:0636 49            DEC CX
  2518.          7C00:0637 8BF1          MOV SI,CX
  2519.          7C00:0639 8D82F6FE      LEA AX,[BP+SI+FEF6]
  2520.          7C00:063D 16            PUSH SS
  2521.          7C00:063E 50            PUSH AX
  2522.          7C00:063F 9A9A02FC44    CALL 44FC:029A
  2523.          7C00:0644 FFB62AFF      PUSH [BP+FF2A]
  2524.          7C00:0648 FFB628FF      PUSH [BP+FF28]
  2525.          7C00:064C 8B46F2        MOV AX,[BP-0E]
  2526.          7C00:064F 051800        ADD AX,0018
  2527.          7C00:0652 50            PUSH AX
  2528.          7C00:0653 9A2801FC44    CALL 44FC:0128
  2529.          7C00:0658 89868EFE      MOV [BP+FE8E],AX
  2530.          7C00:065C 899690FE      MOV [BP+FE90],DX
  2531.          7C00:0660 52            PUSH DX
  2532.          7C00:0661 50            PUSH AX
  2533.          7C00:0662 8DBEF6FE      LEA DI,[BP+FEF6]
  2534.          7C00:0666 16            PUSH SS
  2535.          7C00:0667 07            POP ES
  2536.          7C00:0668 B9FFFF        MOV CX,FFFF
  2537.          7C00:066B 33C0          XOR AX,AX
  2538.          7C00:066D F2            REPNZ
  2539.          7C00:066E AE            SCASB
  2540.          7C00:066F F7D1          NOT CX
  2541.          7C00:0671 49            DEC CX
  2542.          7C00:0672 8BF1          MOV SI,CX
  2543.          7C00:0674 8D82F6FE      LEA AX,[BP+SI+FEF6]
  2544.          7C00:0678 16            PUSH SS
  2545.          7C00:0679 50            PUSH AX
  2546.          7C00:067A 9A9A02FC44    CALL 44FC:029A
  2547.          7C00:067F FFB62AFF      PUSH [BP+FF2A]
  2548.          7C00:0683 FFB628FF      PUSH [BP+FF28]
  2549.          7C00:0687 8B86F4FE      MOV AX,[BP+FEF4]
  2550.          7C00:068B 052400        ADD AX,0024
  2551.          7C00:068E 50            PUSH AX
  2552.          7C00:068F 9A2801FC44    CALL 44FC:0128
  2553.          7C00:0694 89868EFE      MOV [BP+FE8E],AX
  2554.          7C00:0698 899690FE      MOV [BP+FE90],DX
  2555.          7C00:069C 52            PUSH DX
  2556.          7C00:069D 50            PUSH AX
  2557.          7C00:069E 8DBEF6FE      LEA DI,[BP+FEF6]
  2558.          7C00:06A2 16            PUSH SS
  2559.          7C00:06A3 07            POP ES
  2560.          7C00:06A4 B9FFFF        MOV CX,FFFF
  2561.          7C00:06A7 33C0          XOR AX,AX
  2562.          7C00:06A9 F2            REPNZ
  2563.          7C00:06AA AE            SCASB
  2564.          7C00:06AB F7D1          NOT CX
  2565.          7C00:06AD 49            DEC CX
  2566.          7C00:06AE 8BF1          MOV SI,CX
  2567.          7C00:06B0 8D82F6FE      LEA AX,[BP+SI+FEF6]
  2568.          7C00:06B4 16            PUSH SS
  2569.          7C00:06B5 50            PUSH AX
  2570.          7C00:06B6 9A9A02FC44    CALL 44FC:029A
  2571.          7C00:06BB C746E8B200    MOV WORD PTR [BP-18],00B2
  2572.          7C00:06C0 8D86F6FE      LEA AX,[BP+FEF6]
  2573.          7C00:06C4 8946EC        MOV [BP-14],AX
  2574.          7C00:06C7 8C56EE        MOV [BP-12],SS
  2575.          7C00:06CA 8DBEF6FE      LEA DI,[BP+FEF6]
  2576.          7C00:06CE 16            PUSH SS
  2577.          7C00:06CF 07            POP ES
  2578.          7C00:06D0 B9FFFF        MOV CX,FFFF
  2579.          7C00:06D3 33C0          XOR AX,AX
  2580.          7C00:06D5 F2            REPNZ
  2581.          7C00:06D6 AE            SCASB
  2582.          7C00:06D7 F7D1          NOT CX
  2583.          7C00:06D9 49            DEC CX
  2584.          7C00:06DA 894EF0        MOV [BP-10],CX
  2585.          7C00:06DD B084          MOV AL,84
  2586.          7C00:06DF 50            PUSH AX
  2587.          7C00:06E0 9A1003443D    CALL 3D44:0310
  2588.          7C00:06E5 8D46E6        LEA AX,[BP-1A]
  2589.          7C00:06E8 16            PUSH SS
  2590.          7C00:06E9 50            PUSH AX
  2591.          7C00:06EA 9A8202C93C    CALL 3CC9:0282  ; Displays the code
  2592.                                                  ; to check
  2593.  
  2594.          7C00:06EF 8346E80A      ADD WORD PTR [BP-18],+0A
  2595.          7C00:06F3 FFB62AFF      PUSH [BP+FF2A]
  2596.          7C00:06F7 FFB628FF      PUSH [BP+FF28]
  2597.          7C00:06FB B85B00        MOV AX,005B
  2598.          7C00:06FE 50            PUSH AX
  2599.          7C00:06FF 9A2801FC44    CALL 44FC:0128
  2600.          7C00:0704 89868EFE      MOV [BP+FE8E],AX
  2601.          7C00:0708 899690FE      MOV [BP+FE90],DX
  2602.          7C00:070C 52            PUSH DX
  2603.          7C00:070D 50            PUSH AX
  2604.          7C00:070E 9A4602FC44    CALL 44FC:0246
  2605.          7C00:0713 8946EC        MOV [BP-14],AX
  2606.          7C00:0716 8956EE        MOV [BP-12],DX
  2607.          7C00:0719 FFB690FE      PUSH [BP+FE90]
  2608.          7C00:071D FFB68EFE      PUSH [BP+FE8E]
  2609.          7C00:0721 9AF201FC44    CALL 44FC:01F2
  2610.          7C00:0726 8946F0        MOV [BP-10],AX
  2611.          7C00:0729 2AC0          SUB AL,AL
  2612.          7C00:072B 50            PUSH AX
  2613.          7C00:072C 9A1003443D    CALL 3D44:0310
  2614.          7C00:0731 8D46E6        LEA AX,[BP-1A]
  2615.          7C00:0734 16            PUSH SS
  2616.          7C00:0735 50            PUSH AX
  2617.          7C00:0736 9A8202C93C    CALL 3CC9:0282   ; Displays "PROPER
  2618.                                                   ; response" msg
  2619.  
  2620.          7C00:073B 8B86F4FE      MOV AX,[BP+FEF4]
  2621.          7C00:073F 2B46F2        SUB AX,[BP-0E]
  2622.          7C00:0742 898672FE      MOV [BP+FE72],AX
  2623.          7C00:0746 0346FE        ADD AX,[BP-02]
  2624.          7C00:0749 898676FE      MOV [BP+FE76],AX
  2625.          7C00:074D 0BC0          OR AX,AX
  2626.          7C00:074F 7D09          JGE 075A
  2627.          7C00:0751 050C00        ADD AX,000C
  2628.          7C00:0754 898676FE      MOV [BP+FE76],AX
  2629.          7C00:0758 EB0A          JMP 0764
  2630.          7C00:075A 3D0C00        CMP AX,000C
  2631.          7C00:075D 7C05          JL 0764
  2632.          7C00:075F 83AE76FE0C    SUB WORD PTR [BP+FE76],+0C
  2633.          7C00:0764 8B4682        MOV AX,[BP-7E]
  2634.          7C00:0767 038672FE      ADD AX,[BP+FE72]
  2635.          7C00:076B 898674FE      MOV [BP+FE74],AX
  2636.          7C00:076F 0BC0          OR AX,AX
  2637.          7C00:0771 7D09          JGE 077C
  2638.          7C00:0773 050C00        ADD AX,000C
  2639.          7C00:0776 898674FE      MOV [BP+FE74],AX
  2640.          7C00:077A EB0A          JMP 0786
  2641.          7C00:077C 3D0C00        CMP AX,000C
  2642.          7C00:077F 7C05          JL 0786
  2643.          7C00:0781 83AE74FE0C    SUB WORD PTR [BP+FE74],+0C
  2644.          7C00:0786 8BB6F4FE      MOV SI,[BP+FEF4]
  2645.          7C00:078A D1E6          SHL SI,1
  2646.          7C00:078C 8BB262FF      MOV SI,[BP+SI+FF62]
  2647.          7C00:0790 89B672FE      MOV [BP+FE72],SI
  2648.          7C00:0794 8B8676FE      MOV AX,[BP+FE76]
  2649.          7C00:0798 D1E0          SHL AX,1
  2650.          7C00:079A D1E0          SHL AX,1
  2651.          7C00:079C 03F0          ADD SI,AX
  2652.          7C00:079E D1E6          SHL SI,1
  2653.          7C00:07A0 8B8292FE      MOV AX,[BP+SI+FE92]
  2654.          7C00:07A4 8986F4FE      MOV [BP+FEF4],AX
  2655.          7C00:07A8 3D2B00        CMP AX,002B
  2656.          7C00:07AB 7515          JNZ 07C2
  2657.          7C00:07AD 8BB674FE      MOV SI,[BP+FE74]
  2658.          7C00:07B1 D1E6          SHL SI,1
  2659.          7C00:07B3 D1E6          SHL SI,1
  2660.          7C00:07B5 03B672FE      ADD SI,[BP+FE72]
  2661.          7C00:07B9 D1E6          SHL SI,1
  2662.          7C00:07BB 8B4286        MOV AX,[BP+SI-7A]
  2663.          7C00:07BE 8986F4FE      MOV [BP+FEF4],AX
  2664.          7C00:07C2 C78684FE7800  MOV WORD PTR [BP+FE84],0078
  2665.          7C00:07C8 B85100        MOV AX,0051
  2666.          7C00:07CB 898686FE      MOV [BP+FE86],AX
  2667.          7C00:07CF 898688FE      MOV [BP+FE88],AX
  2668.          7C00:07D3 C7868AFE0900  MOV WORD PTR [BP+FE8A],0009
  2669.          7C00:07D9 C78678FE7900  MOV WORD PTR [BP+FE78],0079
  2670.          7C00:07DF C7867AFE5900  MOV WORD PTR [BP+FE7A],0059
  2671.          7C00:07E5 C7867CFE0000  MOV WORD PTR [BP+FE7C],0000
  2672.          7C00:07EB 8D86F6FE      LEA AX,[BP+FEF6]
  2673.          7C00:07EF 89867EFE      MOV [BP+FE7E],AX
  2674.          7C00:07F3 8C9680FE      MOV [BP+FE80],SS
  2675.          7C00:07F7 C78682FE0000  MOV WORD PTR [BP+FE82],0000
  2676.          7C00:07FD FFB62AFF      PUSH [BP+FF2A]
  2677.          7C00:0801 FFB628FF      PUSH [BP+FF28]
  2678.          7C00:0805 8B86F4FE      MOV AX,[BP+FEF4]
  2679.          7C00:0809 053000        ADD AX,0030
  2680.          7C00:080C 50            PUSH AX
  2681.          7C00:080D 9A2801FC44    CALL 44FC:0128
  2682.          7C00:0812 89868EFE      MOV [BP+FE8E],AX
  2683.          7C00:0816 899690FE      MOV [BP+FE90],DX
  2684.          7C00:081A 52            PUSH DX
  2685.          7C00:081B 50            PUSH AX
  2686.          7C00:081C 8D8630FF      LEA AX,[BP+FF30]
  2687.          7C00:0820 16            PUSH SS
  2688.          7C00:0821 50            PUSH AX
  2689.          7C00:0822 9A9A02FC44    CALL 44FC:029A
  2690.          7C00:0827 B047          MOV AL,47
  2691.          7C00:0829 50            PUSH AX
  2692.          7C00:082A 9A1003443D    CALL 3D44:0310
  2693.          7C00:082F C7868CFE0000  MOV WORD PTR [BP+FE8C],0000
  2694.  
  2695.          ; All the code you just saw.  I have no clue what it does
  2696.          ; (hey at least I'm honest) but it wasn't important.
  2697.  
  2698.          ; Here is the imput outer loop
  2699.  
  2700.          7C00:0835 FF365220      PUSH [2052]
  2701.          7C00:0839 FF365020      PUSH [2050]
  2702.          7C00:083D 9A2802FD41    CALL 41FD:0228
  2703.          7C00:0842 888670FE      MOV [BP+FE70],AL
  2704.          7C00:0846 0AC0          OR AL,AL
  2705.          7C00:0848 7503          JNZ 084D
  2706.          7C00:084A E99200        JMP 08DF
  2707.          7C00:084D 2AE4          SUB AH,AH
  2708.          7C00:084F 2D0800        SUB AX,0008
  2709.          7C00:0852 745A          JZ 08AE
  2710.          7C00:0854 48            DEC AX
  2711.          7C00:0855 48            DEC AX
  2712.          7C00:0856 7503          JNZ 085B
  2713.          7C00:0858 E90901        JMP 0964
  2714.          7C00:085B 2D0300        SUB AX,0003
  2715.          7C00:085E 7503          JNZ 0863
  2716.          7C00:0860 E90101        JMP 0964
  2717.          7C00:0863 8A9E70FE      MOV BL,[BP+FE70]
  2718.          7C00:0867 2AFF          SUB BH,BH
  2719.          7C00:0869 F687790B57    TEST BYTE PTR [BX+0B79],57
  2720.          7C00:086E 746F          JZ 08DF
  2721.          7C00:0870 F687790B03    TEST BYTE PTR [BX+0B79],03
  2722.          7C00:0875 740C          JZ 0883
  2723.          7C00:0877 F687790B02    TEST BYTE PTR [BX+0B79],02
  2724.          7C00:087C 7405          JZ 0883
  2725.          7C00:087E 80AE70FE20    SUB BYTE PTR [BP+FE70],20
  2726.          7C00:0883 8A8670FE      MOV AL,[BP+FE70]
  2727.          7C00:0887 C49E7EFE      LES BX,[BP+FE7E]
  2728.          7C00:088B 8BB682FE      MOV SI,[BP+FE82]
  2729.          7C00:088F 26            ES:
  2730.          7C00:0890 8800          MOV [BX+SI],AL
  2731.          7C00:0892 FF8682FE      INC WORD PTR [BP+FE82]
  2732.          7C00:0896 FFB688FE      PUSH [BP+FE88]
  2733.          7C00:089A 8D8678FE      LEA AX,[BP+FE78]
  2734.          7C00:089E 50            PUSH AX
  2735.          7C00:089F 9A56049324    CALL 2493:0456
  2736.          7C00:08A4 83C404        ADD SP,+04
  2737.          7C00:08A7 0BC0          OR AX,AX
  2738.          7C00:08A9 7534          JNZ 08DF
  2739.          7C00:08AB EB27          JMP 08D4
  2740.          7C00:08AD 90            NOP
  2741.          7C00:08AE 83BE82FE00    CMP WORD PTR [BP+FE82],+00
  2742.          7C00:08B3 7404          JZ 08B9
  2743.          7C00:08B5 FF8E82FE      DEC WORD PTR [BP+FE82]
  2744.          7C00:08B9 B008          MOV AL,08
  2745.          7C00:08BB 50            PUSH AX
  2746.          7C00:08BC 9A1003443D    CALL 3D44:0310
  2747.          7C00:08C1 8D8684FE      LEA AX,[BP+FE84]
  2748.          7C00:08C5 16            PUSH SS
  2749.          7C00:08C6 50            PUSH AX
  2750.          7C00:08C7 9A6A00843D    CALL 3D84:006A
  2751.          7C00:08CC B047          MOV AL,47
  2752.          7C00:08CE 50            PUSH AX
  2753.          7C00:08CF 9A1003443D    CALL 3D44:0310
  2754.          7C00:08D4 8D8678FE      LEA AX,[BP+FE78]
  2755.          7C00:08D8 16            PUSH SS
  2756.          7C00:08D9 50            PUSH AX
  2757.          7C00:08DA 9A8202C93C    CALL 3CC9:0282
  2758.          7C00:08DF 83BE8CFE00    CMP WORD PTR [BP+FE8C],+00
  2759.          7C00:08E4 7503          JNZ 08E9
  2760.          7C00:08E6 E94CFF        JMP 0835
  2761.  
  2762.          ; Next comes the code that checks your entry.  If you follow
  2763.          ; it through you will see it handles not only clearing the
  2764.          ; screen and printing the "GOOD GOING" message but it also
  2765.          ; handles bad entries, etc.
  2766.  
  2767.          7C00:08E9 8BB682FE      MOV SI,[BP+FE82]
  2768.          7C00:08ED C682F6FE00    MOV BYTE PTR [BP+SI+FEF6],00
  2769.          7C00:08F2 8DBE30FF      LEA DI,[BP+FF30]
  2770.          7C00:08F6 8DB6F6FE      LEA SI,[BP+FEF6]
  2771.          7C00:08FA 16            PUSH SS
  2772.          7C00:08FB 07            POP ES
  2773.          7C00:08FC B9FFFF        MOV CX,FFFF
  2774.          7C00:08FF 33C0          XOR AX,AX
  2775.          7C00:0901 F2            REPNZ
  2776.          7C00:0902 AE            SCASB
  2777.          7C00:0903 F7D1          NOT CX
  2778.          7C00:0905 2BF9          SUB DI,CX
  2779.          7C00:0907 F3            REPZ
  2780.          7C00:0908 A6            CMPSB
  2781.          7C00:0909 7405          JZ 0910
  2782.          7C00:090B 1BC0          SBB AX,AX
  2783.          7C00:090D 1DFFFF        SBB AX,FFFF
  2784.          7C00:0910 3D0100        CMP AX,0001
  2785.          7C00:0913 1BC0          SBB AX,AX
  2786.          7C00:0915 F7D8          NEG AX
  2787.          7C00:0917 8986F2FE      MOV [BP+FEF2],AX
  2788.          7C00:091B 0BC0          OR AX,AX
  2789.          7C00:091D 7509          JNZ 0928
  2790.          7C00:091F 837E8401      CMP WORD PTR [BP-7C],+01
  2791.          7C00:0923 7703          JA 0928
  2792.          7C00:0925 E91C02        JMP 0B44
  2793.          7C00:0928 0BC0          OR AX,AX
  2794.          7C00:092A 7506          JNZ 0932
  2795.          7C00:092C 837E8403      CMP WORD PTR [BP-7C],+03
  2796.          7C00:0930 740A          JZ 093C
  2797.          7C00:0932 0BC0          OR AX,AX
  2798.          7C00:0934 745E          JZ 0994
  2799.          7C00:0936 837E8403      CMP WORD PTR [BP-7C],+03
  2800.          7C00:093A 7358          JNB 0994
  2801.          7C00:093C B047          MOV AL,47
  2802.          7C00:093E 50            PUSH AX
  2803.          7C00:093F 9A1003443D    CALL 3D44:0310
  2804.          7C00:0944 8D867AFF      LEA AX,[BP+FF7A]
  2805.          7C00:0948 16            PUSH SS
  2806.          7C00:0949 50            PUSH AX
  2807.          7C00:094A 9A36007E3D    CALL 3D7E:0036
  2808.          7C00:094F 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  2809.          7C00:0954 7518          JNZ 096E
  2810.          7C00:0956 FF7680        PUSH [BP-80]
  2811.          7C00:0959 FFB67EFF      PUSH [BP+FF7E]
  2812.          7C00:095D 9A1C04F93C    CALL 3CF9:041C
  2813.          7C00:0962 EB16          JMP 097A
  2814.          7C00:0964 C7868CFE0100  MOV WORD PTR [BP+FE8C],0001
  2815.          7C00:096A E972FF        JMP 08DF
  2816.          7C00:096D 90            NOP
  2817.          7C00:096E FF7680        PUSH [BP-80]
  2818.          7C00:0971 FFB67EFF      PUSH [BP+FF7E]
  2819.          7C00:0975 9A7204F93C    CALL 3CF9:0472
  2820.          7C00:097A 89867EFF      MOV [BP+FF7E],AX
  2821.          7C00:097E 895680        MOV [BP-80],DX
  2822.          7C00:0981 B008          MOV AL,08
  2823.          7C00:0983 50            PUSH AX
  2824.          7C00:0984 9A1003443D    CALL 3D44:0310
  2825.          7C00:0989 8D867AFF      LEA AX,[BP+FF7A]
  2826.          7C00:098D 16            PUSH SS
  2827.          7C00:098E 50            PUSH AX
  2828.          7C00:098F 9A36007E3D    CALL 3D7E:0036
  2829.          7C00:0994 B047          MOV AL,47
  2830.          7C00:0996 50            PUSH AX
  2831.          7C00:0997 9A1003443D    CALL 3D44:0310
  2832.          7C00:099C 8D46F6        LEA AX,[BP-0A]
  2833.          7C00:099F 16            PUSH SS
  2834.          7C00:09A0 50            PUSH AX
  2835.          7C00:09A1 9A6A00843D    CALL 3D84:006A
  2836.          7C00:09A6 B008          MOV AL,08
  2837.          7C00:09A8 50            PUSH AX
  2838.          7C00:09A9 9A1003443D    CALL 3D44:0310
  2839.          7C00:09AE 8D8684FE      LEA AX,[BP+FE84]
  2840.          7C00:09B2 16            PUSH SS
  2841.          7C00:09B3 50            PUSH AX
  2842.          7C00:09B4 9A6A00843D    CALL 3D84:006A
  2843.          7C00:09B9 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  2844.          7C00:09BE 7503          JNZ 09C3
  2845.          7C00:09C0 E98500        JMP 0A48
  2846.          7C00:09C3 2AC0          SUB AL,AL
  2847.          7C00:09C5 50            PUSH AX
  2848.          7C00:09C6 9A1003443D    CALL 3D44:0310
  2849.          7C00:09CB 8B46F8        MOV AX,[BP-08]
  2850.          7C00:09CE 050700        ADD AX,0007
  2851.          7C00:09D1 8946E8        MOV [BP-18],AX
  2852.          7C00:09D4 FFB62EFF      PUSH [BP+FF2E]
  2853.          7C00:09D8 FFB62CFF      PUSH [BP+FF2C]
  2854.          7C00:09DC 2BC0          SUB AX,AX
  2855.          7C00:09DE 50            PUSH AX
  2856.          7C00:09DF 9A2801FC44    CALL 44FC:0128
  2857.          7C00:09E4 89868EFE      MOV [BP+FE8E],AX
  2858.          7C00:09E8 899690FE      MOV [BP+FE90],DX
  2859.          7C00:09EC C78672FE0000  MOV WORD PTR [BP+FE72],0000
  2860.          7C00:09F2 EB04          JMP 09F8
  2861.          7C00:09F4 FF8672FE      INC WORD PTR [BP+FE72]
  2862.          7C00:09F8 83BE72FE05    CMP WORD PTR [BP+FE72],+05
  2863.          7C00:09FD 7C03          JL 0A02
  2864.          7C00:09FF E94201        JMP 0B44
  2865.          7C00:0A02 52            PUSH DX
  2866.          7C00:0A03 50            PUSH AX
  2867.          7C00:0A04 9A4602FC44    CALL 44FC:0246
  2868.          7C00:0A09 8946EC        MOV [BP-14],AX
  2869.          7C00:0A0C 8956EE        MOV [BP-12],DX
  2870.          7C00:0A0F FFB690FE      PUSH [BP+FE90]
  2871.          7C00:0A13 FFB68EFE      PUSH [BP+FE8E]
  2872.          7C00:0A17 9AF201FC44    CALL 44FC:01F2
  2873.          7C00:0A1C 8946F0        MOV [BP-10],AX
  2874.          7C00:0A1F 8D46E6        LEA AX,[BP-1A]
  2875.          7C00:0A22 16            PUSH SS
  2876.          7C00:0A23 50            PUSH AX
  2877.          7C00:0A24 9A8202C93C    CALL 3CC9:0282
  2878.          7C00:0A29 8346E80A      ADD WORD PTR [BP-18],+0A
  2879.          7C00:0A2D FFB690FE      PUSH [BP+FE90]
  2880.          7C00:0A31 FFB68EFE      PUSH [BP+FE8E]
  2881.          7C00:0A35 B80100        MOV AX,0001
  2882.          7C00:0A38 50            PUSH AX
  2883.          7C00:0A39 9A7E01FC44    CALL 44FC:017E
  2884.          7C00:0A3E 89868EFE      MOV [BP+FE8E],AX
  2885.          7C00:0A42 899690FE      MOV [BP+FE90],DX
  2886.          7C00:0A46 EBAC          JMP 09F4
  2887.          7C00:0A48 B084          MOV AL,84
  2888.          7C00:0A4A 50            PUSH AX
  2889.          7C00:0A4B 9A1003443D    CALL 3D44:0310
  2890.          7C00:0A50 C746E88C00    MOV WORD PTR [BP-18],008C
  2891.          7C00:0A55 FFB62AFF      PUSH [BP+FF2A]
  2892.          7C00:0A59 FFB628FF      PUSH [BP+FF28]
  2893.          7C00:0A5D B85C00        MOV AX,005C
  2894.          7C00:0A60 50            PUSH AX
  2895.          7C00:0A61 9A2801FC44    CALL 44FC:0128
  2896.          7C00:0A66 89868EFE      MOV [BP+FE8E],AX
  2897.          7C00:0A6A 899690FE      MOV [BP+FE90],DX
  2898.          7C00:0A6E 52            PUSH DX
  2899.          7C00:0A6F 50            PUSH AX
  2900.          7C00:0A70 9A4602FC44    CALL 44FC:0246
  2901.          7C00:0A75 8946EC        MOV [BP-14],AX
  2902.          7C00:0A78 8956EE        MOV [BP-12],DX
  2903.          7C00:0A7B FFB690FE      PUSH [BP+FE90]
  2904.          7C00:0A7F FFB68EFE      PUSH [BP+FE8E]
  2905.          7C00:0A83 9AF201FC44    CALL 44FC:01F2
  2906.          7C00:0A88 8946F0        MOV [BP-10],AX
  2907.          7C00:0A8B 8D46E6        LEA AX,[BP-1A]
  2908.          7C00:0A8E 16            PUSH SS
  2909.          7C00:0A8F 50            PUSH AX
  2910.          7C00:0A90 9A8202C93C    CALL 3CC9:0282
  2911.          7C00:0A95 2AC0          SUB AL,AL
  2912.          7C00:0A97 50            PUSH AX
  2913.          7C00:0A98 9A1003443D    CALL 3D44:0310
  2914.          7C00:0A9D 8346E80B      ADD WORD PTR [BP-18],+0B
  2915.          7C00:0AA1 FFB690FE      PUSH [BP+FE90]
  2916.          7C00:0AA5 FFB68EFE      PUSH [BP+FE8E]
  2917.          7C00:0AA9 B80100        MOV AX,0001
  2918.          7C00:0AAC 50            PUSH AX
  2919.          7C00:0AAD 9A7E01FC44    CALL 44FC:017E
  2920.          7C00:0AB2 89868EFE      MOV [BP+FE8E],AX
  2921.          7C00:0AB6 899690FE      MOV [BP+FE90],DX
  2922.          7C00:0ABA 52            PUSH DX
  2923.          7C00:0ABB 50            PUSH AX
  2924.          7C00:0ABC 9A4602FC44    CALL 44FC:0246
  2925.          7C00:0AC1 8946EC        MOV [BP-14],AX
  2926.          7C00:0AC4 8956EE        MOV [BP-12],DX
  2927.          7C00:0AC7 FFB690FE      PUSH [BP+FE90]
  2928.          7C00:0ACB FFB68EFE      PUSH [BP+FE8E]
  2929.          7C00:0ACF 9AF201FC44    CALL 44FC:01F2
  2930.          7C00:0AD4 8946F0        MOV [BP-10],AX
  2931.          7C00:0AD7 8D46E6        LEA AX,[BP-1A]
  2932.          7C00:0ADA 16            PUSH SS
  2933.          7C00:0ADB 50            PUSH AX
  2934.  
  2935.  
  2936.          ; Lot's of code Huh?
  2937.  
  2938.  
  2939.          7C00:0ADC 9A8202C93C    CALL 3CC9:0282
  2940.          7C00:0AE1 C746E8BC00    MOV WORD PTR [BP-18],00BC
  2941.          7C00:0AE6 FFB690FE      PUSH [BP+FE90]
  2942.          7C00:0AEA FFB68EFE      PUSH [BP+FE8E]
  2943.          7C00:0AEE B80100        MOV AX,0001
  2944.          7C00:0AF1 50            PUSH AX
  2945.          7C00:0AF2 9A7E01FC44    CALL 44FC:017E
  2946.          7C00:0AF7 89868EFE      MOV [BP+FE8E],AX
  2947.          7C00:0AFB 899690FE      MOV [BP+FE90],DX
  2948.          7C00:0AFF 52            PUSH DX
  2949.          7C00:0B00 50            PUSH AX
  2950.          7C00:0B01 9A4602FC44    CALL 44FC:0246
  2951.          7C00:0B06 8946EC        MOV [BP-14],AX
  2952.          7C00:0B09 8956EE        MOV [BP-12],DX
  2953.          7C00:0B0C FFB690FE      PUSH [BP+FE90]
  2954.          7C00:0B10 FFB68EFE      PUSH [BP+FE8E]
  2955.          7C00:0B14 9AF201FC44    CALL 44FC:01F2
  2956.          7C00:0B19 8946F0        MOV [BP-10],AX
  2957.          7C00:0B1C 8D46E6        LEA AX,[BP-1A]
  2958.          7C00:0B1F 16            PUSH SS
  2959.          7C00:0B20 50            PUSH AX
  2960.          7C00:0B21 9A8202C93C    CALL 3CC9:0282
  2961.          7C00:0B26 B80100        MOV AX,0001
  2962.          7C00:0B29 50            PUSH AX
  2963.          7C00:0B2A 9AF4019324    CALL 2493:01F4
  2964.          7C00:0B2F 83C402        ADD SP,+02
  2965.          7C00:0B32 B047          MOV AL,47
  2966.          7C00:0B34 50            PUSH AX
  2967.          7C00:0B35 9A1003443D    CALL 3D44:0310
  2968.          7C00:0B3A 8D46F6        LEA AX,[BP-0A]
  2969.          7C00:0B3D 16            PUSH SS
  2970.          7C00:0B3E 50            PUSH AX
  2971.          7C00:0B3F 9A6A00843D    CALL 3D84:006A
  2972.          7C00:0B44 83BEF2FE00    CMP WORD PTR [BP+FEF2],+00
  2973.          7C00:0B49 7508          JNZ 0B53
  2974.          7C00:0B4B FF4E84        DEC WORD PTR [BP-7C]
  2975.          7C00:0B4E 7403          JZ 0B53
  2976.          7C00:0B50 E9A7F9        JMP 04FA
  2977.          7C00:0B53 FF76F4        PUSH [BP-0C]
  2978.          7C00:0B56 8D867AFF      LEA AX,[BP+FF7A]
  2979.          7C00:0B5A 50            PUSH AX
  2980.          7C00:0B5B FFB62EFF      PUSH [BP+FF2E]
  2981.          7C00:0B5F FFB62CFF      PUSH [BP+FF2C]
  2982.          7C00:0B63 FFB62AFF      PUSH [BP+FF2A]
  2983.          7C00:0B67 FFB628FF      PUSH [BP+FF28]
  2984.          7C00:0B6B E88EF5        CALL 00FC
  2985.          7C00:0B6E 8B86F2FE      MOV AX,[BP+FEF2]
  2986.          7C00:0B72 5E            POP SI
  2987.          7C00:0B73 5F            POP DI
  2988.  
  2989.          ; Here is the exit code I was talking about
  2990.  
  2991.          7C00:0B74 8BE5          MOV SP,BP
  2992.          7C00:0B76 5D            POP BP
  2993.          7C00:0B77 CB            RETF
  2994.          7C00:0B78 B85A06        MOV AX,065A
  2995.          7C00:0B7B CB            RETF
  2996.          7C00:0B7C B89006        MOV AX,0690
  2997.          7C00:0B7F CB            RETF
  2998.  
  2999.  
  3000.               Ok, after looking through all of that, can  you  tell me
  3001.          where to put  the  patch.   Simple.   How  about right at the
  3002.          begining of the doc check right  after the music routines (ie
  3003.          address 7C00:04B6).  Hey yeah ... good idea.   But  how do we
  3004.          want to patch  it.   Well,  since  this  is  a  higher  level
  3005.          language, we just can't use RETF.  We must reset the stack.
  3006.               Since I hate large patches,  a  simply  decided  on  the
  3007.          follow patch
  3008.  
  3009.          7C00:04B6 E9BB06        JMP B74
  3010.  
  3011.               Ok, by jumping to 0B74, we still get the  music  but the
  3012.          actual doc check  is  not  executed.   But  there  is still a
  3013.          problem.  Remember how I said  that  AX  was tested after the
  3014.          doc check.  Well,  we  still  have  to fake the  check.   The
  3015.          easiest way, is to simply NOP the condition jmp.  Here is the
  3016.          section of code again
  3017.  
  3018.  
  3019.          45E2:0235 9A46010F4A    CALL 7C00:146   ; Call to Doc Check
  3020.          45E2:023A 83C404        ADD  SP,+04
  3021.          45E2:023D 0BC0          OR   AX,AX
  3022.          45E2:023F 7465          JZ   02A6
  3023.  
  3024.               If you  remember, when you enter the right code, AX will
  3025.          be set to 0001 when we exit to  45E2:023A.  If we OR 0001 and
  3026.          0001 we get 0001.  Here is the binary ...
  3027.  
  3028.  
  3029.                               0000 0000 0000 0001  ( remember OR means
  3030.                                                      if  either is bit
  3031.                           or  0000 0000 0000 0001    is 1 )
  3032.                               ───────────────────
  3033.                               0000 0000 0000 0001
  3034.  
  3035.               Clearly we  don't want to branch at the JZ at 45E2:023F.
  3036.          So, to finish the patch we simply NOP that jmp.
  3037.  
  3038.               Oh boy.. that was hard.   So  let's  test  it  out.  But
  3039.          first, a little  forsight.  We will need a unique  string  of
  3040.          bytes to search  for when making the patch.  I say we use the
  3041.          code from 7C00:04C4  to  7C00:04CE   and  from  45E2:0235  to
  3042.          45E2:023F.  Yea, write  down  the  hex  equivelent  and  then
  3043.          restart.  Again break  in right after the switch to graphics.
  3044.          Now add the  patch  (ie  A  7C00:04B6  <ENTER>,  etc.).   Now
  3045.          execute the program.
  3046.  
  3047.               SHIT!  It  worked,  we  are  fucking amazing.   Ok,  now
  3048.          adding the patch  permenatly.   Using  PCTOOLS  (or whatever)
  3049.          search the file STARCON.EXE for the bytes mention above
  3050.          (ie: C746F60B00C746F87900C746FA2801)      But    wait,    now
  3051.          matches...Hmmm strange.  It was there just a minute ago...but
  3052.          wait there... another file STARCON.OVL (as we  all  know .OVL
  3053.          mean OVERLAY).  Let's try searching this one.
  3054.  
  3055.               There we  go,  that's better (it should should up on the
  3056.          13 sector read in).  Now to add  the  patch.  Simply find the
  3057.          search bytes and  the go backwards until the first  occurance
  3058.          of the hex byte 9A.  Add the patch here.  Save it.
  3059.  
  3060.               Next, add  the patch to 45E2:023F.  Search for the bytes
  3061.          83C4040BC07465.  The should appear  on sector 3 (give or take
  3062.          a few sectors).  Now simply change the 2 bytes 74 65 to 90 90
  3063.          and save the sector.  Now, you are good to go.
  3064.  
  3065.               Well shit, this has been some hell of a textfile.   1113
  3066.          lines in all.   But  what  detail.   Ok  I  hope  you learned
  3067.          something from all of this.  And  this  end the first part of
  3068.          CRACKING 101 - the 1990 edition.  From here out all lessons (
  3069.          lesson 5 and up) will be released on their own.
  3070.  
  3071.               I would like the thank Phantom Phlegm for  pushing me to
  3072.          finish this shit.
  3073.  
  3074.               Till lesson 5 this is Buckaroo Banzai, signing off.
  3075.  
  3076.  
  3077.          OH... I can  be  reached for personal help via E-MAIL on LORD
  3078.          WOLFEN's CASTLE or TOS...
  3079.  
  3080.  
  3081. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  3082.  Another file downloaded from:                     The NIRVANAnet(tm) Seven
  3083.  
  3084.  & the Temple of the Screaming Electron   Taipan Enigma        510/935-5845
  3085.  Burn This Flag                           Zardoz               408/363-9766
  3086.  realitycheck                             Poindexter Fortran   510/527-1662
  3087.  Lies Unlimited                           Mick Freen           801/278-2699
  3088.  The New Dork Sublime                     Biffnix              415/864-DORK
  3089.  The Shrine                               Rif Raf              206/794-6674
  3090.  Planet Mirth                             Simon Jester         510/786-6560
  3091.  
  3092.                           "Raw Data for Raw Nerves"
  3093. X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
  3094.