This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dllmain.cpp
82 lines (64 loc) · 1.87 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
#include <Windows.h>
#include <stdio.h>
#include <TlHelp32.h>
#include <conio.h>
#include "imgui/imgui.h"
#include <stdio.h>
#include "my headers/helper.h"
#include "my headers/setOffets.h"
#include "my headers/internaloverlay.h"
#include "my headers/aimbot.h"
#include "libraries/include/internalhook/detours.h"
#include "my headers/helper2.h"
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#include <conio.h>
#include <fstream>
#include <iostream>
#include <chrono>
#include <string>
DWORD WINAPI MainActivity(HMODULE hModule) {
AllocConsole();
FILE* f;
freopen_s(&f, "CONOUT$", "w", stdout);
system("color b");
bool stablished = false;
stablished = stablishOffsets();
if (stablished) {
FreeConsole();
fclose(f);
hookEndScene();
while (1) {
csgo::cheatTickloophacks();
if (GetAsyncKeyState(0x39)) {
DetourRemove((PBYTE)pEndScene, (PBYTE)hookedEndScene);
break;
}
}
}
if (!stablished){
printf("Unable to update offsets, wait for an update\n");
system("pause");
FreeConsole();
fclose(f);
}
FreeLibraryAndExitThread(hModule, 0);
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)MainActivity, hModule, 0, nullptr);
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}