PopDirectedDripsWorkerRoutine
VOID __stdcall __noreturn PopDirectedDripsWorkerRoutine(PVOID StartContext){
__int64 v2;
REGHANDLE v3;
int v4;
__int64 v5;
int v6;
signed __int32 v7;
signed __int32 v8;
REGHANDLE v9;
int v10;
char v11;
int v12;
int v13[4];
int v14;
int v15;
__int64 v16;
_EVENT_DATA_DESCRIPTOR UserData;
__int64 *v18;
__int64 v19;
UINT64 *v20;
__int64 v21;
_EVENT_DATA_DESCRIPTOR v22;
int *v23;
__int64 v24;
int *v25;
__int64 v26;
int *v27;
__int64 v28;
LABEL_1:
while( KeWaitForSingleObject((UINT64)StartContext + 24, 0, 0, 0, 0i64) )
;
v2 = _InterlockedExchange64((volatile __int64 *)StartContext + 1, 0i64);
v16 = v2;
v11 = 0;
if( PopDiagHandleRegistered )
{
v3 = PopDiagHandle;
if( EtwEventEnabled(PopDiagHandle, &POP_ETW_EVENT_DIRECTED_DRIPS_WORKER) )
{
v11 = PopWnfCsEnterScenarioId;
*(_QWORD *)&UserData.Size = 1i64;
UserData.Ptr = (unsigned __int64)&v11;
v19 = 8i64;
v18 = &v16;
v21 = 8i64;
v20 = &PopWnfCsEnterScenarioId;
EtwWrite(v3, &POP_ETW_EVENT_DIRECTED_DRIPS_WORKER, 0, 3u, &UserData);
}
}
while( 1 )
{
while( 1 )
{
if( !v2 )
goto LABEL_1;
if( (_DWORD)v2 )
{
_BitScanForward((unsigned int *)&v4, v2);
v13[1] = v4;
}
else
{
_BitScanForward((unsigned int *)&v4, HIDWORD(v2));
v13[2] = v10;
LOBYTE(v4) = v10 + 32;
}
v5 = 1i64 << v4;
v2 &= ~(1i64 << v4);
if( 1i64 << v4 != 2 )
break;
v6 = *((_DWORD *)StartContext + 32);
_m_prefetchw((char *)StartContext + 132);
v7 = _InterlockedOr((volatile signed __int32 *)StartContext + 33, 0);
v8 = v7;
if( v6 != v7 )
{
v15 = v7;
v14 = v6;
v13[0] = 0;
v12 = 0;
if( PopDiagHandleRegistered )
{
v9 = PopDiagHandle;
if( EtwEventEnabled(PopDiagHandle, &POP_ETW_EVENT_DIRECTED_DRIPS_DISENGAGE_MASK_CHANGED) )
{
v12 = v8 & (v8 ^ v6);
v13[0] = v6 & (v8 ^ v6);
*(_QWORD *)&v22.Size = 4i64;
v22.Ptr = (unsigned __int64)&v14;
v24 = 4i64;
v23 = &v15;
v25 = &v12;
v27 = v13;
v26 = 4i64;
v28 = 4i64;
EtwWrite(v9, &POP_ETW_EVENT_DIRECTED_DRIPS_DISENGAGE_MASK_CHANGED, 0, 4u, &v22);
}
}
*((_DWORD *)StartContext + 32) = v8;
if( *((_BYTE *)StartContext + 144) )
{
if( v6 )
{
if( !v8 )
LABEL_26:
PopDirectedDripsSuspendDevices((INT32 *)StartContext);
}
else
{
PopDirectedDripsResumeDevices(StartContext);
}
}
}
}
switch( v5 )
{
case 0x400i64:
PopDirectedDripsHandleResiliencyNotification((INT64)StartContext);
break;
case 0x800i64:
if( *((_BYTE *)StartContext + 144) )
{
PopDirectedDripsResumeDevices(StartContext);
goto LABEL_26;
}
break;
case 0x800000000i64:
PopDeepSleepClearDisengageReason(PopDeepSleepDisengageReasonDirectedDripsTransition);
break;
}
}
}Referenced by:
No references.