PnpGetObjectList

__int64 __fastcall PnpGetObjectList(
        __int64 a1,
        unsigned int a2,
        __int64 a3,
        __int64 a4,
        __int64 a5,
        int a6,
        __int64 a7,
        int a8){
  __int64 v8; 
  __int64(__fastcall *v10)(__int64, _QWORD, _QWORD, __int64, int, INT64 *); 
  int v11; 
  unsigned int ObjectListDispatch; 
  unsigned int v13; 
  int v14; 
  unsigned int v16; 
  INT64 result[4]; 
  __int64 v18; 
  int v19; 
  __int64 v20; 
  int v21; 
  v8 = PiPnpRtlCtx;
  memset((INT64)result, 0i64);
  v10 = *(__int64(__fastcall **)(__int64, _QWORD, _QWORD, __int64, int, INT64 *))(v8 + 488);
  v18 = a5;
  v19 = a6;
  v20 = a7;
  v21 = a8;
  if( v10 )
  {
    v11 = v10(v8, 0i64, a2, 5i64, 1, result);
    if( v11 == -1073741822 )
    {
      v10 = 0i64;
    }
    else
    {
      if( v11 == -1073741536 )
        return LODWORD(result[0]);
      if( v11 )
        return(unsigned int)-1073741595;
    }
  }
  ObjectListDispatch = PnpGetObjectListDispatch(v8, a2, result[2], result[3], v18, v19, v20, v21);
  v13 = ObjectListDispatch;
  if( !v10 )
    return v13;
  LODWORD(result[0]) = ObjectListDispatch;
  v14 = v10(v8, 0i64, a2, 5i64, 2, result);
  if( v14 == -1073741822 )
    return v13;
  if( v14 == -1073741536 )
    return LODWORD(result[0]);
  v16 = v13;
  if( v14 )
    return(unsigned int)-1073741595;
  return v16;
}

Referenced by:

PiCMGetObjectList
PiDmObjectManagerPopulate