19#pragma region API Definitions
25 SIZE_T NumberOfBytesToWrite,
26 PSIZE_T NumberOfBytesWritten
37 _In_ HANDLE SectionHandle,
38 _In_ HANDLE ProcessHandle,
39 _Inout_ _At_(*BaseAddress, _Readable_bytes_(*ViewSize) _Writable_bytes_(*ViewSize)
40 _Post_readable_byte_size_(*ViewSize)) PVOID* BaseAddress,
41 _Inout_opt_ PLARGE_INTEGER SectionOffset,
42 _Inout_ PSIZE_T ViewSize,
43 _In_ ULONG AllocationType,
44 _In_ ULONG PageProtection,
45 _Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters,
46 _In_ ULONG ExtendedParameterCount
58 _In_ HANDLE SectionHandle,
59 _In_ HANDLE ProcessHandle,
60 _Inout_ PVOID* BaseAddress,
61 _In_ ULONG_PTR ZeroBits,
62 _In_ SIZE_T CommitSize,
63 _Inout_opt_ PLARGE_INTEGER SectionOffset,
64 _Inout_ PSIZE_T ViewSize,
66 _In_ ULONG AllocationType,
67 _In_ ULONG Win32Protect
73 _In_ HANDLE ProcessHandle,
74 _In_opt_ PVOID BaseAddress
80 _In_ HANDLE ProcessHandle,
81 _In_opt_ PVOID BaseAddress,
87 _In_ HANDLE ProcessHandle,
88 _Inout_ PVOID* BaseAddress,
89 _Inout_ PSIZE_T RegionSize,
90 _In_ ULONG NewProtection,
91 _Out_ PULONG OldProtection
96 _In_ HANDLE ProcessHandle,
97 _Inout_ PVOID* BaseAddress,
98 _In_ ULONG_PTR ZeroBits,
99 _Inout_ PSIZE_T RegionSize,
100 _In_ ULONG AllocationType,
101 _In_ ULONG Protection
107 _In_ HANDLE ProcessHandle,
108 _Inout_ PVOID* BaseAddress,
109 _Inout_ PSIZE_T RegionSize,
110 _In_ ULONG AllocationType,
111 _In_ ULONG PageProtection,
112 _Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters,
113 _In_ ULONG ExtendedParameterCount
118 _In_ HANDLE ProcessHandle,
119 _In_opt_ PVOID BaseAddress,
120 _Out_writes_bytes_(NumberOfBytesToRead) PVOID Buffer,
121 _In_ SIZE_T NumberOfBytesToRead,
122 _Out_opt_ PSIZE_T NumberOfBytesRead
129 _Out_ PHANDLE ThreadHandle,
130 _In_ ACCESS_MASK DesiredAccess,
131 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
132 _In_ HANDLE ProcessHandle,
133 _In_ PVOID StartRoutine,
134 _In_opt_ PVOID Argument,
135 _In_ ULONG CreateFlags,
136 _In_ SIZE_T ZeroBits,
137 _In_ SIZE_T StackSize,
138 _In_ SIZE_T MaximumStackSize,
139 _In_opt_ PVOID AttributeList
144 _In_opt_ PVOID ApcArgument1,
145 _In_opt_ PVOID ApcArgument2,
146 _In_opt_ PVOID ApcArgument3
151 _In_ HANDLE ThreadHandle,
153 _In_opt_ PVOID ApcArgument1,
154 _In_opt_ PVOID ApcArgument2,
155 _In_opt_ PVOID ApcArgument3
160#define PANO_QUEUE_USER_APC_FLAGS_SPECIAL_USER_APC 0x1
166 _In_ HANDLE ThreadHandle,
167 _In_opt_ HANDLE ReserveHandle,
170 _In_opt_ PVOID ApcArgument1,
171 _In_opt_ PVOID ApcArgument2,
172 _In_opt_ PVOID ApcArgument3
177 _In_ HANDLE ProcessHandle,
178 _In_ PROCESSINFOCLASS ProcessInformationClass,
179 _In_reads_bytes_(ProcessInformationLength) PVOID ProcessInformation,
180 _In_ ULONG ProcessInformationLength
enum _PANO_SECTION_INHERIT PANO_SECTION_INHERIT
How a mapped view is shared with child processes. Only defined in kernel-mode headers.
NTSTATUS(NTAPI * pNtCreateThreadEx)(_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ HANDLE ProcessHandle, _In_ PVOID StartRoutine, _In_opt_ PVOID Argument, _In_ ULONG CreateFlags, _In_ SIZE_T ZeroBits, _In_ SIZE_T StackSize, _In_ SIZE_T MaximumStackSize, _In_opt_ PVOID AttributeList)
The NtCreateThreadEx function creates a thread in a specified process. StartRoutine is a PUSER_THREAD...
NTSTATUS(NTAPI * pNtWriteVirtualMemory)(HANDLE ProcessHandle, PVOID BaseAddress, PVOID Buffer, SIZE_T NumberOfBytesToWrite, PSIZE_T NumberOfBytesWritten)
The NtWriteVirtualMemory function writes memory to a specified process.
NTSTATUS(NTAPI * pNtAllocateVirtualMemoryEx)(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T RegionSize, _In_ ULONG AllocationType, _In_ ULONG PageProtection, _Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters, _In_ ULONG ExtendedParameterCount)
The NtAllocateVirtualMemoryEx function reserves and/or commits memory in a process,...
NTSTATUS(NTAPI * pNtQueueApcThread)(_In_ HANDLE ThreadHandle, _In_ PPANO_APC_ROUTINE ApcRoutine, _In_opt_ PVOID ApcArgument1, _In_opt_ PVOID ApcArgument2, _In_opt_ PVOID ApcArgument3)
The NtQueueApcThread function queues a user-mode APC to a thread.
struct _BOOT_ENTRY BOOT_ENTRY
The BOOT_ENTRY structure represents a boot entry in the boot configuration database....
NTSTATUS(NTAPI * pNtUnmapViewOfSection)(_In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress)
The NtUnmapViewOfSection function unmaps a view of a section from the address space of a process.
NTSTATUS(NTAPI * pNtMapViewOfSection)(_In_ HANDLE SectionHandle, _In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _In_ SIZE_T CommitSize, _Inout_opt_ PLARGE_INTEGER SectionOffset, _Inout_ PSIZE_T ViewSize, _In_ PANO_SECTION_INHERIT InheritDisposition, _In_ ULONG AllocationType, _In_ ULONG Win32Protect)
The NtMapViewOfSection function maps a view of a section into the address space of a process.
NTSTATUS(NTAPI * pNtProtectVirtualMemory)(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _Inout_ PSIZE_T RegionSize, _In_ ULONG NewProtection, _Out_ PULONG OldProtection)
The NtProtectVirtualMemory function changes the protection of memory in a process.
struct _BOOT_ENTRY * PBOOT_ENTRY
_PANO_SECTION_INHERIT
How a mapped view is shared with child processes. Only defined in kernel-mode headers.
NTSTATUS(NTAPI * pNtModifyBootEntry)(PBOOT_ENTRY BootEntry)
The NtModifyBootEntry function modifies a boot entry in the boot configuration database.
NTSTATUS(NTAPI * pNtSetInformationProcess)(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _In_reads_bytes_(ProcessInformationLength) PVOID ProcessInformation, _In_ ULONG ProcessInformationLength)
The NtSetInformationProcess function sets information about a process.
NTSTATUS(NTAPI * pNtQueueApcThreadEx2)(_In_ HANDLE ThreadHandle, _In_opt_ HANDLE ReserveHandle, _In_ ULONG ApcFlags, _In_ PPANO_APC_ROUTINE ApcRoutine, _In_opt_ PVOID ApcArgument1, _In_opt_ PVOID ApcArgument2, _In_opt_ PVOID ApcArgument3)
The NtQueueApcThreadEx2 function queues a user-mode APC to a thread, optionally as a special user APC...
NTSTATUS(NTAPI * pNtAllocateVirtualMemory)(_In_ HANDLE ProcessHandle, _Inout_ PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _Inout_ PSIZE_T RegionSize, _In_ ULONG AllocationType, _In_ ULONG Protection)
The NtAllocateVirtualMemory function reserves and/or commits memory in a process.
NTSTATUS(NTAPI * pNtReadVirtualMemory)(_In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress, _Out_writes_bytes_(NumberOfBytesToRead) PVOID Buffer, _In_ SIZE_T NumberOfBytesToRead, _Out_opt_ PSIZE_T NumberOfBytesRead)
The NtReadVirtualMemory function reads memory from a specified process.
NTSTATUS(NTAPI * pNtMapViewOfSectionEx)(_In_ HANDLE SectionHandle, _In_ HANDLE ProcessHandle, _Inout_ _At_(*BaseAddress, _Readable_bytes_(*ViewSize) _Writable_bytes_(*ViewSize) _Post_readable_byte_size_(*ViewSize)) PVOID *BaseAddress, _Inout_opt_ PLARGE_INTEGER SectionOffset, _Inout_ PSIZE_T ViewSize, _In_ ULONG AllocationType, _In_ ULONG PageProtection, _Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters, _In_ ULONG ExtendedParameterCount)
The NtMapViewOfSectionEx function maps a view of a section into the address space of a process.
NTSTATUS(NTAPI * pNtUnmapViewOfSectionEx)(_In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress, _In_ ULONG Flags)
The NtUnmapViewOfSectionEx function unmaps a view of a section from the address space of a process,...
VOID(NTAPI * PPANO_APC_ROUTINE)(_In_opt_ PVOID ApcArgument1, _In_opt_ PVOID ApcArgument2, _In_opt_ PVOID ApcArgument3)
The routine an APC queued with NtQueueApcThread runs. Not in the SDK headers.
The BOOT_ENTRY structure represents a boot entry in the boot configuration database....