PopDripsWatchdogTakeAction
void __fastcall PopDripsWatchdogTakeAction(__int64 a1, __int16 a2, int a3){
UINT8 ActionsTaken;
UINT64 v5;
unsigned int v6;
__int64 *v7;
bool DeviceConstraINT;
UNICODE_STRING *DeviceServiceName;
__int64 v10;
UINT64 v11;
UINT64 v12;
UINT64 *v13;
UINT64 v14;
INT64 v15;
UINT64 EnergyDrain;
UNICODE_STRING *ChildServiceName;
UINT64 v18;
_QWORD a2a[2];
UINT64 VetoCode;
int v21;
WCHAR *VetoName;
v21 = a3;
ActionsTaken = a2;
v5 = (unsigned int)(10000 * *(_DWORD *)(a1 + 8));
v6 = 0;
VetoName = 0i64;
*(_OWORD *)a2a = 0i64;
LODWORD(VetoCode) = 0;
if( (int)PopFxBuildDripsBlockingDeviceList(v5, a2a) >= 0 )
{
v7 = (__int64 *)a2a[0];
DeviceConstraINT = a2a[0] != (_QWORD)a2a;
if( (_QWORD *)a2a[0] != a2a )
{
do
{
DeviceServiceName = (UNICODE_STRING *)(*(v7 - 103) + 56);
if( *((_DWORD *)v7 + 8) )
{
v10 = 0i64;
do
{
LODWORD(v18) = 0;
LODWORD(EnergyDrain) = *(_DWORD *)(a1 + 20);
PopDiagTraceCsDripsWatchdog(
*(unsigned int *)a1,
*(unsigned int *)(a1 + 12),
*(unsigned int *)(a1 + 8),
*(_BYTE *)(a1 + 24) != 0,
EnergyDrain,
1u,
ActionsTaken,
DeviceServiceName,
(UNICODE_STRING *)(*(_QWORD *)(v7[3] + 8 * v10) + 56i64),
v18);
v10 = (unsigned int)(v10 + 1);
}
while( (unsigned int)v10 < *((_DWORD *)v7 + 8) );
}
else
{
LODWORD(v18) = 0;
LODWORD(EnergyDrain) = *(_DWORD *)(a1 + 20);
PopDiagTraceCsDripsWatchdog(
*(unsigned int *)a1,
*(unsigned int *)(a1 + 12),
*(unsigned int *)(a1 + 8),
*(_BYTE *)(a1 + 24) != 0,
EnergyDrain,
1u,
ActionsTaken,
DeviceServiceName,
0i64,
v18);
}
v7 = (__int64 *)*v7;
}
while( v7 != a2a );
v7 = (__int64 *)a2a[0];
v6 = VetoCode;
}
if( !DeviceConstraINT )
{
PpmIdlePrevetoWatchdog((unsigned int)(10000 * *(_DWORD *)(a1 + 8)), &VetoCode, &VetoName);
v6 = VetoCode;
LODWORD(v18) = VetoCode;
LODWORD(EnergyDrain) = *(_DWORD *)(a1 + 20);
PopDiagTraceCsDripsWatchdog(
*(unsigned int *)a1,
*(unsigned int *)(a1 + 12),
*(unsigned int *)(a1 + 8),
*(_BYTE *)(a1 + 24) != 0,
EnergyDrain,
0,
ActionsTaken,
0i64,
0i64,
v18);
v7 = (__int64 *)a2a[0];
}
if( !*(_BYTE *)(a1 + 24) || (ActionsTaken & 1) != 0 )
{
if( (ActionsTaken & 2) != 0 )
{
LODWORD(EnergyDrain) = *(_DWORD *)(a1 + 20);
PopDiagTraceCsDripsWatchdogPerfTrack(
*(unsigned int *)a1,
*(unsigned int *)(a1 + 12),
*(unsigned int *)(a1 + 8),
*(unsigned __int8 *)(a1 + 24),
EnergyDrain,
DeviceConstraINT,
ActionsTaken);
v7 = (__int64 *)a2a[0];
}
if( DeviceConstraINT )
{
v11 = (UINT64)(v7 - 109);
v12 = v11 + 872;
v13 = (UINT64 *)(v11 + 48);
if( *(_DWORD *)(v11 + 904) )
v13 = *(UINT64 **)(v11 + 896);
v14 = *v13;
}
else
{
v14 = 0i64;
v11 = 0i64;
v12 = 0i64;
}
if( !(_BYTE)KdDebuggerEnabled || (_BYTE)KdDebuggerNotPresent )
{
if( ((unsigned int)VfIsVerifierEnabled() || PopCheckTestsigningEnabled())
&& DeviceConstraINT
&& (ActionsTaken & 0x20) != 0 )
{
PopFxBugCheck(0x619ui64, v11, *(unsigned int *)(v12 + 16), v14);
}
}
else if( (ActionsTaken & 8) != 0 )
{
if( *(_DWORD *)(a1 + 16) <= 0x64u )
__debugbreak();
}
else if( DeviceConstraINT )
{
if( (ActionsTaken & 0x40) != 0 )
NT_ASSERT(
"*** DRIPS watchdog timeout
This break point indicates that screen-off battery
life is being compromi"
"sed. This AOAC system broke
into the debugger because a device has prevented
the deepest runtime idl"
"e platform state(DRIPS) for
a certain period of time, despite being in the
resiliency phase of conn"
"ected standby without
activators active.
Run !platformidle to identify the device with an
unsat"
"isifed DRIPS constraint.
");
if( (ActionsTaken & 0x20) != 0 )
PopFxBugCheck(0x619ui64, v11, *(unsigned int *)(v12 + 16), v14);
}
if( PopDeviceConstraintsEnforced() && (ActionsTaken & 4) != 0 )
{
if( DeviceConstraINT )
{
LODWORD(ChildServiceName) = 0;
DbgkWerCaptureLiveKernelDump(
(WCHAR *)L"DripsWatchdog",
351i64,
2i64,
v11,
*(unsigned int *)(v12 + 16),
v14,
0i64,
0i64,
(INT64)ChildServiceName);
}
else if( v6 )
{
if( PopFxProcessorPlugin )
v15 = *(_QWORD *)(PopFxProcessorPlugin + 104);
else
v15 = 0i64;
LODWORD(ChildServiceName) = 0;
DbgkWerCaptureLiveKernelDump(
(WCHAR *)L"DripsWatchdog",
351i64,
3i64,
v6,
(INT64)VetoName,
v15,
0i64,
0i64,
(INT64)ChildServiceName);
}
}
}
PopFxDestroyDripsBlockingDeviceList(a2a);
}
}Referenced by:
PopDripsWatchdogDiagnosticWorker