PiDevCfgParsePropertyKeyName

UINT8 __stdcall PiDevCfgParsePropertyKeyName(
        _UNICODE_STRING *PropertyKeyName,
        _DEVPROPKEY *PropertyKey,
        UINT64 *PropertyType){
  bool v4; 
  unsigned __int16 MaximumLength; 
  int v8; 
  WCHAR *v9; 
  __int64 v10; 
  WCHAR *v11; 
  WCHAR *v12; 
  UINT8 v13; 
  int v14; 
  UNICODE_STRING v16; 
  wchar_t pszDest[12]; 
  v4 = PropertyKeyName->Length < 0x50u;
  *(_DWORD *)(&v16.MaximumLength + 1) = 0;
  if( v4 )
    goto LABEL_15;
  v16.Buffer = PropertyKeyName->Buffer;
  MaximumLength = PropertyKeyName->MaximumLength;
  v16.Length = 76;
  v16.MaximumLength = MaximumLength;
  v8 = RtlGUIDFromString(&v16, &PropertyKey->fmtid);
  if( v8 < 0 )
    return v8 >= 0;
  if( PropertyKeyName->Buffer[38] != 44 )
    goto LABEL_15;
  v9 = PropertyKeyName->Buffer + 39;
  v10 = (PropertyKeyName->Length >> 1) - 39;
  if( v9[v10] )
    goto LABEL_15;
  v11 = wcschr(v9, 0x2Cu);
  v12 = v11;
  if( v11 )
  {
    v10 = v11 - v9;
    v12 = v11 + 1;
  }
  v8 = RtlStringCchCopyNW(pszDest, 0xBui64, v9, (unsigned int)v10);
  if( v8 >= 0 )
  {
    if( PnpStringToDwordValue(pszDest, (UINT64 *)&PropertyKey->pid) )
    {
      if( PropertyType )
      {
        *(_DWORD *)PropertyType = 1;
        if( v12 )
        {
          v13 = PnpStringToDwordValue(v12, PropertyType);
          v14 = v8;
          if( !v13 )
            v14 = -1073741823;
          v8 = v14;
        }
      }
      return v8 >= 0;
    }
LABEL_15:
    v8 = -1073741823;
  }
  return v8 >= 0;
}

Referenced by:

PiDevCfgCopyDeviceKey