MCPcopy Create free account
hub / github.com/Compiled-Code/eac-mapper / vdm_ctx

Method vdm_ctx

dependencies/vdm/vdm_ctx/vdm_ctx.cpp:5–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3namespace vdm
4{
5 vdm_ctx::vdm_ctx()
6 {
7 // already found the syscall's physical page...
8 if (vdm::syscall_address.load())
9 return;
10
11 vdm::ntoskrnl = reinterpret_cast<std::uint8_t*>(
12 LoadLibraryExA("ntoskrnl.exe", NULL,
13 DONT_RESOLVE_DLL_REFERENCES));
14
15 nt_rva = reinterpret_cast<std::uint32_t>(
16 util::get_kmodule_export(
17 "ntoskrnl.exe",
18 syscall_hook.first,
19 true
20 ));
21
22 vdm::nt_page_offset = nt_rva % PAGE_4KB;
23 // for each physical memory range, make a thread to search it
24 std::vector<std::thread> search_threads;
25 for (auto ranges : util::pmem_ranges)
26 search_threads.emplace_back(std::thread(
27 &vdm_ctx::locate_syscall,
28 this,
29 ranges.first,
30 ranges.second
31 ));
32
33 for (std::thread& search_thread : search_threads)
34 search_thread.join();
35 }
36
37 void vdm_ctx::set_read(read_phys_t& read_func)
38 {

Callers

nothing calls this directly

Calls 1

get_kmodule_exportFunction · 0.85

Tested by

no test coverage detected