PiDevCfgInitDeviceCallback

__int64 __fastcall PiDevCfgInitDeviceCallback(__int64 a1, __int64 a2, _BYTE *a3){
  unsigned int v5; 
  __int64 v6; 
  const wchar_t *v7; 
  __int64 v8; 
  int a5; 
  char a6[12]; 
  __int64 result[10]; 
  __int64 v13; 
  int v14; 
  memset((INT64)result, 0i64);
  v5 = *(_DWORD *)(a1 + 28);
  v6 = *(_QWORD *)(a1 + 16);
  LODWORD(v13) = 0;
  memset(a6, 0, sizeof(a6));
  v14 = 0;
  a5 = 1;
  if( (int)PnpOpenObjectRegKey(PiPnpRtlCtx, v6, v5, 983103, 0, (__int64)&a6[4]) >= 0 )
  {
    v7 = *(const wchar_t **)(a1 + 16);
    v14 = 4;
    if( (int)CmGetDeviceRegProp(PiPnpRtlCtx, v7, *(__int64 *)&a6[4], 11, (__int64)&a5, (__int64)&v13, (__int64)&v14, 0) < 0
      || a5 != 4
      || v14 != 4 )
    {
      LODWORD(v13) = 0;
    }
    if( (int)PiDevCfgInitDeviceContext(*(const wchar_t **)(a1 + 16), *(__int64 *)&a6[4], result) >= 0 )
    {
      if( (int)PiDevCfgCheckDeviceNeedsUpdate((INT64)result, (UINT64 *)a6) >= 0 && *(_DWORD *)a6 )
      {
        LODWORD(v13) = *(_DWORD *)a6 | v13;
        PiDevCfgSetDeviceRegProp(v8, (__int64)result, 11, 4, (__int64)&v13, 4);
      }
      *a3 = 0;
    }
  }
  PiDevCfgFreeDeviceContext((INT64)result);
  if( *(_QWORD *)&a6[4] )
    ZwClose(*(HANDLE *)&a6[4]);
  return 0i64;
}

Referenced by:

No references.