MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / DetourGenBrk

Function DetourGenBrk

KernelLibrary/detours.cpp:171–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171PUCHAR DetourGenBrk(PUCHAR pCode, PUCHAR pLimit) {
172 ULONG count = pLimit - pCode;
173 Brk* pBrk = (Brk*)ExAllocatePoolWithTag(NonPagedPool, sizeof(Brk) + count, 'oted');
174 if (pBrk != nullptr) {
175 MapLockedCopyMemory(pCode, pBrk->int3, count);
176 ExFreePool(pBrk);
177 while (pCode < pLimit) {
178 pCode++;
179 }
180 }
181 return pCode;
182}
183
184PUCHAR DetourSkipJmp(PUCHAR pCode, PVOID* ppGlobals) {
185 if (pCode == nullptr) {

Callers 2

DetourAttachExFunction · 0.85

Calls 1

MapLockedCopyMemoryFunction · 0.85

Tested by

no test coverage detected