aboutsummaryrefslogtreecommitdiff
path: root/client/src/util/util.h
blob: b4bf69933a97504779561242d242cf14529d3ec8 (plain) (blame)
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
#pragma once

#include "native.h"
#include "pe.h"

namespace util {

extern std::unordered_map<std::string, pe::image> loaded_modules;

std::string wide_to_multibyte(const std::wstring &str);

native::_PEB *get_peb();

bool init();

static pe::image& ntdll() {
	static pe::image nt{};
	if (!nt) {
		nt = loaded_modules["ntdll.dll"];
		nt.parse_exports();
	}
	return nt;
}

};  // namespace util