mirror of
https://github.com/vxunderground/VX-API
synced 2026-06-06 16:54:55 +00:00
2.0.439
2.0.439
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include "Win32Helper.h"
|
||||
|
||||
VOID HeapFreeInterceptionRoutine(PEXCEPTION_POINTERS ExceptionInfo)
|
||||
{
|
||||
CONST DWORD dwSize = HeapSize((HANDLE)ExceptionInfo->ContextRecord->Rcx, (DWORD)ExceptionInfo->ContextRecord->Rdx, (LPCVOID)ExceptionInfo->ContextRecord->R8);
|
||||
|
||||
if (dwSize)
|
||||
ZeroMemoryEx((PVOID)ExceptionInfo->ContextRecord->R8, dwSize);
|
||||
|
||||
ExceptionInfo->ContextRecord->EFlags |= (1 << 16);
|
||||
}
|
||||
|
||||
BOOL HookEngineUnhookHeapFree(_In_ BOOL StartEngine)
|
||||
{
|
||||
if (StartEngine)
|
||||
{
|
||||
if (!GlobalHardwareBreakpointObject.IsInit)
|
||||
InitHardwareBreakpointEngine();
|
||||
}
|
||||
|
||||
return InsertDescriptorEntry((PUINT_VAR_T)&HeapFree, 0, HeapFreeInterceptionRoutine, 0, FALSE);
|
||||
}
|
||||
|
||||
BOOL HookEngineRestoreHeapFree(_In_ BOOL ShutdownEngine)
|
||||
{
|
||||
if (!GlobalHardwareBreakpointObject.IsInit)
|
||||
return FALSE;
|
||||
|
||||
RemoveDescriptorEntry((PUINT_VAR_T)&HeapFree, 0);
|
||||
|
||||
if (ShutdownEngine)
|
||||
return ShutdownHardwareBreakpointEngine();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user