PipCallbackHasDeviceOverrides

UINT8 __stdcall PipCallbackHasDeviceOverrides(PVOID DeviceOverrideEntryHandle, PVOID Context){
  NTSTATUS v3; 
  int v4; 
  void *KeyHandle; 
  UINT64 ResultLength; 
  struct _OBJECT_ATTRIBUTES ObjectAttributes; 
  __int128 KeyInformation; 
  __int128 v10; 
  __int128 v11; 
  ObjectAttributes.RootDirectory = DeviceOverrideEntryHandle;
  ObjectAttributes.ObjectName = (_UNICODE_STRING *)Context;
  *(_QWORD *)&ObjectAttributes.Length = 48i64;
  LODWORD(ResultLength) = 0;
  KeyHandle = 0i64;
  *(_QWORD *)&ObjectAttributes.Attributes = 576i64;
  KeyInformation = 0i64;
  v10 = 0i64;
  v11 = 0i64;
  *(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
  v3 = ZwOpenKey(&KeyHandle, 0x20019u, &ObjectAttributes);
  if( v3 >= 0 )
  {
    v3 = ZwQueryKey(KeyHandle, KeyFullInformation, &KeyInformation, 0x30ui64, &ResultLength);
    if( v3 == -2147483643 )
      v3 = 0;
    if( v3 >= 0 && (v4 = DWORD1(v10)) != 0 )
    {
      *((_QWORD *)Context + 2) = KeyHandle;
      *((_DWORD *)Context + 6) = v4;
    }
    else
    {
      v3 = -1073741823;
      ZwClose(KeyHandle);
    }
  }
  return v3 >= 0;
}

Referenced by:

PipFindDeviceOverrideEntry