CmGetDeviceLogConfKeyPath

NTSTATUS __stdcall CmGetDeviceLogConfKeyPath(
        WCHAR *DeviceInstanceId,
        _CM_KEY_TYPE CmKeyTypeFlags,
        WCHAR *BaseKeyPath,
        UINT64 BaseKeyLength,
        UINT64 *RequiredLength){
  __int64 v5; 
  unsigned __int64 v6; 
  UINT64 dwFlags; 
  WCHAR *pszDest; 
  size_t cchDest; 
  _DWORD *v11; 

  if( ((unsigned int)BaseKeyPath & 0xFFFFFFEB) != 0 )
    return -1073741811;
  v5 = -1i64;
  do
    ++v5;
  while( *(_WORD *)(*(_QWORD *)&CmKeyTypeFlags + 2 * v5) );
  v6 = v5 + 39;
  if( v6 > 0xFFFFFFFF )
    return -1073741675;
  if( v11 )
    *v11 = v6;
  if( (unsigned int)v6 > cchDest )
    return -1073741789;
  LODWORD(dwFlags) = 2048;
  return RtlStringCchPrintfExW(pszDest, cchDest, 0i64, 0i64, dwFlags, (WCHAR *)L"%s\\%s\\%s");
}

Referenced by:

CmGetDeviceRegKeyPath