PnpSelectFirstConfiguration

void __fastcall PnpSelectFirstConfiguration(__int64 a1, unsigned int a2, _LIST_ENTRY *a3, int a4){
  __int64 v5; 
  __int64 v7; 
  __int64 *v8; 
  __int64 v9; 
  __int64 i; 
  __int64 v11; 

  if( a2 )
  {
    v5 = a2;
    v7 = a1 + 32;
    do
    {
      v8 = (__int64 *)(*(_QWORD *)v7 + 40i64);
      *(_QWORD *)(*(_QWORD *)v7 + 16i64) = v8;
      v9 = *v8;
      if( a4 )
      {
        for( i = 0i64; (unsigned int)i < *(_DWORD *)(v9 + 20); i = (unsigned int)(i + 1) )
        {
          v11 = *(_QWORD *)(v9 + 8 * i + 24);
          if( *(_BYTE *)(v11 + 8) )
          {
            if( *(_DWORD *)v9 == 1 )
              *(_DWORD *)(v11 + 84) |= 1u;
          }
        }
      }
      IopAddRemoveReqDescs((_REQ_DESC **)(v9 + 24), *(unsigned int *)(v9 + 20), a3, 1u);
      v7 += 64i64;
      --v5;
    }
    while( v5 );
  }
}

Referenced by:

PnpFindBestConfigurationWorker