Advertisement
Guest User

Untitled

a guest
Nov 4th, 2017
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. #include "DLLMain.h"
  2. #include "Utilities.h"
  3.  
  4. #include "INJ/ReflectiveLoader.h"
  5.  
  6. #include "Offsets.h"
  7. #include "Interfaces.h"
  8. #include "Hooks.h"
  9. #include "RenderManager.h"
  10. #include "Hacks.h"
  11. #include "Menu.h"
  12. #include "AntiAntiAim.h"
  13. #include "hitmarker.h"
  14. #include "AntiLeak.h"
  15.  
  16. #include "Dumping.h"
  17.  
  18. #define ExampleHWID **********
  19.  
  20.  
  21. extern HINSTANCE hAppInstance;
  22.  
  23. UCHAR szFileSys[255], szVolNameBuff[255];
  24. DWORD dwMFL, dwSysFlags;
  25. DWORD dwSerial;
  26. LPCTSTR szHD = "C:\\";
  27.  
  28. HINSTANCE HThisModule;
  29. bool DoUnload;
  30.  
  31. void CAntiLeak::ErasePE()
  32. {
  33. char *pBaseAddr = (char*)GetModuleHandle(NULL);
  34. DWORD dwOldProtect = 0;
  35. VirtualProtect(pBaseAddr, 4096, PAGE_READWRITE, &dwOldProtect);
  36. ZeroMemory(pBaseAddr, 4096);
  37. VirtualProtect(pBaseAddr, 4096, dwOldProtect, &dwOldProtect);
  38. }
  39.  
  40. int InitialThread()
  41. {
  42. #ifdef Avoz_DEBUG
  43. Utilities::OpenConsole("Meaow");
  44. #endif
  45. PrintMetaHeader();
  46.  
  47. Offsets::Initialise();
  48. Interfaces::Initialise();
  49. NetVar.RetrieveClasses();
  50. NetvarManager::Instance()->CreateDatabase();
  51. Render::Initialise();
  52. hitmarker::singleton()->initialize();
  53. Hacks::SetupHacks();
  54. Menu::SetupMenu();
  55. Hooks::Initialise();
  56. ApplyAAAHooks();
  57.  
  58. //Dump::DumpClassIds();
  59.  
  60.  
  61. Utilities::Log("Ready");
  62.  
  63. while (DoUnload == false)
  64. {
  65. Sleep(1000);
  66. }
  67.  
  68. Hooks::UndoHooks();
  69. Sleep(2000);
  70. FreeLibraryAndExitThread(HThisModule, 0);
  71.  
  72. return 0;
  73. }
  74.  
  75. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
  76. {
  77. if (dwReason == DLL_PROCESS_ATTACH)
  78. {
  79. GetVolumeInformation(szHD, (LPTSTR)szVolNameBuff, 255, &dwSerial, &dwMFL, &dwSysFlags, (LPTSTR)szFileSys, 255);
  80.  
  81. if (dwSerial == ExampleHWID)
  82. {
  83. Sleep(100);
  84. }
  85. else
  86. {
  87. // when HWID rejected
  88. MessageBox(NULL, "Something isnt matching!", "x16", MB_OK);
  89. exit(0);
  90. return TRUE;
  91. }
  92.  
  93. {
  94. {
  95. DisableThreadLibraryCalls(hModule);
  96.  
  97. CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InitialThread, NULL, NULL, NULL);
  98.  
  99. return TRUE;
  100. }
  101. }
  102. return FALSE;
  103. }
  104. else if (dwReason == DLL_PROCESS_DETACH)
  105. {
  106. }
  107. return TRUE;
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement