PnpGetDeviceInstanceRegistryValue

INT64 __stdcall PnpGetDeviceInstanceRegistryValue(WCHAR *DeviceInstanceId, KEY_VALUE_FULL_INFORMATION **Information){
  WCHAR *v2; 
  unsigned int v3; 
  char v4; 
  unsigned int v5; 
  WCHAR *v6; 
  int v8; 
  _ETHREAD *CurrentThread; 
  int v10; 
  int RegistryValue; 
  void *Handle[3]; 
  KEY_VALUE_FULL_INFORMATION **Informationa; 
  Handle[0] = 0i64;
  v4 = (char)Information;
  v5 = v3;
  v6 = v2;
  if( ((unsigned __int8)Information & 1) != 0 )
  {
    v8 = 17;
  }
  else
  {
    if( ((unsigned __int8)Information & 2) == 0 )
      return 3221225485i64;
    v8 = 18;
  }
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  --*((_WORD *)CurrentThread + 242);
  ExAcquireResourceExclusiveLite(&PnpRegistryDeviceResource, 1u);
  v10 = v8 | 0x200;
  if( (v4 & 4) == 0 )
    v10 = v8;
  RegistryValue = CmOpenDeviceRegKey(PiPnpRtlCtx, DeviceInstanceId, v10, 0, 131097, 0, (__int64)Handle, 0i64);
  ExReleaseResourceLite(&PnpRegistryDeviceResource);
  KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
  if( RegistryValue >= 0 )
  {
    RegistryValue = IopGetRegistryValue(Handle[0], v6, v5, Informationa);
    ZwClose(Handle[0]);
  }
  return(unsigned int)RegistryValue;
}

Referenced by:

No references.