HeapCorrupted: ; CODE XREF: RtlFreeHeap(x,x,x)+A5j push esi call _RtlpHeapReportCorruption@4 ; RtlpHeapReportCorruption(x) xor eax, eax jmp HandleHeapCorruption _RtlpHeapReportCorruption@4 proc near ; CODE XREF: .text:7C911F95p mov edi, edi push ebp mov ebp, esp push [ebp+arg_4] push offset aHeapCorruption ; "Heap corruption detected at %p\n" call _DbgPrint pop ecx pop ecx call _RtlGetNtGlobalFlags@0 ; RtlGetNtGlobalFlags() test eax, 100000h jz short HeapCallTracingDisabled call _DbgBreakPoint@0 ; DbgBreakPoint() HeapCallTracingDisabled: ; CODE XREF: RtlpHeapReportCorruption(x)+1Ej pop ebp retn 4 _RtlpHeapReportCorruption@4 endp HandleHeapCorruption: ; CODE XREF: .text:7C93B077j test eax, eax jz ReportFailure ReportFailure: ; CODE XREF: RtlFreeHeap(x,x,x)+B0j mov eax, large fs:18h mov ecx, 0C000000Dh mov [eax+0BF4h], ecx mov eax, large fs:18h mov esi, eax push ecx call _RtlNtStatusToDosError@4 ; RtlNtStatusToDosError(x) mov [esi+34h], eax jmp loc_7C93B25D