PoFxSetTargetDripsDevicePowerState
NTSTATUS __stdcall PoFxSetTargetDripsDevicePowerState(POP_FX_DEVICE *FxDevice, INT64 a2){
NTSTATUS v2;
int v3;
unsigned int v5;
_DEVICE_POWER_STATE *v6;
PEPHANDLE *v7;
VOID **PoolWithTag;
v2 = 0;
v3 = a2;
if( *(&stru_140C23628 + 1058) >= 0 )
return -1073741637;
if( (_DWORD)a2 == 1 || (int)a2 > 4 )
return -1073741811;
v5 = PlatformIdleStateIndex;
if( (_DWORD)PlatformIdleStateIndex == -1 )
return -1073741823;
if( !FxDevice )
return -1073741811;
PopFxAddRefDevice(FxDevice);
if( (_InterlockedCompareExchange(FxDevice + 206, 0, 0) & 0x10) != 0
&& (v7 = (PEPHANDLE *)*((_QWORD *)FxDevice + 7)) != 0i64
&& (LOBYTE(v6) = 1, PopPepGetMinimumDevicePowerState(v7, v5, v6)) )
{
if( v3 )
{
PoolWithTag = ExAllocatePoolWithTag(0x200ui64, 0x40ui64, 1297630800i64);
if( PoolWithTag )
{
PoolWithTag[1] = PoolWithTag;
*PoolWithTag = PoolWithTag;
PoolWithTag[2] = FxDevice;
*((_DWORD *)PoolWithTag + 6) = v3;
PoolWithTag[6] = PopFxUpdateVetoMaskWork;
PoolWithTag[7] = PoolWithTag;
PoolWithTag[4] = 0i64;
ExQueueWorkItem((PWORK_QUEUE_ITEM)PoolWithTag + 1, DelayedWorkQueue);
return v2;
}
v2 = -1073741670;
}
}
else
{
v2 = -1073741823;
}
PopFxReleaseDevice((_POP_FX_DEVICE *)FxDevice);
return v2;
}Referenced by:
No references.