Advertisement
undeckedn1ce

Untitled

Jan 18th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2.  
  3. #include "DLLMain.h"
  4. #include "Utilities.h"
  5. #include "INJ/ReflectiveLoader.h"
  6.  
  7. #include "Offsets.h"
  8. #include "Interfaces.h"
  9. #include "Hooks.h"
  10. #include "RenderManager.h"
  11. #include "Hacks.h"
  12. #include "Menu.h"
  13. #include "AntiAntiAim.h"
  14. #include "hitmarker.h"
  15. #include "AntiLeak.h"
  16.  
  17. #include "Dumping.h"
  18.  
  19. #define me 818675177
  20. #define laptop -220998132
  21. #define w1nderchild 883557211
  22. #define hero -1541222219
  23. #define vane -832987406
  24. #define kilian 778803006
  25. #define luc -958192128
  26. #define fynn -1776678680
  27. #define christian 1622013039
  28. #define pascaldash 1618493125
  29. #define undecked45 441023338
  30. #define *te neved* HWID számod
  31.  
  32. template <int XORSTART, int BUFLEN, int XREFKILLER>
  33.  
  34. class Xor
  35. {
  36. private:
  37. Xor();
  38. public:
  39. char s[BUFLEN];
  40.  
  41. Xor(const char* xs);
  42. ~Xor()
  43. {
  44. for (int i = 0; i < BUFLEN; i++) s[i] = 0;
  45. }
  46. };
  47.  
  48. template <int XORSTART, int BUFLEN, int XREFKILLER>
  49.  
  50. Xor<XORSTART, BUFLEN, XREFKILLER>::Xor(const char* xs)
  51. {
  52. int xvalue = XORSTART;
  53. int i = 0;
  54. for (; i < (BUFLEN - 1); i++)
  55. {
  56. s[i] = xs[i - XREFKILLER] ^ xvalue;
  57. xvalue += 1;
  58. xvalue %= 256;
  59. }
  60. s[BUFLEN - 1] = (2 * 2 - 3) - 1;
  61. }
  62.  
  63. extern HINSTANCE hAppInstance;
  64.  
  65. UCHAR szFileSys[255], szVolNameBuff[255];
  66. DWORD dwMFL, dwSysFlags;
  67. DWORD dwSerial;
  68. LPCTSTR szHD = "C:\\";
  69.  
  70. bool ErasePEHeader(HMODULE hModule)
  71. {
  72. hModule = GetModuleHandle(NULL);
  73. if ((DWORD)hModule == 0) return 0;
  74. DWORD IMAGE_NT_HEADER = *(int*)((DWORD)hModule + 60);
  75. for (int i = 0; i<0x108; i++)
  76. *(BYTE*)(IMAGE_NT_HEADER + i) = 0;
  77. for (int i = 0; i<120; i++)
  78. *(BYTE*)((DWORD)hModule + i) = 0;
  79. return 1;
  80. }
  81.  
  82. HINSTANCE HThisModule;
  83. bool DoUnload;
  84.  
  85. void CAntiLeak::ErasePE()
  86. {
  87. char *pBaseAddr = (char*)GetModuleHandle(NULL);
  88. DWORD dwOldProtect = 0;
  89. VirtualProtect(pBaseAddr, 4096, PAGE_READWRITE, &dwOldProtect);
  90. ZeroMemory(pBaseAddr, 4096);
  91. VirtualProtect(pBaseAddr, 4096, dwOldProtect, &dwOldProtect);
  92. }
  93.  
  94. int InitialThread()
  95. {
  96. //Utilities::OpenConsole("Avoz");
  97.  
  98. PrintMetaHeader();
  99.  
  100. Offsets::Initialise();
  101. Interfaces::Initialise();
  102. NetVar.RetrieveClasses();
  103. NetvarManager::Instance()->CreateDatabase();
  104. Render::Initialise();
  105. hitmarker::singleton()->initialize();
  106. Hacks::SetupHacks();
  107. Menu::SetupMenu();
  108. Hooks::Initialise();
  109. //Dump::DumpClassIds();
  110.  
  111.  
  112. Utilities::Log("Ready");
  113.  
  114. while (DoUnload == false)
  115. {
  116. Sleep(1000);
  117. }
  118.  
  119. Hooks::UndoHooks();
  120. Sleep(2000);
  121. FreeLibraryAndExitThread(HThisModule, 0);
  122.  
  123. return 0;
  124. }
  125.  
  126. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
  127. {
  128. if (dwReason == DLL_PROCESS_ATTACH)
  129. {
  130. GetVolumeInformation(szHD, (LPTSTR)szVolNameBuff, 255, &dwSerial, &dwMFL, &dwSysFlags, (LPTSTR)szFileSys, 255);
  131.  
  132. if (dwSerial == me ||
  133. dwSerial == laptop ||
  134. dwSerial == w1nderchild ||
  135. dwSerial == hero ||
  136. dwSerial == vane ||
  137. dwSerial == kilian ||
  138. dwSerial == luc||
  139. dwSerial == fynn||
  140. dwSerial == pascaldash||
  141. dwSerial == christian ||
  142. dwSerial == undecked45)
  143. {
  144. Sleep(100);
  145. }
  146. else
  147. {
  148. // when HWID rejected
  149. MessageBox(NULL, "HWID doesn't match!", "Undeckedxd.XYZ", MB_OK);
  150. exit(0);
  151. return TRUE;
  152. }
  153.  
  154. {
  155. {
  156. DisableThreadLibraryCalls(hModule);
  157.  
  158. CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InitialThread, NULL, NULL, NULL);
  159.  
  160. return TRUE;
  161. }
  162. }
  163. return FALSE;
  164. }
  165. else if (dwReason == DLL_PROCESS_DETACH)
  166. {
  167. }
  168. return TRUE;
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement