diff options
Diffstat (limited to 'csgo-loader/csgo-client/Client.cpp')
| -rw-r--r-- | csgo-loader/csgo-client/Client.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/csgo-loader/csgo-client/Client.cpp b/csgo-loader/csgo-client/Client.cpp index d7b266f..5d80e97 100644 --- a/csgo-loader/csgo-client/Client.cpp +++ b/csgo-loader/csgo-client/Client.cpp @@ -25,10 +25,7 @@ people dump skeet regardless of kernel address mapping meme so what does it matter
*/
-
-#pragma optimize("", off)
-
-int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow)
+int __stdcall WinMain(HINSTANCE, HINSTANCE, char *, int)
{
WRAP_IF_DEBUG(
Utils::OpenConsole();
@@ -41,7 +38,7 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) {
// Create a window, initialise DirectX context.
if(!UserInterface->Start())
- ERROR_ASSERT(STR("[000F:00001C00] Failed to initialize. Please contact an administrator."));
+ ERROR_ASSERT(STR("[000F:00001A00] Failed to initialize. Please contact an administrator."));
UserInterface->RunUiFrame();
}); WindowThread.detach();
@@ -56,7 +53,7 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) // Initialize the runtime protection system.
if(!Protection->Start())
- ERROR_ASSERT(STR("[000F:00001A00] Failed to initialize. Please contact an administrator."));
+ ERROR_ASSERT(STR("[000F:00001C00] Failed to initialize. Please contact an administrator."));
// Wait for connection.
UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_WAITING;
@@ -93,7 +90,7 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) ByteArray LoginResponse = Client->ReceiveBytes();
if(!LoginTransaction.TranslateResponse(LoginResponse))
- ExitProcess(0);
+ return 1;
// Echo back to server.
Client->SendBytes(LoginResponse);
@@ -107,17 +104,19 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) RemoteCode::RemoteProcess Process;
if(!Process.Start(STR("explorer.exe")))
- ExitProcess(0);
+ return 1;
RemoteCode::RemoteMapper Mapper;
- if(!Mapper.Start(Process))
- ExitProcess(0);
+ if(!Mapper.Start(Process, LdrModule))
+ return 1;
- if(!Mapper.WriteCodeToMap(LdrModule))
- ExitProcess(0);
+ if(!Mapper.WriteCodeToMap())
+ return 1;
Mapper.ExecuteCodeFromMap();
-}
-#pragma optimize("", on)
\ No newline at end of file + system("pause");
+
+ return 0;
+}
\ No newline at end of file |
