summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/RemoteCode/RemoteMapper.hpp
blob: 53bc049ba2f100c43b7c521950ce19fb287924b0 (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
#pragma once

#include <RemoteCode/RemoteProcess.hpp>

namespace RemoteCode
{
	struct RemoteImport
	{
		char m_Module[128];
		char m_Import[128];
	};

	class RemoteMapper
	{
		RemoteProcess	m_Process;

		ByteArray		m_Code;
		ByteArray		m_Mapped;

		void		   *m_Map;

	public:
		RemoteMapper() = default;

		// Copy process & shellcode to class.
		bool Start(RemoteProcess &Process, ByteArray &Code);

		// Writes code to process in allocated page.
		bool WriteCodeToMap();

		// Calls shellcode to call the library ;D
		bool ExecuteCodeFromMap();
	};
}