diff options
Diffstat (limited to 'client/src/util/util.h')
| -rw-r--r-- | client/src/util/util.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/client/src/util/util.h b/client/src/util/util.h new file mode 100644 index 0000000..b4bf699 --- /dev/null +++ b/client/src/util/util.h @@ -0,0 +1,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 + |