Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Howto] Keep "Game.exe" in the process list
#1
This how-to will show what is required to keep "game.exe" in the process list so you can use TSearch, WPE Pro, etc... on the process while running to help with reverse engineering.

For this tutorial I will use run Diablo 2 through OllyDbg so no file modifications are needed. If you like using a loader or some other means of modifying the client, you can apply the same concepts to make it dynamically permanent.

Step 1: Open game.exe in OllyDbg.
Step 2: Hit "ctrl + g" to bring up the "Enter expression to follow" dialog box.
Step 3: Paste in the address: "0x407D1D" (D2 V1.12) and hit ok. You will land on the line:

Code:
00407D1D   |. /74 22                JE SHORT Game.00407D41                              
;  This is where we need to stop execution at, we will jump to 0x407D39 to keep Game.exe in process list
Step 4: Set a breakpoint on this line by pressing F2. This line is where we need to stop execution at so we can jump to 0x407D39 to keep Game.exe in process list.

Step 5: Hit F9 to run Game.exe. When the break point hits go to the next step.

Step 6: Hit "ctrl + g" again and paste in the address: "0x407D39" (D2 V1.12) and hit Ok.

Step 7: Press "Ctrl + NumPad *" on the lie. The EIP will changes to this address and you will see a black line in the address column. Alternatively, right click on the line and choose "New origin here".

Step 8: Press F9 to resume execution of Game.exe. The game will run. If you load up WPE Pro or TSearch, you will see Game.exe in the process list. We have bypassed the API function that hides it.

The line:

Code:
00407D33   |.  FFD7                 CALL NEAR EDI                                       ;  This API function hides our game.exe process
Is the culprit for hiding the process. If you simply modify the line at 0x407D1D:
Code:
0x407D1D   |. /74 22                JE SHORT Game.0x407D41
to

Code:
[B]JMP 0x407D39[/B] -> 0x407D1D      /EB 1A                JMP SHORT Game.0x407D39
then you can implement this functionality into your own loaders and programs.

Hope it helps!
[Image: haha]
Reply
#2
I assume you cant just simply NOP that line for the API function?
Reply
#3
mase123y Wrote:I assume you cant just simply NOP that line for the API function?

If you wanted to NOP code, you would have to nop the following:

Code:
00407D1F                                           |.  8B4424 28            MOV EAX, DWORD PTR SS:[ESP+28]                      ;  we will jump to 0x407D39 to keep Game.exe in process list
00407D23                                           |.  53                   PUSH EBX
00407D24                                           |.  8D5424 30            LEA EDX, DWORD PTR SS:[ESP+30]
00407D28                                           |.  52                   PUSH EDX
00407D29                                           |.  53                   PUSH EBX
00407D2A                                           |.  53                   PUSH EBX
00407D2B                                           |.  68 04000080          PUSH 80000004
00407D30                                           |.  6A 06                PUSH 6
00407D32                                           |.  50                   PUSH EAX
00407D33                                           |.  FFD7                 CALL NEAR EDI                                       ;  This API function hides our game.exe process
00407D35                                           |.  85C0                 TEST EAX, EAX
00407D37                                           |.  75 08                JNZ SHORT Game.00407D41
That is why changing the two bytes in the JE to a JMP to 0x407D39 is much better - you can easily restore those two bytes later on if needed to preserve the memory CRC of that region.

Tutorials like this I usually have more visuals, but I can't post links yet so that's why everything is in text.

The reason you cannot simply NOP the API call is because of the 7 pushes. The stack would have to then be modified to get it back to the "expected" size. It is much more convenient to just fix the JE line instead.

The actual API function that is being called is: SetSecurityInfo from ADVAPI32. You could have a system detour set to make that function simply return TRUE to signal success and not actually do anything as well.

Hope that makes sense!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  D2 MultiRes crashes when loading game KLan 15 1,131 09-06-2012, 09:06 AM
Last Post: Virgil Popa
  Can the bot create game without "-xx" ? Adamz 2 171 07-06-2012, 09:38 PM
Last Post: Adamz
  is there a way to pause the bot in game? htid 10 338 07-04-2012, 04:14 AM
Last Post: comper
  D2nt - how do i stay in game when sojs sell? brianwalter86 5 349 07-01-2012, 02:02 PM
Last Post: comper
  boting 2 chars in the same game momme 0 170 06-20-2012, 05:44 AM
Last Post: momme
  Normal/socketed item pickit list Jammer74 39 8,013 05-13-2012, 03:43 AM
Last Post: comper
  Need Help Setting Up a Leader And Leech For Private Game runs [Etal v7] Kurts 4 365 04-01-2012, 06:39 PM
Last Post: Kurts
  Wondering If i can run multiple d2nt bots in the same game bmxrider1279 2 391 03-29-2012, 10:55 AM
Last Post: bmxrider1279
  D2 /filtermsg LIST! bugme143 4 1,144 03-29-2012, 07:25 AM
Last Post: comper
  Litel help with pick list The Virus 5 252 03-05-2012, 06:27 AM
Last Post: comper

Forum Jump:


Users browsing this thread: 1 Guest(s)