PnpProcessDependencyRelations

__int64 __fastcall PnpProcessDependencyRelations(__int64 a1, int a2, int a3, __int64 a4, PVOID a5){
  _DEVICE_OBJECT *v5; 
  int v9; 
  _LIST_ENTRY *DependentList; 
  _LIST_ENTRY *Flink; 
  PVOID BugCheckParameter3; 
  _DWORD *DeviceNode; 
  int v15; 
  bool v16; 
  _DEVICE_OBJECT *Dependent; 
  UINT64 DependencyTypes; 

  v5 = *(_DEVICE_OBJECT **)(a1 + 32);
  Dependent = 0i64;
  v9 = 0;
  PnpAcquireDependencyRelationsLock(0);
  DependentList = PiGetDependentList(v5);
  Flink = DependentList->Flink;
  if( DependentList->Flink != DependentList )
  {
    BugCheckParameter3 = a5;
    do
    {
      PiEnumerateDependentListEntry(Flink, &Dependent, &DependencyTypes);
      Flink = Flink->Flink;
      if( Dependent )
      {
        DeviceNode = Dependent->DeviceObjectExtension->DeviceNode;
        v15 = DeviceNode[75];
        if( v15 < 782 || v15 > 783 )
          v16 = !PipIsDevNodeDNStarted((__int64)DeviceNode);
        else
          v16 = ((DeviceNode[76] - 786) & 0xFFFFFFFD) == 0;
        if( !v16 )
          v9 = PnpProcessRelation((__int64)DeviceNode, a2, (_UNICODE_STRING *)(unsigned int)a3, a4, BugCheckParameter3);
        if( v9 < 0 )
          break;
      }
    }
    while( Flink != DependentList );
  }
  ExReleaseResourceLite((PERESOURCE)((char *)&stru_140C452E0 + 384));
  PpDevNodeUnlockTree(PPL_SIMPLE_READ);
  return(unsigned int)v9;
}

Referenced by:

PnpProcessRelation