PopDirectedDripsSuspendDevices
INT64 __fastcall PopDirectedDripsSuspendDevices(INT32 *a1){
__int64 v2;
signed __int32 v3;
signed __int32 v4;
__int16 v5;
int v6;
int v7;
__int64 v8;
EVENT_DESCRIPTOR *v9;
int v10;
signed __int32 v11;
signed __int32 v12;
v2 = *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart;
_m_prefetchw(a1);
v3 = *a1;
do
{
v4 = v3;
v3 = _InterlockedCompareExchange(a1, v3, v3);
}
while( v4 != v3 );
v5 = v3;
if( a1[32] || (v3 & 0x3000) == 0 || (v3 & 0x10) != 0 )
{
v6 = -1073741823;
LABEL_16:
if( v6 >= 0 )
goto LABEL_22;
goto LABEL_17;
}
if( (v3 & 0x808) == 2048 )
{
v6 = -1073741536;
goto LABEL_17;
}
_m_prefetchw(a1);
if( (_InterlockedOr(a1, 0x40u) & 0x40) == 0 )
PopAcquireTransitionLock();
a1[21] = 0;
a1[15] = 1;
a1[16] = 5;
a1[17] = 5;
a1[20] = a1[14];
a1[18] = 1;
a1[19] = 2;
v7 = PopDirectedDripsInitializeBroadcast(a1);
v6 = v7;
if( v7 < 0 )
{
a1[30] = v7;
goto LABEL_16;
}
_InterlockedOr(a1, 0x80u);
if( (v5 & 0x800) != 0 )
{
*((_BYTE *)a1 + 86) = 3;
PoBroadcastSystemState((__int64)(a1 + 15), v8, v9);
}
*((_BYTE *)a1 + 564) = 0;
*((_BYTE *)a1 + 86) = 2;
v10 = PoBroadcastSystemState((__int64)(a1 + 15), v8, v9);
a1[30] = v10;
v6 = v10;
if( v10 >= 0 )
{
_InterlockedOr(a1, 0x10u);
_InterlockedAnd(a1, 0xFFFFFFDF);
++a1[31];
v6 = 0;
goto LABEL_22;
}
LABEL_17:
_m_prefetchw(a1);
v11 = *a1;
do
{
v12 = v11;
v11 = _InterlockedCompareExchange(a1, v11, v11);
}
while( v12 != v11 );
if( (v11 & 0x80u) != 0 )
{
PopDirectedDripsDestroyBroadcast();
_InterlockedAnd(a1, 0xFFFFFF7F);
}
PopDirectedDripsReleaseTransitionLock(a1);
LABEL_22:
PopDirectedDripsDiagTraceNotifyDevices(
1u,
(unsigned int)v6,
(EVENT_DESCRIPTOR *)((*(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart - v2) / 0x989680ui64));
return(unsigned int)v6;
}Referenced by:
PopDirectedDripsHandleResiliencyNotification
PopDirectedDripsWorkerRoutine