#pragma once // // Custom allocator for function that allocate pool memory // typedef _IRQL_requires_same_ _Function_class_(EVT_DOMITO_ALLOCATE_ROUTINE) __drv_allocatesMem(Mem) PVOID NTAPI EVT_DOMITO_ALLOCATE_ROUTINE( _In_ SIZE_T ByteSize ); typedef EVT_DOMITO_ALLOCATE_ROUTINE* PFN_DOMITO_ALLOCATE_ROUTINE; // // Finds the base address of a driver module // _Success_(return == STATUS_SUCCESS) _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) EXTERN_C NTSTATUS DomitoFindDriverBaseAddress( _In_ STRING ModuleName, _In_ PFN_DOMITO_ALLOCATE_ROUTINE Allocator, _Inout_opt_ PVOID * ModuleBase ); // // Finds the address of an exported function by name // _Success_(return == STATUS_SUCCESS) _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) EXTERN_C NTSTATUS DomitoFindExportedFunctionAddress( _In_ PVOID ModuleBase, _In_ STRING FunctionName, _Inout_opt_ PVOID * FunctionAddress ); // // Scans a provided buffer for a memory pattern // _Success_(return == STATUS_SUCCESS) _Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) NTSTATUS DomitoMemorySearchPattern( _In_ PCUCHAR pcPattern, _In_ UCHAR uWildcard, _In_ SIZE_T puLen, _In_ PVOID pcBase, _In_ SIZE_T puSize, _Outptr_result_maybenull_ PVOID* ppMatch );