-
Notifications
You must be signed in to change notification settings - Fork 0
/
DLLMain.cpp
142 lines (119 loc) · 2.79 KB
/
DLLMain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*cheat pMeme hahaha*/
#define _CRT_SECURE_NO_WARNINGS
#include "DLLMain.h"
#include "Utilities.h"
#include "INJ/ReflectiveLoader.h"
#include "Offsets.h"
#include "Interfaces.h"
#include "Hooks.h"
#include "RenderManager.h"
#include "Hacks.h"
#include "Menu.h"
#include "AntiAntiAim.h"
#include "hitmarker.h"
#include "AntiLeak.h"
#include "CBulletListener.h"
#include "Dumping.h"
bool antiAimSide;
float lineLBY;
float fakeangle;
int missedLogHits[65];
float autowalldmgtest[65];
float lineRealAngle;
int hittedLogHits[65];
int shotsfired[65];
float lineFakeAngle;
template <int XORSTART, int BUFLEN, int XREFKILLER>
class Xor
{
private:
Xor();
public:
char s[BUFLEN];
Xor(const char* xs);
~Xor()
{
for (int i = 0; i < BUFLEN; i++) s[i] = 0;
}
};
template <int XORSTART, int BUFLEN, int XREFKILLER>
Xor<XORSTART, BUFLEN, XREFKILLER>::Xor(const char* xs)
{
int xvalue = XORSTART;
int i = 0;
for (; i < (BUFLEN - 1); i++)
{
s[i] = xs[i - XREFKILLER] ^ xvalue;
xvalue += 1;
xvalue %= 256;
}
s[BUFLEN - 1] = (2 * 2 - 3) - 1;
}
extern HINSTANCE hAppInstance;
UCHAR szFileSys[255], szVolNameBuff[255];
DWORD dwMFL, dwSysFlags;
DWORD dwSerial;
LPCTSTR szHD = "C:\\";
bool ErasePEHeader(HMODULE hModule)
{
hModule = GetModuleHandle(NULL);
if ((DWORD)hModule == 0) return 0;
DWORD IMAGE_NT_HEADER = *(int*)((DWORD)hModule + 60);
for (int i = 0; i<0x108; i++)
*(BYTE*)(IMAGE_NT_HEADER + i) = 0;
for (int i = 0; i<120; i++)
*(BYTE*)((DWORD)hModule + i) = 0;
return 1;
}
HINSTANCE HThisModule;
bool DoUnload;
void CAntiLeak::ErasePE()
{
char *pBaseAddr = (char*)GetModuleHandle(NULL);
DWORD dwOldProtect = 0;
VirtualProtect(pBaseAddr, 4096, PAGE_READWRITE, &dwOldProtect);
ZeroMemory(pBaseAddr, 4096);
VirtualProtect(pBaseAddr, 4096, dwOldProtect, &dwOldProtect);
}
int InitialThread()
{
//Utilities::OpenConsole("fuckware hitting p");
PrintMetaHeader();
Offsets::Initialise();
Interfaces::Initialise();
NetVar.RetrieveClasses();
NetvarManager::Instance()->CreateDatabase();
Render::Initialise();
hitmarker::singleton()->initialize();
Hacks::SetupHacks();
g_menu::SetupMenu();
Hooks::Initialise();
SkinChanger();
CBulletListener::singleton()->init();
while (DoUnload == false)
{
Sleep(1000);
}
Hooks::UndoHooks();
Sleep(2000);
FreeLibraryAndExitThread(HThisModule, 0);
return 0;
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
{
{
DisableThreadLibraryCalls(hModule);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InitialThread, NULL, NULL, NULL);
return TRUE;
}
}
return FALSE;
}
else if (dwReason == DLL_PROCESS_DETACH)
{
}
return TRUE;
}