PopPepTryPowerDownDevice
UINT8 __stdcall PopPepTryPowerDownDevice(_POP_PEP_DEVICE *Device, _PEP_WORK_INFORMATION *WorkInfo){
UINT8 started;
unsigned __int8 v5;
bool v6;
unsigned __int8 v7;
unsigned int v8;
INT64 v9;
INT64 v10;
started = 0;
v5 = ExAcquireSpinLockExclusive((INT64 *)Device + 8);
v6 = (Device[6] & 1) == 0;
v7 = v5;
*((_BYTE *)Device + 125) = 1;
if( v6 && !Device[35] && *((_BYTE *)Device + 136) && !**((_DWORD **)Device + 13) && !**((_DWORD **)Device + 14) )
{
v8 = Device[30];
PopPepTriggerActivity((__int64)Device, 0i64, 4, 0);
PopPepPromoteActivities((__int64)Device, 0i64, 1);
if( WorkInfo && **((_DWORD **)Device + 13) == 2 )
started = PopPepStartActivity((__int64)Device, 0i64, (__int64)(Device + 18), 4, Device + 30, (__int64)WorkInfo);
else
PopPepRequestWork(v8, (unsigned int)Device[30], v9, v10);
}
PopPepReleaseActivityLink((__int64)Device, 0i64, 1, v7);
return started;
}Referenced by:
PopPepProcessEvent