PopPepProcessEvent

NTSTATUS __fastcall PopPepProcessEvent(
        POP_PEP_DEVICE *Device,
        POP_PEP_COMPONENT *Component,
        POP_PEP_ACTIVITY_TYPE CompleteType,
        POP_PEP_ACTIVITY_TYPE TriggerType,
        UINT64 TriggerParam,
        PEP_WORK_INFORMATION *WorkInfo){
  __int64 v6; 
  char v10; 
  int v11; 
  unsigned int ready; 
  char Work; 
  unsigned int v14; 
  INT64 v15; 
  INT64 v16; 
  bool v17; 
  NTSTATUS result; 
  UINT8 v19; 

  v6 = CompleteType;
  v19 = 0;
  v10 = PopPepLockActivityLink((__int64)Device, (INT64 *)Component, CompleteType, TriggerType, &v19);
  if( (_DWORD)v6 == 6 || (v11 = dword_14000293C[34 * v6], v11 < 2) )
    v11 = 2;
  ready = PopPepCountReadyActivities((unsigned int *)Device, (__int64)Component, v11);
  if( (_DWORD)v6 != 6 )
    PopPepCompleteActivity((__int64)Device, (__int64)Component, v6);
  if( TriggerType != MaximumActivities )
    PopPepTriggerActivity((__int64)Device, (__int64)Component, TriggerType, 0);
  PopPepPromoteActivities((__int64)Device, (__int64)Component, v11);
  Work = PopPepComponentGetWork((__int64)Device, (__int64)Component, (__int64)WorkInfo);
  v14 = PopPepCountReadyActivities((unsigned int *)Device, (__int64)Component, v11);
  v17 = 0;
  if( (Device[6] & 1) == 0 && !v14 && !Work && !Device[35] )
    v17 = *((_BYTE *)Device + 136) != 0;
  PopPepRequestWork(ready, v14, v15, v16);
  result = PopPepReleaseActivityLink((__int64)Device, (INT64 *)Component, v10, v19);
  if( v17 )
    Work = PopPepTryPowerDownDevice(Device, (_PEP_WORK_INFORMATION *)WorkInfo);
  LOBYTE(result) = Work;
  return result;
}

Referenced by:

PopFxProcessWork
PopPepCompleteComponentIdleState
PopPepNotifyIdleState
PopPepUnregisterDevice
PopPluginComponentActive
PopPluginDevicePower