PiDqPropertyCallback

INT64 __stdcall PiDqPropertyCallback(
        VOID *PropertyCallbackContext,
        DEVPROPCOMPKEY *PropertyKey,
        UINT64 *PropertyType,
        UINT64 *BufferSize,
        UINT8 **Buffer){
  unsigned int v9; 
  char *v10; 
  unsigned int v11; 
  __int64 v12; 
  __int64 v13; 
  __int64 v14; 
  const wchar_t *LocaleName; 
  const wchar_t *v16; 
  DEVPROPSTORE Store; 
  unsigned int v19; 
  int v20; 
  int PnpObjectType; 
  __int64 v22; 
  __int64 v23; 
  __int64 v24; 
  v9 = 0;
  v10 = 0i64;
  v11 = 0;
  if( !*((_DWORD *)PropertyCallbackContext + 6) )
  {
LABEL_11:
    Store = PropertyKey->Store;
    if( Store )
    {
      if( Store != DEVPROP_STORE_USER )
        return(unsigned int)-1073741811;
      v19 = 0;
      if( !*(_QWORD *)PropertyCallbackContext )
      {
        PnpObjectType = PiDqGetPnpObjectType(*(unsigned int *)(*(_QWORD *)(*((_QWORD *)PropertyCallbackContext + 5)
                                                                         + 24i64)
                                                             + 16i64));
        v9 = PiDqOpenObjectRegKey(
               1,
               *((_QWORD *)PropertyCallbackContext + 4),
               PnpObjectType,
               1,
               0,
               v22,
               (__int64)PropertyCallbackContext);
        if( v9 == -1073741772 )
        {
          *(_QWORD *)PropertyCallbackContext = -1i64;
          v9 = 0;
        }
      }
      v10 = *(char **)PropertyCallbackContext;
      if( *(_QWORD *)PropertyCallbackContext == -1i64 )
      {
        v23 = *((_QWORD *)PropertyCallbackContext + 2);
        v24 = 6i64 * *((unsigned int *)PropertyCallbackContext + 6);
        *(_GUID *)(v23 + 8 * v24) = PropertyKey->Key.fmtid;
        *(_OWORD *)(v23 + 8 * v24 + 16) = *(_OWORD *)&PropertyKey->Key.pid;
        ++*((_DWORD *)PropertyCallbackContext + 6);
        goto LABEL_29;
      }
    }
    else
    {
      v19 = PiDqGetPnpObjectType(*(unsigned int *)(*(_QWORD *)(*((_QWORD *)PropertyCallbackContext + 5) + 24i64) + 16i64));
    }
    if( (v9 & 0x80000000) != 0 )
      return v9;
    v20 = PiDqPnPGetObjectProperty(
            *((_QWORD *)PropertyCallbackContext + 4),
            v19,
            v10,
            (__int64)PropertyKey,
            PropertyKey->Store,
            0i64,
            *((_QWORD *)PropertyCallbackContext + 2) + 48i64 * *((unsigned int *)PropertyCallbackContext + 6));
    v9 = v20;
    if( v20 != -1073741811 )
    {
      if( v20 >= 0 )
      {
        *(_DWORD *)PropertyType = *(_DWORD *)(*((_QWORD *)PropertyCallbackContext + 2)
                                            + 48i64 * *((unsigned int *)PropertyCallbackContext + 6)
                                            + 32);
        *(_DWORD *)BufferSize = *(_DWORD *)(*((_QWORD *)PropertyCallbackContext + 2)
                                          + 48i64 * *((unsigned int *)PropertyCallbackContext + 6)
                                          + 36);
        *Buffer = *(UINT8 **)(*((_QWORD *)PropertyCallbackContext + 2)
                            + 48i64 * (unsigned int)(*((_DWORD *)PropertyCallbackContext + 6))++
                            + 40);
      }
      return v9;
    }
    v9 = 0;
LABEL_29:
    *(_DWORD *)PropertyType = 0;
    *(_DWORD *)BufferSize = 0;
    *Buffer = 0i64;
    return v9;
  }
  while( 1 )
  {
    v12 = *((_QWORD *)PropertyCallbackContext + 2);
    v13 = 48i64 * v11;
    if( PropertyKey->Key.pid == *(_DWORD *)(v13 + v12 + 16) )
    {
      v14 = *(_QWORD *)&PropertyKey->Key.fmtid.Data1 - *(_QWORD *)(v13 + v12);
      if( *(_QWORD *)&PropertyKey->Key.fmtid.Data1 == *(_QWORD *)(v13 + v12) )
        v14 = *(_QWORD *)PropertyKey->Key.fmtid.Data4 - *(_QWORD *)(v13 + v12 + 8);
      if( !v14 && PropertyKey->Store == *(_DWORD *)(v13 + v12 + 20) )
      {
        LocaleName = PropertyKey->LocaleName;
        v16 = *(const wchar_t **)(v13 + v12 + 24);
        if( LocaleName == v16 || LocaleName && v16 && !wcsicmp(LocaleName, v16) )
          break;
      }
    }
    if( ++v11 >= *((_DWORD *)PropertyCallbackContext + 6) )
      goto LABEL_11;
  }
  *(_DWORD *)PropertyType = *(_DWORD *)(*((_QWORD *)PropertyCallbackContext + 2) + 48i64 * v11 + 32);
  *(_DWORD *)BufferSize = *(_DWORD *)(*((_QWORD *)PropertyCallbackContext + 2) + 48i64 * v11 + 36);
  *Buffer = *(UINT8 **)(*((_QWORD *)PropertyCallbackContext + 2) + 48i64 * v11 + 40);
  return v9;
}

Referenced by:

No references.