| 19 | |
| 20 | _IRQL_requires_max_(DISPATCH_LEVEL) |
| 21 | PVOID AllocFromPool(SIZE_T Bytes, BOOLEAN FillByZeroes) { |
| 22 | if (!Bytes) return NULL; |
| 23 | VOID* CONST Address = ExAllocatePoolWithTag( |
| 24 | ExDefaultNonPagedPoolType, |
| 25 | Bytes, |
| 26 | PoolTag |
| 27 | ); |
| 28 | if (!Address) return NULL; |
| 29 | *static_cast<PUCHAR>(Address) = 0x00; |
| 30 | *(static_cast<PUCHAR>(Address) + Bytes - 1) = 0x00; |
| 31 | if (FillByZeroes) RtlZeroMemory(Address, Bytes); |
| 32 | return Address; |
| 33 | } |
| 34 | |
| 35 | _IRQL_requires_max_(DISPATCH_LEVEL) |
| 36 | PVOID AllocFromPoolExecutable(SIZE_T Bytes) { |
no outgoing calls
no test coverage detected