PipQueryBindingResolution

_PNP_DEPENDENCY_NODE *__stdcall PipQueryBindingResolution(_PNP_BINDING_RESOLUTION *Query){
  _PNP_DEPENDENCY_NODE *v1; 
  void **v3; 
  void **v4; 
  const _UNICODE_STRING *v5; 
  const _UNICODE_STRING *v6; 
  const _UNICODE_STRING *v7; 
  __int64 v9; 

  v1 = 0i64;
  if( *Query )
  {
    if( *Query == 1 )
    {
      v3 = (void **)*(&stru_140C452E0 + 40);
LABEL_4:
      while( v3 != (void **)((char *)&stru_140C452E0 + 320) )
      {
        v4 = v3;
        v3 = (void **)*v3;
        v5 = (const _UNICODE_STRING *)v4[7];
        if( v5 != (const _UNICODE_STRING *)(v4 + 7) )
        {
          v6 = (const _UNICODE_STRING *)*((_QWORD *)Query + 1);
          while( 1 )
          {
            v7 = v5;
            v5 = *(const _UNICODE_STRING **)&v5->Length;
            if( (unsigned __int8)RtlEqualUnicodeString(v7 + 1, v6, 1u) )
              return(_PNP_DEPENDENCY_NODE *)v4;
            if( v5 == (const _UNICODE_STRING *)(v4 + 7) )
              goto LABEL_4;
          }
        }
      }
    }
  }
  else
  {
    v9 = *((_QWORD *)Query + 1);
    if( v9 )
      return *(_PNP_DEPENDENCY_NODE **)(*(_QWORD *)(v9 + 312) + 80i64);
  }
  return v1;
}

Referenced by:

IoDuplicateDependency
IoResolveDependency
PipSetDependency