Advertisement
Guest User

Main.cpp

a guest
Jan 18th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. #include "Main.h"
  2. #include "../RL/ReflectiveLoader.h"
  3. #include <iostream>
  4. #include <windows.h>
  5.  
  6. //[enc_string_enable /]
  7. //[junk_enable /]
  8. DWORD WINAPI CheatEntry(LPVOID lpThreadParameter)
  9. {
  10. HMODULE hModule = (HMODULE)lpThreadParameter;
  11.  
  12. if (Engine::Initialize())
  13. {
  14. return 0;
  15. }
  16.  
  17. return 0;
  18. }
  19. bool threadLoop;
  20. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
  21. {
  22. if (fdwReason == DLL_PROCESS_ATTACH)
  23. {
  24. DisableThreadLibraryCalls(hinstDLL);
  25.  
  26. Client::BaseDir = CSX::Utils::GetHackWorkingDirectory().c_str();
  27.  
  28.  
  29. if (Client::BaseDir.size() < 1)
  30. {
  31. Client::BaseDir = CSX::Utils::GetModuleBaseDir(hinstDLL);
  32. }
  33.  
  34.  
  35. #if ENABLE_DEBUG_FILE == 1
  36. AllocConsole();
  37. AttachConsole(GetCurrentProcessId());
  38. freopen("CONIN$", "r", stdin);
  39. freopen("CONOUT$", "w", stdout);
  40. freopen("CONOUT$", "w", stderr);
  41.  
  42.  
  43.  
  44.  
  45.  
  46. Client::LogFile = Client::BaseDir + "\\debug.log";
  47. DeleteFileA(Client::LogFile.c_str());
  48. CSX::Log::LogFile = Client::LogFile;
  49. printf("Client::BaseDir = %s\nClient::LogFile = %s\n", Client::BaseDir.c_str(), Client::LogFile.c_str());
  50. CSX::Log::Add("::Init::");
  51.  
  52. #endif
  53.  
  54. CreateThread(0, 0, CheatEntry, hinstDLL, 0, 0);
  55.  
  56.  
  57.  
  58. }
  59. else if (fdwReason == DLL_PROCESS_DETACH)
  60. {
  61.  
  62. Engine::Shutdown();
  63.  
  64. }
  65.  
  66. Beep(330, 100); Sleep(100);
  67. cout << "Gracias por confiar en nosotros" << endl;
  68. cout << "rusted.cc injectado correctamente" << endl;
  69.  
  70. return TRUE;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement