PnpGetObjectPropertyKeysWorker

__int64 __fastcall PnpGetObjectPropertyKeysWorker(
        __int64 a1,
        __int64 a2,
        unsigned int a3,
        __int64 a4,
        const wchar_t *a5,
        char a6,
        __int64 a7,
        unsigned int a8,
        _DWORD *a9,
        __int16 a10){
  signed int MappedPropertyKeysDispatch; 
  __int64 v15; 
  unsigned int v16; 
  char *v17; 
  unsigned int v18; 
  unsigned int v20; 
  unsigned int v21; 
  HANDLE Handle; 
  Handle = 0i64;
  v20 = 0;
  v21 = 0;
  if( a10 )
  {
    return(unsigned int)-1073741811;
  }
  else
  {
    *a9 = 0;
    if( a4
      || (MappedPropertyKeysDispatch = PnpOpenObjectRegKey(a1, a2, a3, 33554433, 0, (__int64)&Handle),
          MappedPropertyKeysDispatch >= 0) )
    {
      MappedPropertyKeysDispatch = PnpGetMappedPropertyKeysDispatch(
                                     a1,
                                     a2,
                                     a3,
                                     a4,
                                     (__int64)a5,
                                     a6,
                                     a7,
                                     a8,
                                     (__int64)&v20);
      if( (unsigned int)(MappedPropertyKeysDispatch + 1073741790) <= 1 || !MappedPropertyKeysDispatch )
      {
        if( v20 >= a8 )
        {
          v15 = 0i64;
          v16 = 0;
        }
        else
        {
          v15 = a7 + 20i64 * v20;
          v16 = a8 - v20;
        }
        v17 = (char *)Handle;
        if( a4 )
          v17 = (char *)a4;
        MappedPropertyKeysDispatch = PnpGetGenericStorePropertyKeys(a1, v17, a5, a6, v15, v16, &v21);
        if( (unsigned int)(MappedPropertyKeysDispatch + 1073741790) <= 1 || !MappedPropertyKeysDispatch )
        {
          v18 = v20 + v21;
          *a9 = v20 + v21;
          MappedPropertyKeysDispatch = a8 < v18 ? 0xC0000023 : 0;
        }
      }
    }
    if( Handle )
      ZwClose(Handle);
  }
  return(unsigned int)MappedPropertyKeysDispatch;
}

Referenced by:

PnpGetObjectPropertyKeys