PoFxSetTargetDripsDevicePowerState
__int64 __fastcall PoFxSetTargetDripsDevicePowerState(ULONG_PTR a1, int a2){
unsigned int v2;
char v5;
__int64 v6;
WORK_QUEUE_ITEM *PoolWithTag;
int a4;
int a5;
v2 = 0;
a4 = 0;
a5 = 0;
if( PopFxDeviceAccountingLevel < 0 )
{
if( a2 == 1 || a2 > 4 )
return(unsigned int)-1073741811;
v5 = qword_140C4FDC0;
if( (_DWORD)qword_140C4FDC0 == -1 )
return(unsigned int)-1073741823;
if( !a1 )
return(unsigned int)-1073741811;
PopFxAddRefDevice(a1);
if( (_InterlockedCompareExchange((volatile signed __int32 *)(a1 + 824), 0, 0) & 0x10) != 0 )
{
v6 = *(_QWORD *)(a1 + 56);
if( v6 )
{
if( PopPepGetMinimumDevicePowerState(v6, v5, 1, &a4, &a5) )
{
if( !a2 && a4 == a5 || a2 == a4 )
goto LABEL_20;
if( a5 <= 1 || !a2 || a2 > a5 )
{
PoolWithTag = (WORK_QUEUE_ITEM *)ExAllocatePoolWithTag(NonPagedPoolNx, 0x40ui64, 0x4D584650ui64);
if( PoolWithTag )
{
PoolWithTag->List.Blink = &PoolWithTag->List;
PoolWithTag->List.Flink = &PoolWithTag->List;
PoolWithTag->WorkerRoutine = (void(__fastcall *)(void *))a1;
LODWORD(PoolWithTag->Parameter) = a2;
PoolWithTag[1].WorkerRoutine = (void(__fastcall *)(void *))PopFxUpdateVetoMaskWork;
PoolWithTag[1].Parameter = PoolWithTag;
PoolWithTag[1].List.Flink = 0i64;
ExQueueWorkItem(PoolWithTag + 1, DelayedWorkQueue);
return v2;
}
v2 = -1073741670;
goto LABEL_20;
}
}
}
}
v2 = -1073741823;
LABEL_20:
PopFxReleaseDevice(a1);
return v2;
}
return(unsigned int)-1073741637;
}Referenced by:
No references.