PnpGetDeviceInstanceCsConfigFlags
__int64 __fastcall PnpGetDeviceInstanceCsConfigFlags(unsigned __int16 *a1, __int64 a2, _DWORD *a3){
__int64 result;
NTSTATUS RegistryValue;
_KEY_VALUE_FULL_INFORMATION *v7;
UINT64 DesiredAccess;
_KEY_VALUE_FULL_INFORMATION *Information;
WCHAR *DeviceInstanceId;
PVOID KeyHandle;
*a3 = 0;
KeyHandle = 0i64;
Information = 0i64;
DeviceInstanceId = 0i64;
result = PnpUnicodeStringToWstr((__int16 **)&DeviceInstanceId, 0i64, a1);
if( (int)result >= 0 )
{
LODWORD(DesiredAccess) = 131097;
RegistryValue = CmOpenDeviceRegKey(
*(&stru_140CF2E80 + 607),
DeviceInstanceId,
CM_KEY_TYPE_SCOPE_CONFIG|CM_KEY_TYPE_DEVICE_INSTANCE,
0i64,
DesiredAccess,
0,
&KeyHandle,
0i64);
PnpUnicodeStringToWstrFree(DeviceInstanceId, (__int64)a1);
if( RegistryValue >= 0 )
{
RegistryValue = IopGetRegistryValue(KeyHandle, (PWCHAR)&stru_1407D01E0._Xmm11, 0i64, &Information);
ZwClose((_HANDLE)KeyHandle);
if( RegistryValue >= 0 )
{
v7 = Information;
if( Information->Type == 4 && Information->DataLength >= 4 )
*a3 = *(ULONG *)((char *)&Information->TitleIndex + Information->DataOffset);
ExFreePoolWithTag(v7, 0);
}
}
return(unsigned int)RegistryValue;
}
return result;
}Referenced by:
PiCMCreateDevice
PnpIsDeviceInstanceEnabled