Макро для запуска проверки хипа: Код (Text): HsForceFlags equ 10H ; HEAP.ForceFlags HEAP_FLAG_PAGE_ALLOCS equ 01000000H HEAP_SKIP_VALIDATION_CHECKS equ 10000000H HEAP_VALIDATE_ALL_ENABLED equ 20000000H HEAP_VALIDATE_PARAMETERS_ENABLED equ 40000000H ENABLE_HEAP_VALIDATION macro mov eax,fs:[TEB.Peb] mov eax,PEB.ProcessHeap[eax] and dword ptr [eax + HsForceFlags],NOT(HEAP_FLAG_PAGE_ALLOCS or HEAP_SKIP_VALIDATION_CHECKS) or dword ptr [eax + HsForceFlags],(HEAP_VALIDATE_ALL_ENABLED or HEAP_VALIDATE_PARAMETERS_ENABLED) endm ENABLE_DEBUG_EXCEPTIONS macro mov eax,fs:[TEB.Peb] mov PEB.BeingDebugged[eax],TRUE endm