PnpDeletePropertyWorker

__int64 __fastcall PnpDeletePropertyWorker(__int64 a1, VOID *a2, const wchar_t *a3, __int64 a4, int a5, int a6, int a7){
  int v10; 
  NTSTATUS v11; 
  NTSTATUS inited; 
  _OBJECT_TYPE *v13; 
  UINT64 dwFlags; 
  int pszFormat; 
  VOID *KeyHandle; 
  _UNICODE_STRING DestinationString; 
  __int16 pszDest[48]; 

  KeyHandle = 0i64;
  if( a5 || a7 )
    return(unsigned int)-1073741811;
  if( !a3 || (v11 = RtlUnalignedStringCchLengthW(a3, 85, (_SIZE_T *)&DestinationString), v11 >= 0) )
  {
    LODWORD(dwFlags) = 2048;
    if( RtlStringCchPrintfExW(
           (WCHAR *)pszDest,
           0x30ui64,
           0i64,
           0i64,
           dwFlags,
           (WCHAR *)L"{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%04lX") < 0 )
      return(unsigned int)-1073741595;
    v10 = PnpOpenPropertiesKey(a1, a2, (wchar_t *)pszDest, 6u, 0, pszFormat, (INT64)&KeyHandle);
    v11 = v10;
    if( v10 == -1073741772 )
      return(unsigned int)-1073741275;
    if( v10 < 0 )
      return(unsigned int)v11;
    DestinationString = 0i64;
    inited = RtlInitUnicodeStringEx(&DestinationString, (WCHAR *)a3);
    if( inited >= 0 )
      inited = ZwDeleteValueKey(KeyHandle, &DestinationString, v13);
    ZwClose((_HANDLE)KeyHandle);
    if( inited == -1073741772 || inited == -1073741444 )
      return(unsigned int)-1073741275;
    if( inited < 0 )
      return(unsigned int)inited;
  }
  return(unsigned int)v11;
}

Referenced by:

DrvDbDeleteObjectSubKey
PnpSetGenericStoreProperty