Is anyone interested in making an app to allow you to run multiple instances of Halo? Would it be useful to you?
Some gamers, like me, find it useful to be able to run multiple instances of a game. Extremely so when you don't have a partner to help you reverse! Pretty much all games add this check to make sure you don't open an instance of it more than once. I'm sure there is more than one method of these checks, but so far I have seen the same exact method in a few games. It's very simple and easy to bypass. I'm not gonna go into details really, except show you what they are doing and what extra steps to take. After all, it is a few simple NOP's and changing a profile path.
Before the game window is created, it creates a named mutex with CreateMutex() for all the processes running on your system. If the function fails, that means that there is already a process running that created a mutex with that name and returns a handle to the existing object.
If the function succeeded, the FindWindow() function is called with the class and game title. If the function fails, it means there is another process instance with those names.
The check for Halo looks like this in C++:
Code:
HANDLE hWnd = CreateMutex( NULL, true, "Halo" );
if( GetLastError( ) != ERROR_SUCCESS )
{
CWnd *pWnd = CWnd::FindWindow( "Halo", "Halo" );
if( !pWnd )
{
CloseHandle( hWnd );
}
else
{
WINDOWPLACEMENT *pPlacement;
GetWindowPlacement( hWnd, &pPlacement );
SetForegroundWindow( hWnd );
// #define SW_SHOWMINIMIZED 2
if( pPlacement->showCmd != SW_SHOWMINIMIZED )
{
ShowWindow( hWnd, SW_RESTORE );
}
}
}
Here's what it looks like in OllyDbg:

See how easy that check is? Well, you should know what to do from there Mr. Coder.
But WAIT. I thought I was done there, but nope. Whenever you start Halo, it auto loads the last profile used and then puts your saved games folder in use. To fix it, search for the string in OllyDbg of the path your saved games folder is set to and change it to something else like Gaylo.
Oh yea, if you want to play multiplayer, you will have to run the games on separate ports, usually done through command line parameters. For changing the client port, you would need to use ‘-cport 1234′. Of course, ‘1234′ could be any port number.
Thats all there is to it, thanks for reading. Hope it helps some of you.
Bookmarks