summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp
blob: 96e22bc81d5f9499a162f558861876b67eb09829 (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
#include <Security/RuntimeSecurity.hpp>
#include <UserExperience/UserInterface.hpp>

// Global accessor to security instance.
Security::RuntimeSecurityPtr Protection = std::make_unique<Security::RuntimeSecurity>();

namespace Security
{
	/*
		decltype(&MessageBoxA) oMessageBox;
		int __stdcall Hooked_MessageBox(HWND Window, char *Message, char *Caption, uint32_t Type)
		{
			// TODO: Replace this with a Syscall so we cannot get hooked.
			MEMORY_BASIC_INFORMATION Query;
			if(!VirtualQuery(_ReturnAddress(), &Query, sizeof MEMORY_BASIC_INFORMATION))
				ExitProcess(0);

			HMODULE ReturnModule = (HMODULE)Query.AllocationBase;

			if (ReturnModule != GetModuleHandleA(0))
				ExitProcess(0);

			return oMessageBox(Window, Message, Caption, Type);
		}
	*/

	bool RuntimeSecurity::Start()
	{
		return true;
	}
}