#pragma once #include #include #include #include #include #include #include #include const ULONG IOCTL_AMDPDFW_MEMCPY = CTL_CODE(0x8000, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS); typedef struct _PDFW_MEMCPY { BYTE Reserved[16]; PVOID Destination; PVOID Source; PVOID Reserved2; DWORD Size; DWORD Reserved3; } PDFW_MEMCPY, * PPDFW_MEMCPY; inline class _pdfwkrnl { private: HANDLE hDevice; public: _pdfwkrnl(); ~_pdfwkrnl(); bool attach(); void detach(); uint64_t get_ntoskrnl_base(); uint64_t get_ntoskrnl_export(const char* function); bool read_virtual_memory(UINT64 address, void* buffer, ULONG size); bool write_virtual_memory(UINT64 address, void* buffer, ULONG size); template T read_virtual_memory(UINT64 address) { T buffer{}; read_virtual_memory(address, &buffer, sizeof(T)); return buffer; } }pdfwkrnl;