WheaRemoveErrorSource
INT8 __stdcall WheaRemoveErrorSource(UINT64 ErrorSourceId){
INT64 *ErrorSource;
INT64 v2;
__int64 v3;
INT64 v4;
char *v5;
__int128 v6;
int v7;
void *v8;
int v9;
union _LARGE_INTEGER Interval;
int Src[8];
char v13;
int v14;
char v15;
ErrorSource = WheapGetErrorSource((INT64)&WheapErrorSourceTable, (unsigned int)ErrorSourceId);
v2 = (INT64)ErrorSource;
if( ErrorSource )
{
LOBYTE(ErrorSource) = WheapIsNonHestErrorSource(*((unsigned int *)ErrorSource + 26));
if( (_BYTE)ErrorSource )
{
if( (unsigned int)(*(_DWORD *)(v2 + 108) - 3) > 1 )
{
v3 = 7i64;
Interval.QuadPart = -1000i64;
v4 = v2 + 96;
v5 = &v13;
do
{
*(_OWORD *)v5 = *(_OWORD *)v4;
*((_OWORD *)v5 + 1) = *(_OWORD *)(v4 + 16);
*((_OWORD *)v5 + 2) = *(_OWORD *)(v4 + 32);
*((_OWORD *)v5 + 3) = *(_OWORD *)(v4 + 48);
*((_OWORD *)v5 + 4) = *(_OWORD *)(v4 + 64);
*((_OWORD *)v5 + 5) = *(_OWORD *)(v4 + 80);
*((_OWORD *)v5 + 6) = *(_OWORD *)(v4 + 96);
v5 += 128;
v6 = *(_OWORD *)(v4 + 112);
v4 += 128i64;
*((_OWORD *)v5 - 1) = v6;
--v3;
}
while( v3 );
*(_OWORD *)v5 = *(_OWORD *)v4;
*((_OWORD *)v5 + 1) = *(_OWORD *)(v4 + 16);
*((_OWORD *)v5 + 2) = *(_OWORD *)(v4 + 32);
*((_OWORD *)v5 + 3) = *(_OWORD *)(v4 + 48);
*((_QWORD *)v5 + 8) = *(_QWORD *)(v4 + 64);
*((_DWORD *)v5 + 18) = *(_DWORD *)(v4 + 72);
*(_DWORD *)(v2 + 108) = 4;
while( _InterlockedCompareExchange((volatile signed __int32 *)(v2 + 92), -1, 0) > 0 )
KeDelayExecutionThread(0, 0, &Interval);
v7 = WheapCallErrorSourceUninitialize(v2);
v8 = *(void **)(v2 + 48);
v9 = v7;
*(_DWORD *)(v2 + 108) = 3;
if( v8 )
{
ExFreePoolWithTag(v8, 0x61656857u);
*(_QWORD *)(v2 + 48) = 0i64;
}
Src[3] = 0;
Src[0] = 1733060695;
Src[1] = 1;
Src[2] = 1009;
Src[5] = -2147483636;
Src[4] = 1280201291;
Src[6] = 2;
Src[7] = 977;
v14 = v9;
v15 = 1;
LOBYTE(ErrorSource) = WheaLogInternalEvent(Src);
}
}
}
return(char)ErrorSource;
}Referenced by:
WheaRemoveErrorSourceDeviceDriver