summaryrefslogtreecommitdiff
path: root/tf2/Source.cpp
blob: 3bd44afadfaa11e41e3200bcbd5bdc04fd376f02 (plain)
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
#pragma warning (disable:4018)

#include <Windows.h>
#include <iostream>

#include "console.hpp"
#include "interfaces.h"
#include "search.h"
#include "hooks.h"
#include <thread>
#include "base_cheat.h"

HMODULE g_dll;

void main_thread( HMODULE module ) {

	cl.initialize( );

	

	while ( !( GetAsyncKeyState( VK_END ) & 0x8000 ) ) {
		std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
	}

}

bool __stdcall DllMain(
	_In_ HINSTANCE hinstDLL,
	_In_ DWORD     fdwReason,
	_In_ LPVOID    lpvReserved ) {
	if ( fdwReason == DLL_PROCESS_ATTACH /*&& ( uintptr_t )( lpvReserved ) == 20*/ ) { //nigga suck who dick?
		DisableThreadLibraryCalls( hinstDLL );
		g_dll = hinstDLL;
		// coca cola coca cola yayo bought me everything

		//no i did not dummy

		CreateThread( nullptr, 0, reinterpret_cast< LPTHREAD_START_ROUTINE >( main_thread ), hinstDLL, 0, nullptr );
	}

	return true;
}