home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Mendoza / cm_tut1.txt < prev    next >
Text File  |  2000-05-25  |  6KB  |  138 lines

  1.     Cardenal Mendoza'z tutor #1:
  2.  
  3. HOW TO CRACK MICRO$OFT COMBAT $IMULATOR 98
  4.       (a very easy cd check)
  5. -------------------------------------------
  6.  
  7. Hi there this is my first tutorial, so don't expect too
  8. much. I hope you'll enjoy it anyway ;-)
  9. Please excuse my bad english, it's not my mother language...
  10.  
  11. Part 1: The beginning...
  12. ------------------------
  13.  
  14. In this tutorial I expect that you know how to use W32dasm
  15. and how to modify the exe with your hex editor.
  16. Install the game and choose full install. Then Try to start
  17. it without the cd. It won't work. A Dialog pop's up and asks 
  18. you to put in the cd. No problem - start W32dasm and disassemble
  19. COMBATFS.EXE. Ok, now you should see the deadlisting of the code.
  20.  
  21. Part 2: The cd-check...
  22. -----------------------
  23.  
  24. Click on String Data References and search for your error message.
  25. Have you found it? Ok? Just click on it. You should now see the 
  26. following part of the code:
  27.  
  28. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  29. |:00401D4E(C)
  30. |
  31. :00401D9E 8B15E8C84100            mov edx, dword ptr [0041C8E8]
  32.  
  33. * Reference To: USER32.LoadStringA, Ord:0183h
  34.                                   |
  35. :00401DA4 8B35E81A4200            mov esi, dword ptr [00421AE8]
  36. :00401DAA 6804010000              push 00000104
  37. :00401DAF 68C0084200              push 004208C0
  38.  
  39. * Possible Reference to String Resource ID=01500: "Bitte legen Sie die Microsoft« Combat Flight Simulator-CD ei"
  40.                                   |
  41. :00401DB4 68DC050000              push 000005DC
  42. :00401DB9 52                      push edx
  43. :00401DBA FFD6                    call esi
  44. :00401DBC 8B0DE8C84100            mov ecx, dword ptr [0041C8E8]
  45. :00401DC2 8D8424A4000000          lea eax, dword ptr [esp+000000A4]
  46. :00401DC9 6804010000              push 00000104
  47. :00401DCE 50                      push eax
  48.  
  49. Now doubleclick a second time on the string. It scrolls to a second
  50. location. Have a look at it. Hmm, this seems to be curios. Nothing
  51. interesting but the reference and a jmp. Look at the jump. Here is nothing
  52. interesting, too. That's why they call it possible reference. Not every
  53. time it is a reference. In this case it is not our string. But how to know that?
  54. Look back at the first location. Do you see the recerence to USER32.LoadStringA ??
  55. I think I don't have to explain what this is. Most of the times real references are
  56. followed by a messageboxa, a showwindow or just any function which does something
  57. with our string, like lstrcpy or loadstringa. So let's go further. 
  58. Click on our string to see if there is a "real" second location - no, we're
  59. back at our first place. Ok, now we should observe the whole function. First
  60. it does something in our registry. Do you see the string "InstalledFrom"?
  61. This should be our cd drive. Then there are the two strings of the error
  62. message ( the text and the caption of the dialog ). Then there follows a bunch of
  63. assembler code. Just ignore it for the moment. At the end there is a call to
  64. USER32.MessageBoxIndirectA. This is a unusual function and I see it here for the
  65. first time, but maybe I simply don't crack long enough :-(
  66. After the call there are two cmp's with a je after each. Now think what this could
  67. be... yes, it is the code which checks which button was pressed. The first cmp check's the
  68. cancel button. If you would change the je to jmp, it would close the game if no
  69. cd is inserted. The second jumps back, to see if the cd is now in the drive.
  70. After this two jumps you should see this: 
  71.  
  72. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  73. |:00401E23(C), :00401E2D(C), :00401E48(C)
  74. |
  75. :00401E62 8B0DE8C84100            mov ecx, dword ptr [0041C8E8]
  76. :00401E68 51                      push ecx
  77. :00401E69 E8F2F2FFFF              call 00401160
  78. :00401E6E 85C0                    test eax, eax
  79. :00401E70 750B                    jne 00401E7D
  80. :00401E72 5F                      pop edi
  81. :00401E73 5E                      pop esi
  82. :00401E74 5D                      pop ebp
  83. :00401E75 5B                      pop ebx
  84. :00401E76 81C498010000            add esp, 00000198
  85. :00401E7C C3                      ret
  86.  
  87. This seems to be the exit of the function for good guys, who have their cd
  88. in their drive. But we're bad, are we ;-) ...
  89.  
  90. Part 3: The crack...
  91. --------------------
  92.  
  93. OK, if you look at the code above, the easiest thing would be to nop out
  94. the last two je, then the game would simply run to the good guy exit. But wait.
  95. First you should thing. You nop out the *check* of the buttons, therefore the
  96. errorwindow would popup, each time you would start the game. Of course it would
  97. run after you pressed something, but isn't there a better way. You could try to nop 
  98. out the call to the USER32.MessageBoxIndirectA, too, but if there is one bad thing
  99. you could do, it is nopping out calls to a dll. You could try it, but then it will...
  100. Just try it, you will see.
  101. So look at the last part of the code. There are three different jumps to it. So the 
  102. easiest working thing is, going to the first jump and change it to jump everytime.
  103.  
  104. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  105. |:00401E60(C)
  106. |
  107. :00401E13 8A0DC0FF4100            mov cl, byte ptr [0041FFC0]
  108. :00401E19 51                      push ecx
  109. :00401E1A E801FDFFFF              call 00401B20
  110. :00401E1F 8BF0                    mov esi, eax
  111. :00401E21 3BF5                    cmp esi, ebp
  112. :00401E23 753D                    jne 00401E62  <---- here it is...
  113. :00401E25 B341                    mov bl, 41
  114. :00401E27 885C241C                mov byte ptr [esp+1C], bl
  115.  
  116. Just change the 0x75 at the offset 0x00401E23 into a 0xEB. This will change it
  117. to jmp 00401E62. Try it...
  118. *KEWL* - It works. Isn't that a lame cd check?! I have expected something better
  119. from Micro$oft.
  120.  
  121. Part 4: The finish...
  122. ---------------------
  123.  
  124. I hope you had enjoyed this tutorial. Remember, it was my first - nothing is
  125. perfect at once :-)
  126.  
  127. If you have suggestions for a second tutor, send me a mail to: Cardenal@gmx.net
  128. I hope to see you in tutor #2...
  129.  
  130. OH, yes. Cracking a program you don't own yourself is illegal, so don't do this :-(
  131.  
  132.  
  133. Greetinx to:
  134. warp_9 & darkman & antos & homer
  135.  
  136.  
  137. Cardenal Mendoza
  138. 11/12/1998