# CVE-2026-96023 — wpncore.dll patch diff

`wpncore.dll` 10.0.26100.9711 -> 10.0.26100.9818 (ghidriff).

## `CreateEndpoint<RegistrationEndpointFacade,IWpnRegistrationEndpoint>`  (modified)

```diff
--- CreateEndpoint<RegistrationEndpointFacade,IWpnRegistrationEndpoint>
+++ CreateEndpoint<RegistrationEndpointFacade,IWpnRegistrationEndpoint>
@@ -1,88 +1,33 @@
 

-/* WARNING: Instruction at (ram,0x000180011f92) overlaps instruction at (ram,0x000180011f90)

-    */

+/* WARNING: Removing unreachable block (ram,0x000180025585) */

+/* long __cdecl CreateEndpoint<class RegistrationEndpointFacade,struct

+   IWpnRegistrationEndpoint>(struct IWpnRegistrationEndpoint * __ptr64 * __ptr64,struct

+   IPlatformConfigurationProvider * __ptr64) */

 

 long __cdecl

 CreateEndpoint<RegistrationEndpointFacade,IWpnRegistrationEndpoint>

           (IWpnRegistrationEndpoint **param_1,IPlatformConfigurationProvider *param_2)

 

 {

-  int iVar1;

-  undefined8 *puVar2;

-  _Tree_node<std::pair<unsigned_long_const_,Microsoft::WRL::AgileRef>,void*___ptr64> *p_Var3;

-  undefined8 *unaff_RBX;

-  longlong unaff_RBP;

-  undefined8 *unaff_RDI;

-  undefined8 in_R9;

-  undefined8 unaff_R13;

-  _Tree_val<std::_Tree_simple_types<std::pair<unsigned_long_const_,Microsoft::WRL::AgileRef>_>_>

-  *unaff_R14;

-  basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>

-  *unaff_R15;

+  RegistrationEndpointFacade *this;

+  IWpnRegistrationEndpoint *pIVar1;

+  void *unaff_retaddr;

   

-  do {

-    puVar2 = unaff_RBX;

-    *(undefined4 *)(unaff_RBP + -0x18) = 1;

-    unaff_RBX = (undefined8 *)*puVar2;

-    while( true ) {

-      if (*(char *)((longlong)unaff_RBX + 0x19) != '\0') {

-        if ((*(char *)((longlong)puVar2 + 0x19) == '\0') &&

-           (iVar1 = std::

-                    basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>

-                    ::compare(unaff_R15,

-                              (basic_string<unsigned_short,struct_std::char_traits<unsigned_short>,class_std::allocator<unsigned_short>_>

-                               *)(puVar2 + 4)), -1 < iVar1)) {

-          *unaff_RDI = puVar2;

-          *(undefined1 *)(unaff_RDI + 1) = 0;

-        }

-        else {

-          if (*(longlong *)(unaff_R14 + 8) == 0x333333333333333) {

+  if (param_1 == (IWpnRegistrationEndpoint **)0x0) {

                     /* WARNING: Subroutine does not return */

-            std::_Throw_tree_length_error();

-          }

-          *(basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>

-            **)(unaff_RBP + 0x30) = unaff_R15;

-          puVar2 = std::

-                   _Tree_temp_node<std::allocator<std::_Tree_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,`DataChangedEvent::Invoke'::__l3::DataChangedEventCollection>,void_*>_>_>

-                   ::

-                   _Tree_temp_node<std::allocator<std::_Tree_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,_DataChangedEvent::Invoke_::__l3::DataChangedEventCollection>,void_*>_>_><std::piecewise_construct_t_const_&,std::tuple<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_&&>,std::tuple<>_>

-                             ((undefined8 *)(unaff_RBP + -0x30),unaff_R14,unaff_R13,in_R9,

-                              (undefined8 *)(unaff_RBP + 0x30));

-          p_Var3 = (_Tree_node<std::pair<unsigned_long_const_,Microsoft::WRL::AgileRef>,void*___ptr64>

-                    *)puVar2[1];

-          puVar2[1] = 0;

-          if (*(longlong *)(unaff_RBP + -0x28) != 0) {

-            std::

-            pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,`DataChangedEvent::Invoke'::__l3::DataChangedEventCollection>

-            ::

-            ~pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,_DataChangedEvent::Invoke_::__l3::DataChangedEventCollection>

-                      ((pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

-                        *)(*(longlong *)(unaff_RBP + -0x28) + 0x20));

-            if (*(void **)(unaff_RBP + -0x28) != (void *)0x0) {

-              std::_Deallocate<16,0>(*(void **)(unaff_RBP + -0x28),0x50);

-            }

-          }

-          *(undefined8 *)(unaff_RBP + -0x20) = *(undefined8 *)(unaff_RBP + -0x20);

-          *(undefined8 *)(unaff_RBP + -0x18) = *(undefined8 *)(unaff_RBP + -0x18);

-          p_Var3 = std::

-                   _Tree_val<std::_Tree_simple_types<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,`DataChangedEvent::Invoke'::__l3::DataChangedEventCollection>_>_>

-                   ::_Insert_node(unaff_R14,(longlong *)(unaff_RBP + -0x20),p_Var3);

-          *unaff_RDI = p_Var3;

-          *(undefined1 *)(unaff_RDI + 1) = 1;

-        }

-        return (long)unaff_RDI;

-      }

-      *(undefined8 **)(unaff_RBP + -0x20) = unaff_RBX;

-      iVar1 = std::

-              basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>

-              ::compare((basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>

-                         *)(unaff_RBX + 4),

-                        (basic_string<unsigned_short,struct_std::char_traits<unsigned_short>,class_std::allocator<unsigned_short>_>

-                         *)unaff_R15);

-      if (-1 < iVar1) break;

-      *(undefined4 *)(unaff_RBP + -0x18) = 0;

-      unaff_RBX = (undefined8 *)unaff_RBX[2];

-    }

-  } while( true );

+    wil::details::in1diag3::_Throw_Hr

+              (unaff_retaddr,0x1c,

+               "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\core\\windowspushnotificationplatform.cpp"

+               ,-0x7ff8ffa9);

+  }

+  *param_1 = (IWpnRegistrationEndpoint *)0x0;

+  this = operator_new(0x68,&std::nothrow);

+  pIVar1 = (IWpnRegistrationEndpoint *)0x0;

+  if (this != (RegistrationEndpointFacade *)0x0) {

+    pIVar1 = (IWpnRegistrationEndpoint *)

+             RegistrationEndpointFacade::RegistrationEndpointFacade(this,param_2);

+  }

+  *param_1 = pIVar1;

+  return 0;

 }
```

## `CreateEndpoint<SettingsEndpointFacade,IWpnSettingsEndpoint>`  (modified)

```diff
--- CreateEndpoint<SettingsEndpointFacade,IWpnSettingsEndpoint>
+++ CreateEndpoint<SettingsEndpointFacade,IWpnSettingsEndpoint>
@@ -1,21 +1,42 @@
 

-/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* long __cdecl CreateEndpoint<class SettingsEndpointFacade,struct IWpnSettingsEndpoint>(struct

+   IWpnSettingsEndpoint * __ptr64 * __ptr64,struct IPlatformConfigurationProvider * __ptr64) */

 

 long __cdecl

 CreateEndpoint<SettingsEndpointFacade,IWpnSettingsEndpoint>

           (IWpnSettingsEndpoint **param_1,IPlatformConfigurationProvider *param_2)

 

 {

-  Windows::Internal::NativeString<Windows::Internal::CoTaskMemPolicy<unsigned_short>_>::_Free

-            ((NativeString<Windows::Internal::CoTaskMemPolicy<unsigned_short>_> *)&stack0x000000a0);

-  Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

-            ((ComPtr<DownloadTaskManager> *)&stack0x00000078);

-  wil::details::

-  unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(void*___ptr64),&void___cdecl_CoTaskMemFree(void*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

-  ::

-  ~unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(void*___ptr64),&void___cdecl_CoTaskMemFree(void*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

-            ((unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(void*___ptr64),&void___cdecl_CoTaskMemFree(void*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

-              *)&stack0x00000068);

-  return 0;

+  longlong lVar1;

+  IPlatformConfigurationProvider *pIVar2;

+  longlong *plVar3;

+  void *unaff_retaddr;

+  IPlatformConfigurationProvider *local_res8;

+  IPlatformConfigurationProvider *local_res10;

+  

+  local_res10 = param_2;

+  if (param_1 != (IWpnSettingsEndpoint **)0x0) {

+    *param_1 = (IWpnSettingsEndpoint *)0x0;

+    plVar3 = (longlong *)

+             Microsoft::WRL::Details::

+             Make<SettingsEndpointFacade,IPlatformConfigurationProvider*___ptr64&___ptr64>

+                       (&local_res8);

+    pIVar2 = local_res8;

+    lVar1 = *plVar3;

+    *plVar3 = 0;

+    if (local_res8 != (IPlatformConfigurationProvider *)0x0) {

+      local_res8 = (IPlatformConfigurationProvider *)0x0;

+      (**(code **)(*(longlong *)pIVar2 + 0x10))();

+    }

+    *param_1 = (IWpnSettingsEndpoint *)(-(ulonglong)(lVar1 != 0) & lVar1 + 0x20U);

+    return 0;

+  }

+                    /* WARNING: Subroutine does not return */

+  wil::details::in1diag3::_Throw_Hr

+            (unaff_retaddr,0x1c,

+             "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\core\\windowspushnotificationplatform.cpp"

+             ,-0x7ff8ffa9);

 }
```

## `SettingsEndpointFacade::RegisterSettingCallback`  (modified)

```diff
--- SettingsEndpointFacade::RegisterSettingCallback
+++ SettingsEndpointFacade::RegisterSettingCallback
@@ -1,2 +1,88 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::RegisterSettingCallback : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::RegisterSettingCallback(enum

+   WPN_SETTING_TYPE,struct IWpnSettingCallback * __ptr64,unsigned long * __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::RegisterSettingCallback

+          (SettingsEndpointFacade *this,WPN_SETTING_TYPE param_1,IWpnSettingCallback *param_2,

+          ulong *param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xf6,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xf8,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::RegisterSettingCallback(pNVar3,param_1,param_2,param_3);

+    if (lVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xfa,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,lVar2);

+    }

+    if (param_1 == 1) {

+      *(ulong *)(this + 0x50) = *param_3;

+    }

+    else {

+      *(ulong *)(this + 0x4c) = *param_3;

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::RegisterSettingCallback(pNVar3,param_1,param_2,param_3);

+    if (lVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x10a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,lVar2);

+    }

+    if (param_1 == 1) {

+      *(ulong *)(this + 0x50) = *param_3;

+    }

+    else {

+      *(ulong *)(this + 0x4c) = *param_3;

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return 0;

+}

+
```

## `SettingsEndpointFacade::QueryMobileBroadbandUsage`  (modified)

```diff
--- SettingsEndpointFacade::QueryMobileBroadbandUsage
+++ SettingsEndpointFacade::QueryMobileBroadbandUsage
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryMobileBroadbandUsage : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryMobileBroadbandUsage(unsigned __int64 *

+   __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryMobileBroadbandUsage(SettingsEndpointFacade *this,__uint64 *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x18b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x18d,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandUsage(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandUsage(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::GetRegisteredHandlersFromParent`  (modified)

```diff
--- RegistrationEndpointFacade::GetRegisteredHandlersFromParent
+++ RegistrationEndpointFacade::GetRegisteredHandlersFromParent
@@ -1,2 +1,62 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::GetRegisteredHandlersFromParent : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::GetRegisteredHandlersFromParent(unsigned

+   short const * __ptr64,struct INotificationHandlerCollection * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::GetRegisteredHandlersFromParent

+          (RegistrationEndpointFacade *this,ushort *param_1,INotificationHandlerCollection **param_2

+          )

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xcf,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xd1,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandlersFromParent(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandlersFromParent(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability`  (modified)

```diff
--- RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability
+++ RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability
@@ -1,2 +1,66 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl

+   RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability(unsigned short const *

+   __ptr64,unsigned short const * __ptr64,struct INotificationHandlerCollection * __ptr64 * __ptr64)

+   __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability

+          (RegistrationEndpointFacade *this,ushort *param_1,ushort *param_2,

+          INotificationHandlerCollection **param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xe2,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xe4,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandlersFromParentWithCapability

+                      (pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandlersFromParentWithCapability

+                      (pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::GetPayloadForNotificationId`  (modified)

```diff
--- PresentationEndpointFacade::GetPayloadForNotificationId
+++ PresentationEndpointFacade::GetPayloadForNotificationId
@@ -1,2 +1,67 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::GetPayloadForNotificationId : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::GetPayloadForNotificationId(unsigned

+   long,unsigned short * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::GetPayloadForNotificationId

+          (PresentationEndpointFacade *this,ulong param_1,ushort **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x20c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x38));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x20f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::GetPayloadForNotificationId

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x38));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x215,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::GetPayloadForNotificationId

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryToastWakeupTime`  (modified)

```diff
--- SettingsEndpointFacade::QueryToastWakeupTime
+++ SettingsEndpointFacade::QueryToastWakeupTime
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryToastWakeupTime : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryToastWakeupTime(struct _WPN_FILE_TIME *

+   __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryToastWakeupTime(SettingsEndpointFacade *this,_WPN_FILE_TIME *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1b7,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1b9,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryToastWakeupTime(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryToastWakeupTime(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastClearRollover`  (modified)

```diff
--- PresentationEndpointFacade::ToastClearRollover
+++ PresentationEndpointFacade::ToastClearRollover
@@ -1,2 +1,66 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastClearRollover : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastClearRollover(unsigned short const

+   * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastClearRollover(PresentationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x15b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x15e,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearRollover

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x165,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearRollover

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::GetAssetsFromHandler`  (modified)

```diff
--- PresentationEndpointFacade::GetAssetsFromHandler
+++ PresentationEndpointFacade::GetAssetsFromHandler
@@ -1,2 +1,67 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::GetAssetsFromHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::GetAssetsFromHandler(unsigned short

+   const * __ptr64,struct IHandlerAssetCollection * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::GetAssetsFromHandler

+          (PresentationEndpointFacade *this,ushort *param_1,IHandlerAssetCollection **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1b6,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1b9,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::GetAssetsFromHandler

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1c0,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::GetAssetsFromHandler

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryAppSetting`  (modified)

```diff
--- SettingsEndpointFacade::QueryAppSetting
+++ SettingsEndpointFacade::QueryAppSetting
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryAppSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryAppSetting(unsigned short const *

+   __ptr64,enum WPN_SETTING_TYPE,int * __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryAppSetting

+          (SettingsEndpointFacade *this,ushort *param_1,WPN_SETTING_TYPE param_2,int *param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x37,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x39,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::TileCloseSession`  (modified)

```diff
--- PresentationEndpointFacade::TileCloseSession
+++ PresentationEndpointFacade::TileCloseSession
@@ -1,2 +1,68 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::TileCloseSession : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::TileCloseSession(unsigned long) __ptr64

+    */

+

+long __thiscall

+PresentationEndpointFacade::TileCloseSession(PresentationEndpointFacade *this,ulong param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x3d,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x40,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileCloseSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x47,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileCloseSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastRequestAllNotifications`  (modified)

```diff
--- PresentationEndpointFacade::ToastRequestAllNotifications
+++ PresentationEndpointFacade::ToastRequestAllNotifications
@@ -1,2 +1,67 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastRequestAllNotifications : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastRequestAllNotifications(unsigned

+   long) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastRequestAllNotifications

+          (PresentationEndpointFacade *this,ulong param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x119,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x11c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastRequestAllNotifications

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x123,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastRequestAllNotifications

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::TileUpdateSession`  (modified)

```diff
--- PresentationEndpointFacade::TileUpdateSession
+++ PresentationEndpointFacade::ToastSuppress
@@ -1,70 +1,66 @@
 

-/* public: virtual long __cdecl PresentationEndpointFacade::TileUpdateSession(unsigned long,struct

-   __MIDL___MIDL_itf_wpnplatform_0000_0023_0001 const * __ptr64,unsigned long) __ptr64 */

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastSuppress(unsigned short const *

+   __ptr64) __ptr64 */

 

 long __thiscall

-PresentationEndpointFacade::TileUpdateSession

-          (PresentationEndpointFacade *this,ulong param_1,

-          __MIDL___MIDL_itf_wpnplatform_0000_0023_0001 *param_2,ulong param_3)

+PresentationEndpointFacade::ToastSuppress(PresentationEndpointFacade *this,ushort *param_1)

 

 {

   bool bVar1;

   long lVar2;

-  void *unaff_retaddr;

-  longlong local_18;

-  srwlock *local_10;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

   

   bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

   if (bVar1) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_10 = &Wns::s_platformLock;

+    local_res20 = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x53,

+                (unaff_retaddr,0xed,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

     Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_18 == 0) {

+    if (local_res18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x56,

+                (unaff_retaddr,0xf0,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::TileUpdateSession

-                      ((PresentationEndpointImpl *)(this + 0x78),

-                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3);

+    lVar2 = PresentationEndpointImpl::ToastSuppress

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

+    ::StrongRef::Release((StrongRef *)&local_res18);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_10);

+                *)&local_res20);

   }

   else {

     Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_18 == 0) {

+    if (local_res18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x5d,

+                (unaff_retaddr,0xf7,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::TileUpdateSession

-                      ((PresentationEndpointImpl *)(this + 0x78),

-                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3);

+    lVar2 = PresentationEndpointImpl::ToastSuppress

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

+    ::StrongRef::Release((StrongRef *)&local_res18);

   }

   return lVar2;

 }
```

## `PresentationEndpointFacade::TileUpdateSession`  (modified)

```diff
--- PresentationEndpointFacade::TileUpdateSession
+++ PresentationEndpointFacade::TileUpdateSession
@@ -1,2 +1,70 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::TileUpdateSession : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::TileUpdateSession(unsigned long,struct

+   __MIDL___MIDL_itf_wpnplatform_0000_0023_0001 const * __ptr64,unsigned long) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::TileUpdateSession

+          (PresentationEndpointFacade *this,ulong param_1,

+          __MIDL___MIDL_itf_wpnplatform_0000_0023_0001 *param_2,ulong param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x53,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x56,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileUpdateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x5d,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileUpdateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::ChangeAppSetting`  (modified)

```diff
--- SettingsEndpointFacade::ChangeAppSetting
+++ SettingsEndpointFacade::ChangeAppSetting
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ChangeAppSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ChangeAppSetting(unsigned short const *

+   __ptr64,enum WPN_SETTING_TYPE,int) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::ChangeAppSetting

+          (SettingsEndpointFacade *this,ushort *param_1,WPN_SETTING_TYPE param_2,int param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x4e,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x50,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::ChangeAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::ChangeAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ResolveTextLanguage`  (modified)

```diff
--- PresentationEndpointFacade::ResolveTextLanguage
+++ PresentationEndpointFacade::ResolveTextLanguage
@@ -1,2 +1,71 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ResolveTextLanguage : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl PresentationEndpointFacade::ResolveTextLanguage(unsigned short const

+   * __ptr64,unsigned short const * __ptr64,unsigned short const * __ptr64,unsigned short * __ptr64

+   * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ResolveTextLanguage

+          (PresentationEndpointFacade *this,ushort *param_1,ushort *param_2,ushort *param_3,

+          ushort **param_4)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x240,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x243,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 8))

+                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x24a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 8))

+                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ResolveMsAppDataPath`  (modified)

```diff
--- PresentationEndpointFacade::ResolveMsAppDataPath
+++ PresentationEndpointFacade::ResolveMsAppDataPath
@@ -1,2 +1,69 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ResolveMsAppDataPath : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl PresentationEndpointFacade::ResolveMsAppDataPath(unsigned short

+   const * __ptr64,unsigned short const * __ptr64,unsigned short * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ResolveMsAppDataPath

+          (PresentationEndpointFacade *this,ushort *param_1,ushort *param_2,ushort **param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x259,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x25c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 0x10))

+                      (this + 0x50,&local_18,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x263,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 0x10))

+                      (this + 0x50,&local_18,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastClearAppNotifications`  (modified)

```diff
--- PresentationEndpointFacade::ToastClearAppNotifications
+++ PresentationEndpointFacade::ToastClearAppNotifications
@@ -1,2 +1,67 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastClearAppNotifications : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastClearAppNotifications(unsigned

+   short const * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastClearAppNotifications

+          (PresentationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x145,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x148,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearAppNotifications

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x14f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearAppNotifications

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastCloseSession`  (modified)

```diff
--- PresentationEndpointFacade::ToastCloseSession
+++ PresentationEndpointFacade::ToastCloseSession
@@ -1,2 +1,68 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastCloseSession : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastCloseSession(unsigned long) __ptr64

+    */

+

+long __thiscall

+PresentationEndpointFacade::ToastCloseSession(PresentationEndpointFacade *this,ulong param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xc1,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xc4,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastCloseSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xcb,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastCloseSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryMobileBroadbandUsage`  (modified)

```diff
--- SettingsEndpointFacade::QueryMobileBroadbandUsage
+++ SettingsEndpointImpl::ChangeGlobalSetting
@@ -1,60 +1,108 @@
 

-/* public: virtual long __cdecl SettingsEndpointFacade::QueryMobileBroadbandUsage(unsigned __int64 *

-   __ptr64) __ptr64 */

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

+/* public: static long __cdecl SettingsEndpointImpl::ChangeGlobalSetting(class NotificationPlatform

+   * __ptr64,enum WPN_SETTING_TYPE,int,struct IUnknown * __ptr64) */

 

-long __thiscall

-SettingsEndpointFacade::QueryMobileBroadbandUsage(SettingsEndpointFacade *this,__uint64 *param_1)

+long __cdecl

+SettingsEndpointImpl::ChangeGlobalSetting

+          (NotificationPlatform *param_1,WPN_SETTING_TYPE param_2,int param_3,IUnknown *param_4)

 

 {

-  bool bVar1;

-  long lVar2;

-  NotificationPlatform *pNVar3;

+  longlong *plVar1;

+  bool bVar2;

+  int iVar3;

+  long lVar4;

+  ulonglong uVar5;

+  uint uVar6;

+  ulonglong uVar7;

   void *unaff_retaddr;

-  longlong local_res18;

-  srwlock *local_res20;

+  undefined1 auStack_98 [56];

+  IUnknown local_60 [2];

+  longlong local_50;

+  ulonglong local_40;

   

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

-                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

-                      ::__l2::impl);

-  if (bVar1) {

-    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_res20 = &Wns::s_platformLock;

-    if (Wns::s_platformShutdown != false) {

+  local_40 = __security_cookie ^ (ulonglong)auStack_98;

+  GetContainerUserSid(local_60);

+  if (local_50 == 0) {

+    uVar7 = 1;

+    bVar2 = false;

+    if (param_2 == 1) {

+      bVar2 = true;

+      uVar6 = 0;

+    }

+    else if (param_2 == 4) {

+      bVar2 = true;

+      uVar7 = 3;

+      uVar6 = 2;

+    }

+    else if (param_2 == 8) {

+      uVar6 = 4;

+    }

+    else if (param_2 == 0x40) {

+      uVar6 = 5;

+    }

+    else {

+      if (param_2 != 0x100000) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x260,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                   ,-0x7ff8ffa9);

+      }

+      uVar6 = 7;

+      bVar2 = false;

+    }

+    plVar1 = *(longlong **)(param_1 + 0xe8);

+    if (plVar1 == (longlong *)0x0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x18b,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                (unaff_retaddr,0x264,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

-    if (local_res18 == 0) {

+    if ((param_2 == 4) && (param_3 != 0)) {

+      if (*(ToastWakeupTimerManager **)(param_1 + 0x120) == (ToastWakeupTimerManager *)0x0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x269,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                   ,-0x7fc1fefb);

+      }

+      ToastWakeupTimerManager::CancelWakeupTimer(*(ToastWakeupTimerManager **)(param_1 + 0x120));

+      (**(code **)(*plVar1 + 0xa8))(plVar1);

+    }

+    uVar5 = (ulonglong)uVar6;

+    iVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,uVar5,param_3,2);

+    if (iVar3 < 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x18d,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

-                 ,-0x7fc1fefb);

+                (unaff_retaddr,0x272,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                 ,iVar3);

     }

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

-    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandUsage(pNVar3,param_1);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

-    wil::details::

-    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-    ::

-    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_res20);

+    if ((param_3 != 0) && (bVar2)) {

+      lVar4 = UnblockType(param_1,(__MIDL___MIDL_itf_wpntypes_0000_0000_0005)uVar7);

+      uVar5 = uVar7;

+      if (lVar4 < 0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x276,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                   ,lVar4);

+      }

+    }

+    if ((DAT_0 & 0x10) != 0) {

+      McTemplateU0qtq_EventWriteTransfer(unaff_retaddr,uVar5,(ulonglong)param_2,param_3);

+    }

   }

-  else {

-    Initialize(this + -0x20);

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

-    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandUsage(pNVar3,param_1);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

-  }

-  return lVar2;

+  std::

+  pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+  ::

+  ~pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+            ((pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+              *)local_60);

+  return 0;

 }
```

## `SettingsEndpointImpl::RegisterSettingCallback`  (modified)

```diff
--- SettingsEndpointImpl::RegisterSettingCallback
+++ RegistrationEndpointFacade::RegisterSystemApplication
@@ -1,114 +1,80 @@
 

 /* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

    guard_dispatch_icall */

-/* public: static long __cdecl SettingsEndpointImpl::RegisterSettingCallback(class

-   NotificationPlatform * __ptr64,enum WPN_SETTING_TYPE,struct IWpnSettingCallback *

-   __ptr64,unsigned long * __ptr64) */

+/* public: virtual long __cdecl RegistrationEndpointFacade::RegisterSystemApplication(unsigned short

+   const * __ptr64,unsigned short const * __ptr64,unsigned int,unsigned long,unsigned char *

+   __ptr64) __ptr64 */

 

-long __cdecl

-SettingsEndpointImpl::RegisterSettingCallback

-          (NotificationPlatform *param_1,WPN_SETTING_TYPE param_2,IWpnSettingCallback *param_3,

-          ulong *param_4)

+long __thiscall

+RegistrationEndpointFacade::RegisterSystemApplication

+          (RegistrationEndpointFacade *this,ushort *param_1,ushort *param_2,uint param_3,

+          ulong param_4,uchar *param_5)

 

 {

-  int iVar1;

-  longlong *plVar2;

-  undefined2 uVar3;

-  undefined4 uVar4;

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

   void *unaff_retaddr;

+  longlong local_28;

+  IUnknown *local_20;

+  srwlock *local_18 [2];

   

-  if (param_3 == (IWpnSettingCallback *)0x0) {

-    wil::details::in1diag3::_Log_Hr

-              (unaff_retaddr,0x3ce,

-               "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-               ,-0x7ff8ffa9);

-    if ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) {

-      return -0x7ff8ffa9;

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x92,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

     }

-    if ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0) {

-      return -0x7ff8ffa9;

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x30));

+    if (local_28 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x94,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

     }

-    uVar3 = 0x39;

+    Microsoft::WRL::ComPtr<IWpnSystemRegistrationEndpoint>::

+    ComPtr<IWpnSystemRegistrationEndpoint><RegistrationEndpointFacade>

+              ((ComPtr<IWpnSystemRegistrationEndpoint> *)&local_20,this + -0x10);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_28);

+    lVar2 = RegistrationEndpointImpl::RegisterSystemApplication

+                      (pNVar3,param_1,param_2,param_3,param_4,param_5,local_20);

+    if (local_20 != (IUnknown *)0x0) {

+      (*local_20->lpVtbl->Release)(local_20);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_28);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

   }

   else {

-    if (param_4 != (ulong *)0x0) {

-      if (param_2 == 1) {

-        uVar4 = 0;

-      }

-      else {

-        if (param_2 != 4) {

-          wil::details::in1diag3::_Log_Hr

-                    (unaff_retaddr,0x3dc,

-                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                     ,-0x7ff8ffa9);

-          if ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) {

-            return -0x7ff8ffa9;

-          }

-          if ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0) {

-            return -0x7ff8ffa9;

-          }

-          uVar3 = 0x3b;

-          goto LAB_0;

-        }

-        uVar4 = 2;

-      }

-      plVar2 = *(longlong **)(param_1 + 0xe8);

-      if (plVar2 == (longlong *)0x0) {

-        iVar1 = -0x7fc1fefb;

-        wil::details::in1diag3::_Log_Hr

-                  (unaff_retaddr,0x3e3,

-                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                   ,-0x7fc1fefb);

-        if ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) {

-          return -0x7fc1fefb;

-        }

-        if ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0) {

-          return -0x7fc1fefb;

-        }

-        uVar3 = 0x3c;

-      }

-      else {

-        iVar1 = (**(code **)(*plVar2 + 0x80))(plVar2,uVar4,param_3,param_4);

-        if (-1 < iVar1) {

-          if ((DAT_1 & 8) == 0) {

-            return iVar1;

-          }

-          McTemplateU0qd_EventWriteTransfer

-                    (plVar2,(PCEVENT_DESCRIPTOR)&WPNEND_REGISTER_SETTING_CALLBACK,(ulonglong)param_2

-                     ,*param_4);

-          return iVar1;

-        }

-        wil::details::in1diag3::_Log_Hr

-                  (unaff_retaddr,0x3e6,

-                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                   ,iVar1);

-        if ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) {

-          return iVar1;

-        }

-        if ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0) {

-          return iVar1;

-        }

-        uVar3 = 0x3d;

-      }

-      goto LAB_2;

+    Initialize(this + -0x10);

+    Microsoft::WRL::ComPtr<IWpnSystemRegistrationEndpoint>::

+    ComPtr<IWpnSystemRegistrationEndpoint><RegistrationEndpointFacade>

+              ((ComPtr<IWpnSystemRegistrationEndpoint> *)local_18,this + -0x10);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_28);

+    lVar2 = RegistrationEndpointImpl::RegisterSystemApplication

+                      (pNVar3,param_1,param_2,param_3,param_4,param_5,(IUnknown *)local_18[0]);

+    if (local_18[0] != (srwlock *)0x0) {

+      (*(*(IUnknownVtbl **)&local_18[0]->field_0x0)->Release)((IUnknown *)local_18[0]);

     }

-    wil::details::in1diag3::_Log_Hr

-              (unaff_retaddr,0x3cf,

-               "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-               ,-0x7ff8ffa9);

-    if ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) {

-      return -0x7ff8ffa9;

-    }

-    if ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0) {

-      return -0x7ff8ffa9;

-    }

-    uVar3 = 0x3a;

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_28);

   }

-LAB_0:

-  iVar1 = -0x7ff8ffa9;

-LAB_2:

-  WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar3,

-           &WPP_00912b6861fc335f2cbb59491e908f50_Traceguids,iVar1);

-  return iVar1;

+  return lVar2;

 }
```

## `PresentationEndpointFacade::ToastCreateSession`  (modified)

```diff
--- PresentationEndpointFacade::ToastCreateSession
+++ PresentationEndpointFacade::ToastCreateSession
@@ -1,2 +1,69 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastCreateSession : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastCreateSession(struct

+   IWpnPresentationToastSink * __ptr64,unsigned long * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastCreateSession

+          (PresentationEndpointFacade *this,IWpnPresentationToastSink *param_1,ulong *param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xab,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xae,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastCreateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xb5,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastCreateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ActivateToastActionTrigger`  (modified)

```diff
--- PresentationEndpointFacade::ActivateToastActionTrigger
+++ PresentationEndpointFacade::GetPayloadForNotificationId
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ActivateToastActionTrigger : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::GetPayloadForNotificationId : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `PresentationEndpointFacade::IsFromVailContainer`  (modified)

```diff
--- PresentationEndpointFacade::IsFromVailContainer
+++ PresentationEndpointFacade::ResolveMsAppxPath
@@ -1,67 +1,73 @@
 

-/* public: virtual long __cdecl PresentationEndpointFacade::IsFromVailContainer(unsigned short const

-   * __ptr64,int * __ptr64) __ptr64 */

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl PresentationEndpointFacade::ResolveMsAppxPath(unsigned short const *

+   __ptr64,unsigned short const * __ptr64,unsigned short const * __ptr64,enum

+   DEVICE_SCALE_FACTOR,enum __MIDL___MIDL_itf_wpnplatform_0000_0028_0001,unsigned short * __ptr64 *

+   __ptr64) __ptr64 */

 

 long __thiscall

-PresentationEndpointFacade::IsFromVailContainer

-          (PresentationEndpointFacade *this,ushort *param_1,int *param_2)

+PresentationEndpointFacade::ResolveMsAppxPath

+          (PresentationEndpointFacade *this,ushort *param_1,ushort *param_2,ushort *param_3,

+          DEVICE_SCALE_FACTOR param_4,__MIDL___MIDL_itf_wpnplatform_0000_0028_0001 param_5,

+          ushort **param_6)

 

 {

   bool bVar1;

   long lVar2;

-  PresentationEndpointImpl *unaff_retaddr;

-  longlong local_res20;

-  srwlock *local_18 [2];

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

   

   bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

   if (bVar1) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_18[0] = &Wns::s_platformLock;

+    local_10 = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x2a4,

+                (unaff_retaddr,0x226,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x30));

-    if (local_res20 == 0) {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x2a7,

+                (unaff_retaddr,0x229,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::IsFromVailContainer

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    lVar2 = (*(code *)**(undefined8 **)(this + 0x50))

+                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4,param_5,param_6);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res20);

+    ::StrongRef::Release((StrongRef *)&local_18);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)local_18);

+                *)&local_10);

   }

   else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x30));

-    if (local_res20 == 0) {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x2ae,

+                (unaff_retaddr,0x230,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::IsFromVailContainer

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    lVar2 = (*(code *)**(undefined8 **)(this + 0x50))

+                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4,param_5,param_6);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res20);

+    ::StrongRef::Release((StrongRef *)&local_18);

   }

   return lVar2;

 }
```

## `SettingsEndpointFacade::GetSettingsFromHandler`  (modified)

```diff
--- SettingsEndpointFacade::GetSettingsFromHandler
+++ SettingsEndpointFacade::GetSettingsFromHandler
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::GetSettingsFromHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::GetSettingsFromHandler(unsigned short const

+   * __ptr64,struct INotificationHandlerSettings * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::GetSettingsFromHandler

+          (SettingsEndpointFacade *this,ushort *param_1,INotificationHandlerSettings **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x200,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x202,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::GetSettingsFromHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x30);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::GetSettingsFromHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::PopulateCapableAppsInPackage`  (modified)

```diff
--- SettingsEndpointFacade::PopulateCapableAppsInPackage
+++ SettingsEndpointFacade::PopulateCapableAppsInPackage
@@ -1,2 +1,63 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::PopulateCapableAppsInPackage : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::PopulateCapableAppsInPackage(enum

+   WPN_SETTING_TYPE,unsigned short const * __ptr64,struct

+   __MIDL___MIDL_itf_wpnplatform_0000_0035_0002 * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::PopulateCapableAppsInPackage

+          (SettingsEndpointFacade *this,WPN_SETTING_TYPE param_1,ushort *param_2,

+          __MIDL___MIDL_itf_wpnplatform_0000_0035_0002 **param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xd6,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xd8,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::PopulateCapableAppsInPackage(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::PopulateCapableAppsInPackage(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastClearAppNotifications`  (modified)

```diff
--- PresentationEndpointFacade::ToastClearAppNotifications
+++ PresentationEndpointFacade::ToastUnblockAll
@@ -1,67 +1,64 @@
 

-/* public: virtual long __cdecl PresentationEndpointFacade::ToastClearAppNotifications(unsigned

-   short const * __ptr64) __ptr64 */

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastUnblockAll(void) __ptr64 */

 

-long __thiscall

-PresentationEndpointFacade::ToastClearAppNotifications

-          (PresentationEndpointFacade *this,ushort *param_1)

+long __thiscall PresentationEndpointFacade::ToastUnblockAll(PresentationEndpointFacade *this)

 

 {

   bool bVar1;

   long lVar2;

   PresentationEndpointImpl *unaff_retaddr;

-  longlong local_res18;

-  srwlock *local_res20;

+  longlong local_res10;

+  srwlock *local_res18 [2];

   

   bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

   if (bVar1) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_res20 = &Wns::s_platformLock;

+    local_res18[0] = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x145,

+                (unaff_retaddr,0x103,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

     Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_res18 == 0) {

+    if (local_res10 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x148,

+                (unaff_retaddr,0x106,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::ToastClearAppNotifications

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    lVar2 = PresentationEndpointImpl::UnblockToastsForEachApp

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res10);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

+    ::StrongRef::Release((StrongRef *)&local_res10);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_res20);

+                *)local_res18);

   }

   else {

     Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_res18 == 0) {

+    if (local_res10 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x14f,

+                (unaff_retaddr,0x10d,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::ToastClearAppNotifications

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res18,param_1);

+    lVar2 = PresentationEndpointImpl::UnblockToastsForEachApp

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res10);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

+    ::StrongRef::Release((StrongRef *)&local_res10);

   }

   return lVar2;

 }
```

## `SettingsEndpointFacade::SetToastWakeupTime`  (modified)

```diff
--- SettingsEndpointFacade::SetToastWakeupTime
+++ SettingsEndpointFacade::SetToastWakeupTime
@@ -1,2 +1,77 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::SetToastWakeupTime : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::SetToastWakeupTime(struct _WPN_FILE_TIME)

+   __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::SetToastWakeupTime(SettingsEndpointFacade *this,undefined8 *param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  undefined8 local_res20;

+  srwlock *local_28 [2];

+  undefined8 local_18;

+  undefined4 local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_28[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1cc,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1ce,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res20,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    local_18 = *param_2;

+    local_10 = *(undefined4 *)(param_2 + 1);

+    lVar2 = SettingsEndpointImpl::SetToastWakeupTime(pNVar3,&local_18,local_res20);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_28);

+  }

+  else {

+    Initialize(this + -0x20);

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res18,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    local_18 = *param_2;

+    local_10 = *(undefined4 *)(param_2 + 1);

+    lVar2 = SettingsEndpointImpl::SetToastWakeupTime(pNVar3,&local_18,local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res18);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::UnregisterSystemApplication`  (modified)

```diff
--- RegistrationEndpointFacade::UnregisterSystemApplication
+++ RegistrationEndpointFacade::UnregisterSystemApplication
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UnregisterSystemApplication : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UnregisterSystemApplication(unsigned

+   short const * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UnregisterSystemApplication

+          (RegistrationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xa7,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x30));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xa9,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterSystemApplication(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x10);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterSystemApplication(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::GetRegisteredAssetsForHandler`  (modified)

```diff
--- RegistrationEndpointFacade::GetRegisteredAssetsForHandler
+++ RegistrationEndpointFacade::GetRegisteredAssetsForHandler
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::GetRegisteredAssetsForHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::GetRegisteredAssetsForHandler(unsigned

+   short const * __ptr64,struct IHandlerAssetCollection * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::GetRegisteredAssetsForHandler

+          (RegistrationEndpointFacade *this,ushort *param_1,IHandlerAssetCollection **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x10a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x10c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredAssetsForHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredAssetsForHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::UpdatePhoneVoipRegistration`  (modified)

```diff
--- RegistrationEndpointFacade::UpdatePhoneVoipRegistration
+++ RegistrationEndpointFacade::UpdatePhoneVoipRegistration
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UpdatePhoneVoipRegistration : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UpdatePhoneVoipRegistration(unsigned

+   short const * __ptr64,struct _GUID const * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UpdatePhoneVoipRegistration

+          (RegistrationEndpointFacade *this,ushort *param_1,_GUID *param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x143,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x145,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::UpdatePhoneVoipRegistration(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x18);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::UpdatePhoneVoipRegistration(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::SettingsEndpointFacade`  (modified)

```diff
--- SettingsEndpointFacade::SettingsEndpointFacade
+++ SettingsEndpointFacade::SettingsEndpointFacade
@@ -1,2 +1,68 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::SettingsEndpointFacade : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: __cdecl SettingsEndpointFacade::SettingsEndpointFacade(struct

+   IPlatformConfigurationProvider * __ptr64) __ptr64 */

+

+SettingsEndpointFacade * __thiscall

+SettingsEndpointFacade::SettingsEndpointFacade

+          (SettingsEndpointFacade *this,IPlatformConfigurationProvider *param_1)

+

+{

+  bool bVar1;

+  

+  Microsoft::WRL::FtmBase::FtmBase((FtmBase *)this);

+  *(undefined4 *)(this + 0x44) = 1;

+  *(undefined ***)this =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>

+        ::_vftable_;

+  *(undefined ***)(this + 0x20) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>

+        ::_vftable__for__IWpnSettingsEndpoint__;

+  *(undefined ***)(this + 0x28) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>

+        ::

+        _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x30) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>

+        ::_vftable__for__IWpnSettingsEndpoint2__;

+  *(undefined ***)(this + 0x38) =

+       &

+       _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IFastRundown>__

+  ;

+  if (Microsoft::WRL::Details::ModuleBase::module_ != (ModuleBase *)0x0) {

+    (**(code **)(*(longlong *)Microsoft::WRL::Details::ModuleBase::module_ + 8))();

+  }

+  *(undefined ***)this = &_vftable_;

+  *(undefined ***)(this + 0x20) = &_vftable__for__IWpnSettingsEndpoint__;

+  *(undefined ***)(this + 0x28) =

+       &

+       _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x30) = &_vftable__for__IWpnSettingsEndpoint2__;

+  *(undefined ***)(this + 0x38) =

+       &

+       _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IFastRundown>__

+  ;

+  Wns::NotificationPlatformHandle::NotificationPlatformHandle

+            ((NotificationPlatformHandle *)(this + 0x48),param_1);

+  LOCK();

+  g_Count = g_Count + 1;

+  UNLOCK();

+  *(undefined4 *)(this + 0x6c) = 0;

+  *(undefined4 *)(this + 0x70) = 0;

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    Wns::NotificationPlatformHandle::PlatLazyIniter::Init((PlatLazyIniter *)(this + 0x48));

+  }

+  return this;

+}

+
```

## `SettingsEndpointFacade::ClearTiles`  (modified)

```diff
--- SettingsEndpointFacade::ClearTiles
+++ SettingsEndpointFacade::ClearTiles
@@ -1,2 +1,58 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ClearTiles : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ClearTiles(void) __ptr64 */

+

+long __thiscall SettingsEndpointFacade::ClearTiles(SettingsEndpointFacade *this)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res10;

+  srwlock *local_res18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x14a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res10 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x14c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    lVar2 = SettingsEndpointImpl::ClearTiles(pNVar3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_res18);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    lVar2 = SettingsEndpointImpl::ClearTiles(pNVar3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::ChangeEnergySaverSetting`  (modified)

```diff
--- SettingsEndpointFacade::ChangeEnergySaverSetting
+++ SettingsEndpointFacade::ChangeEnergySaverSetting
@@ -1,2 +1,70 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ChangeEnergySaverSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ChangeEnergySaverSetting(int) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::ChangeEnergySaverSetting(SettingsEndpointFacade *this,int param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  IUnknown *local_res18;

+  IUnknown *local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,99,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == (IUnknown *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x65,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res20,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::ChangeEnergySaverSetting(pNVar3,param_1,local_res20);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x20);

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res18,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::ChangeEnergySaverSetting(pNVar3,param_1,local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res18);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastClearNotification`  (modified)

```diff
--- PresentationEndpointFacade::ToastClearNotification
+++ PresentationEndpointFacade::ToastClearNotification
@@ -1,2 +1,68 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastClearNotification : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastClearNotification(struct

+   __MIDL___MIDL_itf_wpnplatform_0000_0023_0005 const * __ptr64,unsigned long) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastClearNotification

+          (PresentationEndpointFacade *this,__MIDL___MIDL_itf_wpnplatform_0000_0023_0005 *param_1,

+          ulong param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x12f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x132,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearNotification

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x139,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastClearNotification

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::QueryAppSetting`  (modified)

```diff
--- PresentationEndpointFacade::QueryAppSetting
+++ PresentationEndpointFacade::QueryAppSetting
@@ -1,2 +1,67 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::QueryAppSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::QueryAppSetting(unsigned short const *

+   __ptr64,unsigned long * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::QueryAppSetting

+          (PresentationEndpointFacade *this,ushort *param_1,ulong *param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  PresentationEndpointImpl *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x171,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x174,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::QueryAppSetting

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x17b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::QueryAppSetting

+                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ResolveMsAppxPath`  (modified)

```diff
--- PresentationEndpointFacade::ResolveMsAppxPath
+++ PresentationEndpointFacade::ToastClearRollover
@@ -1,73 +1,2 @@
-

-/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

-   guard_dispatch_icall */

-/* public: virtual long __cdecl PresentationEndpointFacade::ResolveMsAppxPath(unsigned short const *

-   __ptr64,unsigned short const * __ptr64,unsigned short const * __ptr64,enum

-   DEVICE_SCALE_FACTOR,enum __MIDL___MIDL_itf_wpnplatform_0000_0028_0001,unsigned short * __ptr64 *

-   __ptr64) __ptr64 */

-

-long __thiscall

-PresentationEndpointFacade::ResolveMsAppxPath

-          (PresentationEndpointFacade *this,ushort *param_1,ushort *param_2,ushort *param_3,

-          DEVICE_SCALE_FACTOR param_4,__MIDL___MIDL_itf_wpnplatform_0000_0028_0001 param_5,

-          ushort **param_6)

-

-{

-  bool bVar1;

-  long lVar2;

-  void *unaff_retaddr;

-  longlong local_18;

-  srwlock *local_10;

-  

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

-                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

-                      ::__l2::impl);

-  if (bVar1) {

-    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_10 = &Wns::s_platformLock;

-    if (Wns::s_platformShutdown != false) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x226,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

-    if (local_18 == 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x229,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    lVar2 = (*(code *)**(undefined8 **)(this + 0x50))

-                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4,param_5,param_6);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

-    wil::details::

-    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-    ::

-    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_10);

-  }

-  else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

-    if (local_18 == 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x230,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    lVar2 = (*(code *)**(undefined8 **)(this + 0x50))

-                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4,param_5,param_6);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

-  }

-  return lVar2;

-}

-

+Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastClearRollover : Error: Decompile error: 
+Marshaling error: Did not see expected closing element
```

## `SettingsEndpointFacade::UnblockAllChannels`  (modified)

```diff
--- SettingsEndpointFacade::UnblockAllChannels
+++ SettingsEndpointFacade::UnblockAllChannels
@@ -1,2 +1,58 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::UnblockAllChannels : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::UnblockAllChannels(void) __ptr64 */

+

+long __thiscall SettingsEndpointFacade::UnblockAllChannels(SettingsEndpointFacade *this)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res10;

+  srwlock *local_res18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1ea,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res10 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1ec,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    lVar2 = SettingsEndpointImpl::UnblockAllChannels(pNVar3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_res18);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    lVar2 = SettingsEndpointImpl::UnblockAllChannels(pNVar3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointImpl::StopVailContainer`  (modified)

```diff
--- PresentationEndpointImpl::StopVailContainer
+++ PresentationEndpointImpl::ToastClearRollover
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointImpl::StopVailContainer : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointImpl::ToastClearRollover : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `RegistrationEndpointFacade::RegisterHandler`  (modified)

```diff
--- RegistrationEndpointFacade::RegisterHandler
+++ RegistrationEndpointFacade::RegisterHandler
@@ -1,2 +1,77 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::RegisterHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl RegistrationEndpointFacade::RegisterHandler(struct

+   INotificationHandler * __ptr64,struct IHandlerAssetCollection * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::RegisterHandler

+          (RegistrationEndpointFacade *this,INotificationHandler *param_1,

+          IHandlerAssetCollection *param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  IUnknown *local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xba,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xbc,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnRegistrationEndpoint2>::

+    ComPtr<IWpnRegistrationEndpoint2><RegistrationEndpointFacade>

+              ((ComPtr<IWpnRegistrationEndpoint2> *)&local_18,this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::RegisterHandler(pNVar3,param_1,param_2,local_18);

+    if (local_18 != (IUnknown *)0x0) {

+      (*local_18->lpVtbl->Release)(local_18);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x28);

+    Microsoft::WRL::ComPtr<IWpnRegistrationEndpoint2>::

+    ComPtr<IWpnRegistrationEndpoint2><RegistrationEndpointFacade>

+              ((ComPtr<IWpnRegistrationEndpoint2> *)&local_10,this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::RegisterHandler(pNVar3,param_1,param_2,(IUnknown *)local_10);

+    if (local_10 != (srwlock *)0x0) {

+      (*(*(IUnknownVtbl **)&local_10->field_0x0)->Release)((IUnknown *)local_10);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `std::make_unique<LaunchIdleTaskWork,0>`  (modified)

```diff
--- std::make_unique<LaunchIdleTaskWork,0>
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_6230>::GetCachedFeatureEnabledState
@@ -1,17 +1,80 @@
 

-/* class std::unique_ptr<class LaunchIdleTaskWork,struct std::default_delete<class

-   LaunchIdleTaskWork> > __cdecl std::make_unique<class LaunchIdleTaskWork,0>(void) */

+/* WARNING: Removing unreachable block (ram,0x0001800e42ef) */

+/* WARNING: Removing unreachable block (ram,0x0001800e42f4) */

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

+/* private: union wil_details_FeatureStateCache __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_6230>::GetCachedFeatureEnabledState(void) __ptr64 */

 

-void __cdecl std::make_unique<LaunchIdleTaskWork,0>(void)

+void __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_6230>::GetCachedFeatureEnabledState

+          (FeatureImpl<__WilFeatureTraits_Feature_6230> *this)

 

 {

-  LaunchIdleTaskWork *this;

-  undefined8 uVar1;

-  undefined8 *in_RCX;

+  uint uVar1;

+  uint uVar2;

+  uint uVar3;

+  uint uVar4;

+  uint *in_RDX;

+  bool bVar5;

+  uint local_res18 [2];

+  undefined *local_res20;

+  undefined4 local_38;

+  undefined4 local_34;

+  undefined4 *local_30;

   

-  this = operator_new(0x30);

-  uVar1 = LaunchIdleTaskWork::LaunchIdleTaskWork(this);

-  *in_RCX = uVar1;

+  in_RDX[0] = 0;

+  uVar3 = Feature_6230__private_cppFeatureState;

+  in_RDX[1] = 0;

+  *in_RDX = Feature_6230__private_cppFeatureState;

+  if (((byte)uVar3 & 6) == 6) {

+    return;

+  }

+  uVar2 = EnsureSubscribedToFeatureConfigurationChanges();

+  GetCurrentFeatureEnabledState(this,(int *)local_res18);

+  uVar3 = *in_RDX;

+  do {

+    uVar1 = uVar3;

+    uVar4 = uVar1 | 0x40000;

+    *in_RDX = uVar4;

+    if ((uVar1 & 4) == 0) {

+      uVar4 = uVar1 & 0xfffffbff | 0x40000 | local_res18[0] & 0x400 | 4;

+      *in_RDX = uVar4;

+    }

+    LOCK();

+    bVar5 = uVar1 != Feature_6230__private_cppFeatureState;

+    uVar3 = uVar1;

+    if (bVar5) {

+      uVar3 = Feature_6230__private_cppFeatureState;

+      uVar4 = Feature_6230__private_cppFeatureState;

+    }

+    Feature_6230__private_cppFeatureState = uVar4;

+    UNLOCK();

+  } while (bVar5);

+  if (((uVar1 & 4) != 0) || (_g_enabledStateManager == 0)) goto LAB_0;

+  AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+  local_res20 = &DAT_1;

+  if ((uVar2 == 0) || (uVar2 != DAT_2)) {

+LAB_3:

+    LOCK();

+    Feature_6230__private_cppFeatureState = Feature_6230__private_cppFeatureState & 0xfffffffb;

+    UNLOCK();

+  }

+  else {

+    local_34 = 0;

+    local_38 = 3;

+    local_30 = &Feature_6230__private_cppFeatureState;

+    bVar5 = details_abi::heap_buffer::push_back((heap_buffer *)&DAT_4,&local_38,0x10);

+    if (!bVar5) goto LAB_3;

+  }

+  unique_any_t<wil::details::unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockExclusive(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>_>

+  ::

+  ~unique_any_t<wil::details::unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockExclusive(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>_>

+            ((unique_any_t<wil::details::unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockExclusive(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>_>

+              *)&local_res20);

+LAB_0:

+  if ((*in_RDX & 2) == 0) {

+    *in_RDX = *in_RDX & 0xfffff63e | local_res18[0] & 0x9c1;

+  }

   return;

 }
```

## `RegistrationEndpointFacade::UnregisterByPackage`  (modified)

```diff
--- RegistrationEndpointFacade::UnregisterByPackage
+++ RegistrationEndpointFacade::UnregisterByPackage
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UnregisterByPackage : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UnregisterByPackage(unsigned short const

+   * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UnregisterByPackage(RegistrationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x67,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x20));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x69,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterByPackage(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterByPackage(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::RegisterApplication`  (modified)

```diff
--- RegistrationEndpointFacade::RegisterApplication
+++ RegistrationEndpointFacade::RegisterApplication
@@ -1,2 +1,78 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::RegisterApplication : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl RegistrationEndpointFacade::RegisterApplication(unsigned short const

+   * __ptr64,unsigned short const * __ptr64,unsigned int,enum WPN_APP_TYPE) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::RegisterApplication

+          (RegistrationEndpointFacade *this,ushort *param_1,ushort *param_2,uint param_3,

+          WPN_APP_TYPE param_4)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x2a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x40));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x2c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 8))(this);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::RegisterApplication

+                      (pNVar3,param_1,param_2,param_3,param_4,(IUnknown *)this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 0x10))(this);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 8))(this);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::RegisterApplication

+                      (pNVar3,param_1,param_2,param_3,param_4,(IUnknown *)this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 0x10))(this);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::UpdateRegistration`  (modified)

```diff
--- RegistrationEndpointFacade::UpdateRegistration
+++ RegistrationEndpointFacade::UpdateRegistration
@@ -1,2 +1,78 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UpdateRegistration : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl RegistrationEndpointFacade::UpdateRegistration(unsigned short const

+   * __ptr64,unsigned short const * __ptr64,unsigned int,enum WPN_APP_TYPE) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UpdateRegistration

+          (RegistrationEndpointFacade *this,ushort *param_1,ushort *param_2,uint param_3,

+          WPN_APP_TYPE param_4)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x3f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x40));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x41,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 8))(this);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::UpdateRegistration

+                      (pNVar3,param_1,param_2,param_3,param_4,(IUnknown *)this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 0x10))(this);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 8))(this);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = RegistrationEndpointImpl::UpdateRegistration

+                      (pNVar3,param_1,param_2,param_3,param_4,(IUnknown *)this);

+    if (this != (RegistrationEndpointFacade *)0x0) {

+      (**(code **)(*(longlong *)this + 0x10))(this);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::RegistrationEndpointFacade`  (modified)

```diff
--- RegistrationEndpointFacade::RegistrationEndpointFacade
+++ RegistrationEndpointFacade::RegistrationEndpointFacade
@@ -1,2 +1,108 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::RegistrationEndpointFacade : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: __cdecl RegistrationEndpointFacade::RegistrationEndpointFacade(struct

+   IPlatformConfigurationProvider * __ptr64) __ptr64 */

+

+RegistrationEndpointFacade * __thiscall

+RegistrationEndpointFacade::RegistrationEndpointFacade

+          (RegistrationEndpointFacade *this,IPlatformConfigurationProvider *param_1)

+

+{

+  NotificationPlatformHandle *this_00;

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *this_01;

+  void *unaff_retaddr;

+  longlong local_res18;

+  

+  *(undefined4 *)(this + 0x3c) = 1;

+  *(undefined ***)this =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::_vftable_;

+  *(undefined ***)(this + 8) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::_vftable__for__IWpnPollingUrlTempCache__;

+  *(undefined ***)(this + 0x10) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::

+        _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x18) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::_vftable__for__IWpnPhoneRegistrationEndpoint__;

+  *(undefined ***)(this + 0x20) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::

+        _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x28) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::_vftable__for__IWpnRegistrationEndpoint2__;

+  *(undefined ***)(this + 0x30) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::

+        _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IFastRundown>__

+  ;

+  if (Microsoft::WRL::Details::ModuleBase::module_ != (ModuleBase *)0x0) {

+    (**(code **)(*(longlong *)Microsoft::WRL::Details::ModuleBase::module_ + 8))();

+  }

+  *(undefined ***)this = &_vftable_;

+  *(undefined ***)(this + 8) = &_vftable__for__IWpnPollingUrlTempCache__;

+  *(undefined ***)(this + 0x10) =

+       &

+       _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x18) = &_vftable__for__IWpnPhoneRegistrationEndpoint__;

+  *(undefined ***)(this + 0x20) =

+       &

+       _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>__

+  ;

+  *(undefined ***)(this + 0x28) = &_vftable__for__IWpnRegistrationEndpoint2__;

+  *(undefined ***)(this + 0x30) =

+       &Microsoft::WRL::

+        RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,IWpnRegistrationEndpoint,IWpnPollingUrlTempCache,IWpnSystemRegistrationEndpoint,IWpnPhoneRegistrationEndpoint,IWpnPackageRegistrationEndpoint,IWpnRegistrationEndpoint2,IFastRundown>

+        ::

+        _vftable__for__Microsoft__WRL__Details__ImplementsHelper<Microsoft::WRL::RuntimeClassFlags<2>,1,IFastRundown>__

+  ;

+  this_00 = (NotificationPlatformHandle *)(this + 0x40);

+  Wns::NotificationPlatformHandle::NotificationPlatformHandle(this_00,param_1);

+  LOCK();

+  g_Count = g_Count + 1;

+  UNLOCK();

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    Wns::NotificationPlatformHandle::PlatLazyIniter::Init((PlatLazyIniter *)this_00);

+    Wns::NotificationPlatformHandle::Get(this_00);

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x11,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    this_01 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = NotificationPlatform::RefreshPreInstallApps(this_01);

+    if (lVar2 < 0) {

+      wil::details::in1diag3::_Log_Hr

+                (unaff_retaddr,0x14,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,lVar2);

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return this;

+}

+
```

## `SettingsEndpointFacade::ChangeMobileBroadbandCap`  (modified)

```diff
--- SettingsEndpointFacade::ChangeMobileBroadbandCap
+++ SettingsEndpointFacade::ChangeMobileBroadbandCap
@@ -1,2 +1,71 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ChangeMobileBroadbandCap : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ChangeMobileBroadbandCap(unsigned long)

+   __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::ChangeMobileBroadbandCap(SettingsEndpointFacade *this,ulong param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  IUnknown *local_res18;

+  IUnknown *local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x174,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == (IUnknown *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x176,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res20,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::ChangeMobileBroadbandCap(pNVar3,param_1,local_res20);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x20);

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res18,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::ChangeMobileBroadbandCap(pNVar3,param_1,local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res18);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryEnergySaverSetting`  (modified)

```diff
--- SettingsEndpointFacade::QueryEnergySaverSetting
+++ SettingsEndpointFacade::QueryEnergySaverSetting
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryEnergySaverSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryEnergySaverSetting(int * __ptr64)

+   __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryEnergySaverSetting(SettingsEndpointFacade *this,int *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x7a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x7c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryEnergySaverSetting(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryEnergySaverSetting(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointImpl::IsFromVailContainer`  (modified)

```diff
--- PresentationEndpointImpl::IsFromVailContainer
+++ PresentationEndpointImpl::TileRequestNotification
@@ -1,28 +1,196 @@
 

-/* public: long __cdecl PresentationEndpointImpl::IsFromVailContainer(class

-   Wns::NotificationPlatformPtr & __ptr64,unsigned short const * __ptr64,int * __ptr64) __ptr64 */

+/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

+/* public: long __cdecl PresentationEndpointImpl::TileRequestNotification(class

+   Wns::NotificationPlatformPtr & __ptr64,struct __MIDL___MIDL_itf_wpnplatform_0000_0023_0002 const

+   * __ptr64,unsigned long) __ptr64 */

 

 long __thiscall

-PresentationEndpointImpl::IsFromVailContainer

-          (PresentationEndpointImpl *this,NotificationPlatformPtr *param_1,ushort *param_2,

-          int *param_3)

+PresentationEndpointImpl::TileRequestNotification

+          (PresentationEndpointImpl *this,NotificationPlatformPtr *param_1,

+          __MIDL___MIDL_itf_wpnplatform_0000_0023_0002 *param_2,ulong param_3)

 

 {

-  bool bVar1;

-  NotificationPlatform *pNVar2;

+  ITileQueueManager *pIVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  ComPtr<DownloadTaskManager> *this_00;

+  undefined2 uVar4;

+  RequestNotificationWork *pRVar5;

+  RequestNotificationWork *pRVar6;

+  ulonglong uVar8;

   void *unaff_retaddr;

+  undefined1 auStackY_a8 [32];

+  ThreadPool *local_78;

+  undefined8 local_70;

+  undefined4 local_68;

+  _EVENT_DATA_DESCRIPTOR local_60;

+  ulonglong local_50;

+  RequestNotificationWork *pRVar7;

   

-  *param_3 = 0;

-  pNVar2 = Wns::NotificationPlatformPtr::Get(param_1);

-  if (*(WpnContainerManager **)(pNVar2 + 0x160) == (WpnContainerManager *)0x0) {

-                    /* WARNING: Subroutine does not return */

-    wil::details::in1diag3::_Throw_Hr

-              (unaff_retaddr,0x5ba,

+  local_50 = __security_cookie ^ (ulonglong)auStackY_a8;

+  pRVar7 = (RequestNotificationWork *)0x0;

+  local_70 = 0;

+  local_68 = 0;

+  pRVar5 = (RequestNotificationWork *)0x0;

+  local_78 = (ThreadPool *)0x0;

+  pRVar6 = pRVar5;

+  if (param_2 == (__MIDL___MIDL_itf_wpnplatform_0000_0023_0002 *)0x0) {

+    wil::details::in1diag3::_Log_Hr

+              (unaff_retaddr,0x184,

                "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-               ,-0x7fc1fefb);

+               ,-0x7ff8ffa9);

+    pRVar6 = pRVar7;

+    lVar2 = -0x7ff8ffa9;

+    if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+       (pRVar6 = pRVar5, lVar2 = -0x7ff8ffa9, (WPP_GLOBAL_Control[0x1c] & 0x80) == 0))

+    goto LAB_0;

+    uVar4 = 0x1b;

+LAB_1:

+    lVar2 = -0x7ff8ffa9;

   }

-  bVar1 = WpnContainerManager::IsVailOrigin(*(WpnContainerManager **)(pNVar2 + 0x160),param_2);

-  *param_3 = (uint)bVar1;

-  return 0;

+  else {

+    if (param_3 == 0) {

+      lVar2 = -0x7ff8ffa9;

+      wil::details::in1diag3::_Log_Hr

+                (unaff_retaddr,0x187,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                 ,-0x7ff8ffa9);

+      if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+         ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+      uVar4 = 0x1c;

+      goto LAB_1;

+    }

+    if (*(int *)(this + 0x10) == 0) {

+      lVar2 = -0x7fffbffb;

+      wil::details::in1diag3::_Log_Hr

+                (unaff_retaddr,0x191,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                 ,-0x7fffbffb);

+      if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+         ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+      uVar4 = 0x1d;

+      lVar2 = -0x7fffbffb;

+      pRVar7 = pRVar5;

+    }

+    else {

+      pNVar3 = Wns::NotificationPlatformPtr::Get(param_1);

+      pIVar1 = *(ITileQueueManager **)(pNVar3 + 0x98);

+      if (pIVar1 == (ITileQueueManager *)0x0) {

+        lVar2 = -0x7fc1fefb;

+        wil::details::in1diag3::_Log_Hr

+                  (unaff_retaddr,0x197,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                   ,-0x7fc1fefb);

+        if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+           ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+        uVar4 = 0x1e;

+        lVar2 = -0x7fc1fefb;

+        pRVar7 = pRVar5;

+      }

+      else {

+        pNVar3 = Wns::NotificationPlatformPtr::Get(param_1);

+        Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+                  ((ComPtr<DownloadTaskManager> *)&local_78);

+        Microsoft::WRL::ComPtr<IWpnNotification>::InternalAddRef

+                  ((ComPtr<IWpnNotification> *)(pNVar3 + 0x30));

+        local_78 = *(ThreadPool **)(pNVar3 + 0x30);

+        pRVar6 = (RequestNotificationWork *)0x0;

+        if (local_78 == (ThreadPool *)0x0) {

+          lVar2 = -0x7fc1fefb;

+          wil::details::in1diag3::Return_Hr

+                    (unaff_retaddr,0x400,

+                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\platform.cpp"

+                     ,-0x7fc1fefb);

+          wil::details::in1diag3::_Log_Hr

+                    (unaff_retaddr,0x19a,

+                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                     ,-0x7fc1fefb);

+          pRVar6 = pRVar5;

+          if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+             ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+          uVar4 = 0x1f;

+        }

+        else {

+          pRVar5 = operator_new(0x48,&std::nothrow);

+          local_60.Ptr = (ULONGLONG)pRVar5;

+          if (pRVar5 != (RequestNotificationWork *)0x0) {

+            *(undefined ***)pRVar5 = &RequestNotificationWork::_vftable_;

+            *(undefined8 *)(pRVar5 + 0x28) = 0;

+            *(undefined4 *)(pRVar5 + 0x30) = 0;

+            *(undefined8 *)(pRVar5 + 0x40) = 0;

+            *(undefined8 *)(pRVar5 + 8) = 0;

+            *(undefined8 *)(pRVar5 + 0x10) = 0;

+            *(undefined8 *)(pRVar5 + 0x18) = 0;

+            *(undefined8 *)(pRVar5 + 0x20) = 0;

+            pRVar6 = pRVar5;

+            if (pRVar5 != (RequestNotificationWork *)0x0) {

+              WpnCallbackReference::Set

+                        ((WpnCallbackReference *)&local_70,*(IGlobalInterfaceTable **)(this + 8),

+                         *(ulong *)(this + 0x10));

+              uVar8 = (ulonglong)param_3;

+              lVar2 = RequestNotificationWork::Initialize

+                                (pRVar5,pIVar1,param_3,param_2,(WpnCallbackReference *)&local_70);

+              if (lVar2 < 0) {

+                wil::details::in1diag3::_Log_Hr

+                          (unaff_retaddr,0x1a5,

+                           "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                           ,lVar2);

+                if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+                   ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+                uVar4 = 0x21;

+                pRVar7 = pRVar5;

+              }

+              else {

+                if ((DAT_2 & 8) != 0) {

+                  EtwTileRequestNotificationDetail(param_3,(longlong)param_2);

+                }

+                if ((DAT_3 & 0x10) != 0) {

+                  McGenEventWrite_EventWriteTransfer

+                            (&WPNCORE_PROVIDER_GUID_Context,

+                             (PCEVENT_DESCRIPTOR)&WPNUI_REQUEST_NOTIFICATION_ENTRY,uVar8,1,&local_60

+                            );

+                }

+                pRVar7 = (RequestNotificationWork *)0x0;

+                pRVar6 = (RequestNotificationWork *)0x0;

+                local_60.Ptr = 0;

+                lVar2 = ThreadPool::Submit(local_78,(WorkItem *)pRVar5);

+                if (((-1 < lVar2) ||

+                    (wil::details::in1diag3::_Log_Hr

+                               (unaff_retaddr,0x1b0,

+                                "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                                ,lVar2), (undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control))

+                   || ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+                uVar4 = 0x22;

+              }

+              goto LAB_4;

+            }

+          }

+          lVar2 = -0x7ff8fff2;

+          wil::details::in1diag3::_Log_Hr

+                    (unaff_retaddr,0x1a0,

+                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                     ,-0x7ff8fff2);

+          if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+             ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+          uVar4 = 0x20;

+          lVar2 = -0x7ff8fff2;

+          pRVar7 = pRVar6;

+        }

+      }

+    }

+  }

+LAB_4:

+  WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar4,

+           &WPP_f86653231d4b3b29a022f81d4ab9e3bd_Traceguids,lVar2);

+  pRVar6 = pRVar7;

+LAB_0:

+  this_00 = (ComPtr<DownloadTaskManager> *)&local_78;

+  Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease(this_00);

+  if (pRVar6 != (RequestNotificationWork *)0x0) {

+    std::default_delete<SebEvents>::operator()

+              ((default_delete<SebEvents> *)this_00,(SebEvents *)pRVar6);

+  }

+  WpnCallbackReference::Release((WpnCallbackReference *)&local_70);

+  return lVar2;

 }
```

## `SettingsEndpointFacade::WakeupToasts`  (modified)

```diff
--- SettingsEndpointFacade::WakeupToasts
+++ SettingsEndpointFacade::WakeupToasts
@@ -1,2 +1,69 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::WakeupToasts : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::WakeupToasts(void) __ptr64 */

+

+long __thiscall SettingsEndpointFacade::WakeupToasts(SettingsEndpointFacade *this)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  IUnknown *local_res10;

+  IUnknown *local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x229,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x20));

+    if (local_res10 == (IUnknown *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x22b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res18,this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    lVar2 = SettingsEndpointImpl::WakeupToasts(pNVar3,local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res18);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x28);

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res10,this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::WakeupToasts(pNVar3,local_res10);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res10);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::UnregisterSettingCallback`  (modified)

```diff
--- SettingsEndpointFacade::UnregisterSettingCallback
+++ SettingsEndpointFacade::UnregisterSettingCallback
@@ -1,2 +1,86 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::UnregisterSettingCallback : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::UnregisterSettingCallback(unsigned long)

+   __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::UnregisterSettingCallback(SettingsEndpointFacade *this,ulong param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x121,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x123,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::UnregisterSettingCallback(pNVar3,param_1);

+    if (lVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x125,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,lVar2);

+    }

+    if (param_1 == *(ulong *)(this + 0x4c)) {

+      *(undefined4 *)(this + 0x4c) = 0;

+    }

+    else if (param_1 == *(ulong *)(this + 0x50)) {

+      *(undefined4 *)(this + 0x50) = 0;

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::UnregisterSettingCallback(pNVar3,param_1);

+    if (lVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x135,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,lVar2);

+    }

+    if (param_1 == *(ulong *)(this + 0x4c)) {

+      *(undefined4 *)(this + 0x4c) = 0;

+    }

+    else if (param_1 == *(ulong *)(this + 0x50)) {

+      *(undefined4 *)(this + 0x50) = 0;

+    }

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return 0;

+}

+
```

## `RegistrationEndpointFacade::RemovePhoneVoipRegistration`  (modified)

```diff
--- RegistrationEndpointFacade::RemovePhoneVoipRegistration
+++ RegistrationEndpointFacade::RemovePhoneVoipRegistration
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::RemovePhoneVoipRegistration : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::RemovePhoneVoipRegistration(unsigned

+   short const * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::RemovePhoneVoipRegistration

+          (RegistrationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x156,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x158,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::RemovePhoneVoipRegistration(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x18);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::RemovePhoneVoipRegistration(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryToastWakeupTime`  (modified)

```diff
--- SettingsEndpointFacade::QueryToastWakeupTime
+++ SettingsEndpointImpl::ChangeMobileBroadbandCap
@@ -1,60 +1,109 @@
 

-/* public: virtual long __cdecl SettingsEndpointFacade::QueryToastWakeupTime(struct _WPN_FILE_TIME *

-   __ptr64) __ptr64 */

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

+/* public: static long __cdecl SettingsEndpointImpl::ChangeMobileBroadbandCap(class

+   NotificationPlatform * __ptr64,unsigned long,struct IUnknown * __ptr64) */

 

-long __thiscall

-SettingsEndpointFacade::QueryToastWakeupTime(SettingsEndpointFacade *this,_WPN_FILE_TIME *param_1)

+long __cdecl

+SettingsEndpointImpl::ChangeMobileBroadbandCap

+          (NotificationPlatform *param_1,ulong param_2,IUnknown *param_3)

 

 {

-  bool bVar1;

-  long lVar2;

-  NotificationPlatform *pNVar3;

+  longlong *plVar1;

+  int iVar2;

+  long lVar3;

   void *unaff_retaddr;

-  longlong local_res18;

-  srwlock *local_res20;

+  undefined1 auStack_78 [48];

+  int local_48;

+  int local_44;

+  IUnknown local_40 [2];

+  longlong local_30;

+  ulonglong local_20;

   

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

-                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

-                      ::__l2::impl);

-  if (bVar1) {

-    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_res20 = &Wns::s_platformLock;

-    if (Wns::s_platformShutdown != false) {

+  local_20 = __security_cookie ^ (ulonglong)auStack_78;

+  GetContainerUserSid(local_40);

+  if (local_30 == 0) {

+    if (param_2 - 1 < 0xfffff) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x1b7,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                (unaff_retaddr,0x47a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                 ,-0x7ff8ffa9);

+    }

+    plVar1 = *(longlong **)(param_1 + 0xe8);

+    if (plVar1 == (longlong *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x47d,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

-    if (local_res18 == 0) {

+    local_48 = 0;

+    iVar2 = (**(code **)(*plVar1 + 0x70))(plVar1,&local_48);

+    if (iVar2 < 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x1b9,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

-                 ,-0x7fc1fefb);

+                (unaff_retaddr,0x480,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                 ,iVar2);

     }

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

-    lVar2 = SettingsEndpointImpl::QueryToastWakeupTime(pNVar3,param_1);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

-    wil::details::

-    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-    ::

-    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_res20);

+    iVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,6,param_2);

+    if (iVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x485,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                 ,iVar2);

+    }

+    local_44 = 0;

+    iVar2 = (**(code **)(*plVar1 + 0x70))(plVar1,&local_44);

+    if (iVar2 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x488,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                 ,iVar2);

+    }

+    if (local_48 != local_44) {

+      if (local_44 != 0) {

+        lVar3 = UnblockType(param_1,1);

+        if (lVar3 < 0) {

+                    /* WARNING: Subroutine does not return */

+          wil::details::in1diag3::_Throw_Hr

+                    (unaff_retaddr,0x49f,

+                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                     ,lVar3);

+        }

+      }

+      lVar3 = InvokeMobileBroadbandCallback(param_1);

+      if (lVar3 < 0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x4a2,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                   ,lVar3);

+      }

+      lVar3 = InvokeImageDownloadPolicyCallback(param_1);

+      if (lVar3 < 0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x4a4,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

+                   ,lVar3);

+      }

+    }

+    if ((DAT_0 & 8) != 0) {

+      McTemplateU0x_EventWriteTransfer

+                (unaff_retaddr,(PCEVENT_DESCRIPTOR)&WPNEND_MBB_CAP_CHANGE,(ulonglong)param_2);

+    }

   }

-  else {

-    Initialize(this + -0x20);

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

-    lVar2 = SettingsEndpointImpl::QueryToastWakeupTime(pNVar3,param_1);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res18);

-  }

-  return lVar2;

+  std::

+  pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+  ::

+  ~pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+            ((pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

+              *)local_40);

+  return 0;

 }
```

## `RegistrationEndpointFacade::UnregisterApplication`  (modified)

```diff
--- RegistrationEndpointFacade::UnregisterApplication
+++ RegistrationEndpointFacade::UnregisterApplication
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UnregisterApplication : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UnregisterApplication(unsigned short

+   const * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UnregisterApplication(RegistrationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x54,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x40));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x56,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterApplication(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterApplication(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryGlobalSetting`  (modified)

```diff
--- SettingsEndpointFacade::QueryGlobalSetting
+++ SettingsEndpointFacade::QueryGlobalSetting
@@ -1,2 +1,62 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryGlobalSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryGlobalSetting(enum WPN_SETTING_TYPE,int

+   * __ptr64,enum WPN_SETTING_POLICY * __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryGlobalSetting

+          (SettingsEndpointFacade *this,WPN_SETTING_TYPE param_1,int *param_2,

+          WPN_SETTING_POLICY *param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x91,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x93,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryGlobalSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryGlobalSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::QueryMobileBroadbandCap`  (modified)

```diff
--- SettingsEndpointFacade::QueryMobileBroadbandCap
+++ SettingsEndpointFacade::QueryMobileBroadbandCap
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryMobileBroadbandCap : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryMobileBroadbandCap(unsigned long *

+   __ptr64) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryMobileBroadbandCap(SettingsEndpointFacade *this,ulong *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x15f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x161,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandCap(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandCap(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `IdleTaskEndpointImpl::Invoke`  (modified)

```diff
--- IdleTaskEndpointImpl::Invoke
+++ IdleTaskEndpointImpl::Invoke
@@ -1,2 +1,186 @@
-Failed to decompile wpncore.dll - .ProgramDB IdleTaskEndpointImpl::Invoke : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl IdleTaskEndpointImpl::Invoke(void) __ptr64 */

+

+long __thiscall IdleTaskEndpointImpl::Invoke(IdleTaskEndpointImpl *this)

+

+{

+  longlong *plVar1;

+  longlong *plVar2;

+  WorkItem *pWVar3;

+  bool bVar4;

+  long lVar5;

+  NotificationPlatform *pNVar6;

+  int iVar7;

+  void *unaff_retaddr;

+  longlong local_res10;

+  WorkItem *local_res18;

+  ThreadPool *local_res20;

+  srwlock *local_28 [2];

+  

+  bVar4 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_2379728186>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_2379728186> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_2379728186>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_2379728186>::GetImpl(void)'

+                      ::__l2::impl);

+  iVar7 = 0;

+  if (bVar4) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_28[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x19,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x10));

+    if (local_res10 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1c,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    plVar1 = *(longlong **)(pNVar6 + 0x98);

+    if (plVar1 == (longlong *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    local_res20 = (ThreadPool *)0x0;

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Microsoft::WRL::ComPtr<IWpnNotification>::InternalAddRef

+              ((ComPtr<IWpnNotification> *)(pNVar6 + 0x30));

+    local_res20 = *(ThreadPool **)(pNVar6 + 0x30);

+    if (local_res20 == (ThreadPool *)0x0) {

+      wil::details::in1diag3::Return_Hr

+                (unaff_retaddr,0x400,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\platform.cpp"

+                 ,-0x7fc1fefb);

+      iVar7 = -0x7fc1fefb;

+    }

+    if (iVar7 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x22,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,iVar7);

+    }

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    plVar2 = *(longlong **)(pNVar6 + 0xf8);

+    if (plVar2 == (longlong *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x25,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    std::make_unique<LaunchIdleTaskWork,0>();

+    pWVar3 = local_res18;

+    *(undefined2 *)(local_res18 + 8) = 0;

+    local_res18 = (WorkItem *)0x0;

+    lVar5 = ThreadPool::Submit(local_res20,pWVar3);

+    if (lVar5 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x2b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,lVar5);

+    }

+    (**(code **)(*plVar1 + 0x60))(plVar1);

+    (**(code **)(*plVar2 + 0x38))(plVar2);

+    std::unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>::

+    ~unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>

+              ((unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_> *)&local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_28);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x10));

+    if (local_res10 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x35,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    plVar1 = *(longlong **)(pNVar6 + 0x98);

+    if (plVar1 == (longlong *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x38,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    local_res20 = (ThreadPool *)0x0;

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Microsoft::WRL::ComPtr<IWpnNotification>::InternalAddRef

+              ((ComPtr<IWpnNotification> *)(pNVar6 + 0x30));

+    local_res20 = *(ThreadPool **)(pNVar6 + 0x30);

+    if (local_res20 == (ThreadPool *)0x0) {

+      wil::details::in1diag3::Return_Hr

+                (unaff_retaddr,0x400,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\platform.cpp"

+                 ,-0x7fc1fefb);

+      iVar7 = -0x7fc1fefb;

+    }

+    if (iVar7 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x3b,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,iVar7);

+    }

+    pNVar6 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res10);

+    plVar2 = *(longlong **)(pNVar6 + 0xf8);

+    if (plVar2 == (longlong *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x3e,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,-0x7fc1fefb);

+    }

+    std::make_unique<LaunchIdleTaskWork,0>();

+    pWVar3 = local_res18;

+    *(undefined2 *)(local_res18 + 8) = 0;

+    local_res18 = (WorkItem *)0x0;

+    lVar5 = ThreadPool::Submit(local_res20,pWVar3);

+    if (lVar5 < 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x44,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\infra\\idletaskendpointimpl.cpp"

+                 ,lVar5);

+    }

+    (**(code **)(*plVar1 + 0x60))(plVar1);

+    (**(code **)(*plVar2 + 0x38))(plVar2);

+    std::unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>::

+    ~unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>

+              ((unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_> *)&local_res18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res10);

+  }

+  return 0;

+}

+
```

## `PresentationEndpointFacade::StartVailContainer`  (modified)

```diff
--- PresentationEndpointFacade::StartVailContainer
+++ PresentationEndpointFacade::TileUpdateSession
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::StartVailContainer : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::TileUpdateSession : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `RegistrationEndpointFacade::UnregisterHandler`  (modified)

```diff
--- RegistrationEndpointFacade::UnregisterHandler
+++ RegistrationEndpointFacade::UnregisterHandler
@@ -1,2 +1,60 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UnregisterHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UnregisterHandler(unsigned short const *

+   __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UnregisterHandler(RegistrationEndpointFacade *this,ushort *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x11d,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x11f,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterHandler(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res18);

+    lVar2 = RegistrationEndpointImpl::UnregisterHandler(pNVar3,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ResolveTextLanguage`  (modified)

```diff
--- PresentationEndpointFacade::ResolveTextLanguage
+++ PresentationEndpointFacade::TileRequestResourceForeground
@@ -1,71 +1,71 @@
 

-/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

-   guard_dispatch_icall */

-/* public: virtual long __cdecl PresentationEndpointFacade::ResolveTextLanguage(unsigned short const

-   * __ptr64,unsigned short const * __ptr64,unsigned short const * __ptr64,unsigned short * __ptr64

-   * __ptr64) __ptr64 */

+/* public: virtual long __cdecl PresentationEndpointFacade::TileRequestResourceForeground(enum

+   __MIDL___MIDL_itf_wpnplatform_0000_0019_0002,struct __MIDL___MIDL_itf_wpnplatform_0000_0023_0004

+   const * __ptr64,unsigned long) __ptr64 */

 

 long __thiscall

-PresentationEndpointFacade::ResolveTextLanguage

-          (PresentationEndpointFacade *this,ushort *param_1,ushort *param_2,ushort *param_3,

-          ushort **param_4)

+PresentationEndpointFacade::TileRequestResourceForeground

+          (PresentationEndpointFacade *this,__MIDL___MIDL_itf_wpnplatform_0000_0019_0002 param_1,

+          __MIDL___MIDL_itf_wpnplatform_0000_0023_0004 *param_2,ulong param_3)

 

 {

   bool bVar1;

   long lVar2;

   void *unaff_retaddr;

   longlong local_18;

   srwlock *local_10;

   

   bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

   if (bVar1) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

     local_10 = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x240,

+                (unaff_retaddr,0x95,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x48));

     if (local_18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x243,

+                (unaff_retaddr,0x98,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 8))

-                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4);

+    lVar2 = PresentationEndpointImpl::TileRequestResource

+                      ((PresentationEndpointImpl *)(this + 0x70),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,true);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

     ::StrongRef::Release((StrongRef *)&local_18);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

                 *)&local_10);

   }

   else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x48));

     if (local_18 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x24a,

+                (unaff_retaddr,0x9f,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = (**(code **)(*(longlong *)(this + 0x50) + 8))

-                      (this + 0x50,&local_18,param_1,param_2,param_3,param_4);

+    lVar2 = PresentationEndpointImpl::TileRequestResource

+                      ((PresentationEndpointImpl *)(this + 0x70),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,true);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

     ::StrongRef::Release((StrongRef *)&local_18);

   }

   return lVar2;

 }
```

## `SettingsEndpointFacade::QueryMobileBroadbandDates`  (modified)

```diff
--- SettingsEndpointFacade::QueryMobileBroadbandDates
+++ SettingsEndpointFacade::QueryMobileBroadbandDates
@@ -1,2 +1,63 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::QueryMobileBroadbandDates : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::QueryMobileBroadbandDates(struct

+   _WPN_FILE_TIME * __ptr64,struct _WPN_FILE_TIME * __ptr64,enum WPN_MBB_DATE_SOURCE * __ptr64)

+   __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::QueryMobileBroadbandDates

+          (SettingsEndpointFacade *this,_WPN_FILE_TIME *param_1,_WPN_FILE_TIME *param_2,

+          WPN_MBB_DATE_SOURCE *param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1a2,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x1a4,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandDates(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandDates(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::TileCreateSession`  (modified)

```diff
--- PresentationEndpointFacade::TileCreateSession
+++ PresentationEndpointFacade::TileCreateSession
@@ -1,2 +1,68 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::TileCreateSession : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::TileCreateSession(unsigned long *

+   __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::TileCreateSession(PresentationEndpointFacade *this,ulong *param_1)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_res18;

+  srwlock *local_res20;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_res20 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x27,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x2a,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileCreateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_res20);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_res18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x31,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::TileCreateSession

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_res18,param_1);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointImpl::ChangeMobileBroadbandCap`  (modified)

```diff
--- SettingsEndpointImpl::ChangeMobileBroadbandCap
+++ SettingsEndpointImpl::WakeupToasts
@@ -1,109 +1,69 @@
 

 /* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

    guard_dispatch_icall */

 /* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

-/* public: static long __cdecl SettingsEndpointImpl::ChangeMobileBroadbandCap(class

-   NotificationPlatform * __ptr64,unsigned long,struct IUnknown * __ptr64) */

+/* public: static long __cdecl SettingsEndpointImpl::WakeupToasts(class NotificationPlatform *

+   __ptr64,struct IUnknown * __ptr64) */

 

-long __cdecl

-SettingsEndpointImpl::ChangeMobileBroadbandCap

-          (NotificationPlatform *param_1,ulong param_2,IUnknown *param_3)

+long __cdecl SettingsEndpointImpl::WakeupToasts(NotificationPlatform *param_1,IUnknown *param_2)

 

 {

   longlong *plVar1;

   int iVar2;

   long lVar3;

+  undefined8 uVar4;

+  undefined8 in_R8;

   void *unaff_retaddr;

-  undefined1 auStack_78 [48];

-  int local_48;

-  int local_44;

+  undefined1 auStackY_78 [32];

   IUnknown local_40 [2];

   longlong local_30;

-  ulonglong local_20;

+  _EVENT_DATA_DESCRIPTOR local_20;

+  ulonglong local_10;

   

-  local_20 = __security_cookie ^ (ulonglong)auStack_78;

+  local_10 = __security_cookie ^ (ulonglong)auStackY_78;

   GetContainerUserSid(local_40);

   if (local_30 == 0) {

-    if (param_2 - 1 < 0xfffff) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x47a,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                 ,-0x7ff8ffa9);

+    if ((DAT_0 & 8) != 0) {

+      McGenEventWrite_EventWriteTransfer

+                (&WPNCORE_PROVIDER_GUID_Context,(PCEVENT_DESCRIPTOR)&WPNEND_TOAST_WAKEUP_TIMER_FIRED

+                 ,in_R8,1,&local_20);

     }

     plVar1 = *(longlong **)(param_1 + 0xe8);

     if (plVar1 == (longlong *)0x0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x47d,

+                (unaff_retaddr,0x5a3,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    local_48 = 0;

-    iVar2 = (**(code **)(*plVar1 + 0x70))(plVar1,&local_48);

+    (**(code **)(*plVar1 + 0xa8))(plVar1);

+    iVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,2,1,2);

     if (iVar2 < 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x480,

+                (unaff_retaddr,0x5a6,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

                  ,iVar2);

     }

-    iVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,6,param_2);

-    if (iVar2 < 0) {

+    uVar4 = 3;

+    lVar3 = UnblockType(param_1,3);

+    if (lVar3 < 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x485,

+                (unaff_retaddr,0x5a9,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                 ,iVar2);

+                 ,lVar3);

     }

-    local_44 = 0;

-    iVar2 = (**(code **)(*plVar1 + 0x70))(plVar1,&local_44);

-    if (iVar2 < 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x488,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                 ,iVar2);

-    }

-    if (local_48 != local_44) {

-      if (local_44 != 0) {

-        lVar3 = UnblockType(param_1,1);

-        if (lVar3 < 0) {

-                    /* WARNING: Subroutine does not return */

-          wil::details::in1diag3::_Throw_Hr

-                    (unaff_retaddr,0x49f,

-                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                     ,lVar3);

-        }

-      }

-      lVar3 = InvokeMobileBroadbandCallback(param_1);

-      if (lVar3 < 0) {

-                    /* WARNING: Subroutine does not return */

-        wil::details::in1diag3::_Throw_Hr

-                  (unaff_retaddr,0x4a2,

-                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                   ,lVar3);

-      }

-      lVar3 = InvokeImageDownloadPolicyCallback(param_1);

-      if (lVar3 < 0) {

-                    /* WARNING: Subroutine does not return */

-        wil::details::in1diag3::_Throw_Hr

-                  (unaff_retaddr,0x4a4,

-                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpoint.cpp"

-                   ,lVar3);

-      }

-    }

-    if ((DAT_0 & 8) != 0) {

-      McTemplateU0x_EventWriteTransfer

-                (unaff_retaddr,(PCEVENT_DESCRIPTOR)&WPNEND_MBB_CAP_CHANGE,(ulonglong)param_2);

+    if ((DAT_0 & 0x10) != 0) {

+      McTemplateU0qtq_EventWriteTransfer(unaff_retaddr,uVar4,4,1);

     }

   }

   std::

   pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

   ::

   ~pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

             ((pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,unsigned_long>

               *)local_40);

   return 0;

 }
```

## `RegistrationEndpointFacade::CachePollingEntry`  (modified)

```diff
--- RegistrationEndpointFacade::CachePollingEntry
+++ RegistrationEndpointFacade::UpdatePhoneVoipRegistration
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::CachePollingEntry : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UpdatePhoneVoipRegistration : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `PresentationEndpointImpl::TileRequestNotification`  (modified)

```diff
--- PresentationEndpointImpl::TileRequestNotification
+++ PresentationEndpointImpl::UnblockToastsForEachApp
@@ -1,196 +1,140 @@
 

-/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */

-/* public: long __cdecl PresentationEndpointImpl::TileRequestNotification(class

-   Wns::NotificationPlatformPtr & __ptr64,struct __MIDL___MIDL_itf_wpnplatform_0000_0023_0002 const

-   * __ptr64,unsigned long) __ptr64 */

+/* private: long __cdecl PresentationEndpointImpl::UnblockToastsForEachApp(class

+   Wns::NotificationPlatformPtr & __ptr64) __ptr64 */

 

 long __thiscall

-PresentationEndpointImpl::TileRequestNotification

-          (PresentationEndpointImpl *this,NotificationPlatformPtr *param_1,

-          __MIDL___MIDL_itf_wpnplatform_0000_0023_0002 *param_2,ulong param_3)

+PresentationEndpointImpl::UnblockToastsForEachApp

+          (PresentationEndpointImpl *this,NotificationPlatformPtr *param_1)

 

 {

-  ITileQueueManager *pIVar1;

-  long lVar2;

-  NotificationPlatform *pNVar3;

-  ComPtr<DownloadTaskManager> *this_00;

+  ConfigureNotificationDeliveryWork *this_00;

+  long lVar1;

+  NotificationPlatform *pNVar2;

+  undefined8 uVar3;

   undefined2 uVar4;

-  RequestNotificationWork *pRVar5;

-  RequestNotificationWork *pRVar6;

-  ulonglong uVar8;

   void *unaff_retaddr;

-  undefined1 auStackY_a8 [32];

-  ThreadPool *local_78;

-  undefined8 local_70;

-  undefined4 local_68;

-  _EVENT_DATA_DESCRIPTOR local_60;

-  ulonglong local_50;

-  RequestNotificationWork *pRVar7;

+  ThreadPool *local_res8;

+  ConfigureNotificationDeliveryWork *local_res18;

+  ConfigureNotificationDeliveryWork *local_res20;

   

-  local_50 = __security_cookie ^ (ulonglong)auStackY_a8;

-  pRVar7 = (RequestNotificationWork *)0x0;

-  local_70 = 0;

-  local_68 = 0;

-  pRVar5 = (RequestNotificationWork *)0x0;

-  local_78 = (ThreadPool *)0x0;

-  pRVar6 = pRVar5;

-  if (param_2 == (__MIDL___MIDL_itf_wpnplatform_0000_0023_0002 *)0x0) {

+  local_res18 = (ConfigureNotificationDeliveryWork *)0x0;

+  local_res8 = (ThreadPool *)0x0;

+  pNVar2 = Wns::NotificationPlatformPtr::Get(param_1);

+  Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+            ((ComPtr<DownloadTaskManager> *)&local_res8);

+  Microsoft::WRL::ComPtr<IWpnNotification>::InternalAddRef

+            ((ComPtr<IWpnNotification> *)(pNVar2 + 0x30));

+  local_res8 = *(ThreadPool **)(pNVar2 + 0x30);

+  if (local_res8 == (ThreadPool *)0x0) {

+    lVar1 = -0x7fc1fefb;

+    wil::details::in1diag3::Return_Hr

+              (unaff_retaddr,0x400,

+               "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\platform.cpp"

+               ,-0x7fc1fefb);

     wil::details::in1diag3::_Log_Hr

-              (unaff_retaddr,0x184,

+              (unaff_retaddr,0x554,

                "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-               ,-0x7ff8ffa9);

-    pRVar6 = pRVar7;

-    lVar2 = -0x7ff8ffa9;

+               ,-0x7fc1fefb);

     if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

-       (pRVar6 = pRVar5, lVar2 = -0x7ff8ffa9, (WPP_GLOBAL_Control[0x1c] & 0x80) == 0))

-    goto LAB_0;

-    uVar4 = 0x1b;

-LAB_1:

-    lVar2 = -0x7ff8ffa9;

+       ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+    uVar4 = 0x52;

   }

   else {

-    if (param_3 == 0) {

-      lVar2 = -0x7ff8ffa9;

+    local_res20 = operator_new(0x20,&std::nothrow);

+    uVar3 = 0;

+    if (local_res20 != (ConfigureNotificationDeliveryWork *)0x0) {

+      uVar3 = ConfigureNotificationDeliveryWork::ConfigureNotificationDeliveryWork(local_res20);

+    }

+    local_res20 = (ConfigureNotificationDeliveryWork *)uVar3;

+    std::unique_ptr<RegistryHelper,std::default_delete<RegistryHelper>_>::

+    operator=<std::default_delete<RegistryHelper>,0>

+              ((unique_ptr<RegistryHelper,std::default_delete<RegistryHelper>_> *)&local_res18,

+               (unique_ptr<class_RegistryHelper,struct_std::default_delete<class_RegistryHelper>_> *

+               )&local_res20);

+    std::unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>::

+    ~unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>

+              ((unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_> *)&local_res20);

+    this_00 = local_res18;

+    if (local_res18 == (ConfigureNotificationDeliveryWork *)0x0) {

+      lVar1 = -0x7ff8fff2;

       wil::details::in1diag3::_Log_Hr

-                (unaff_retaddr,0x187,

+                (unaff_retaddr,0x557,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                 ,-0x7ff8ffa9);

+                 ,-0x7ff8fff2);

       if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

          ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-      uVar4 = 0x1c;

-      goto LAB_1;

-    }

-    if (*(int *)(this + 0x10) == 0) {

-      lVar2 = -0x7fffbffb;

-      wil::details::in1diag3::_Log_Hr

-                (unaff_retaddr,0x191,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                 ,-0x7fffbffb);

-      if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

-         ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-      uVar4 = 0x1d;

-      lVar2 = -0x7fffbffb;

-      pRVar7 = pRVar5;

+      uVar4 = 0x53;

+      lVar1 = -0x7ff8fff2;

     }

     else {

-      pNVar3 = Wns::NotificationPlatformPtr::Get(param_1);

-      pIVar1 = *(ITileQueueManager **)(pNVar3 + 0x98);

-      if (pIVar1 == (ITileQueueManager *)0x0) {

-        lVar2 = -0x7fc1fefb;

+      lVar1 = ConfigureNotificationDeliveryWork::SetChannelId(local_res18,(ushort *)&u__);

+      if (lVar1 < 0) {

         wil::details::in1diag3::_Log_Hr

-                  (unaff_retaddr,0x197,

+                  (unaff_retaddr,0x55f,

                    "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                   ,-0x7fc1fefb);

+                   ,lVar1);

         if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

            ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-        uVar4 = 0x1e;

-        lVar2 = -0x7fc1fefb;

-        pRVar7 = pRVar5;

+        uVar4 = 0x54;

       }

       else {

-        pNVar3 = Wns::NotificationPlatformPtr::Get(param_1);

-        Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

-                  ((ComPtr<DownloadTaskManager> *)&local_78);

-        Microsoft::WRL::ComPtr<IWpnNotification>::InternalAddRef

-                  ((ComPtr<IWpnNotification> *)(pNVar3 + 0x30));

-        local_78 = *(ThreadPool **)(pNVar3 + 0x30);

-        pRVar6 = (RequestNotificationWork *)0x0;

-        if (local_78 == (ThreadPool *)0x0) {

-          lVar2 = -0x7fc1fefb;

-          wil::details::in1diag3::Return_Hr

-                    (unaff_retaddr,0x400,

-                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\platform.cpp"

-                     ,-0x7fc1fefb);

+        lVar1 = ConfigureNotificationDeliveryWork::SetType(this_00,3);

+        if (lVar1 < 0) {

           wil::details::in1diag3::_Log_Hr

-                    (unaff_retaddr,0x19a,

+                    (unaff_retaddr,0x562,

                      "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                     ,-0x7fc1fefb);

-          pRVar6 = pRVar5;

+                     ,lVar1);

           if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

              ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-          uVar4 = 0x1f;

+          uVar4 = 0x55;

         }

         else {

-          pRVar5 = operator_new(0x48,&std::nothrow);

-          local_60.Ptr = (ULONGLONG)pRVar5;

-          if (pRVar5 != (RequestNotificationWork *)0x0) {

-            *(undefined ***)pRVar5 = &RequestNotificationWork::_vftable_;

-            *(undefined8 *)(pRVar5 + 0x28) = 0;

-            *(undefined4 *)(pRVar5 + 0x30) = 0;

-            *(undefined8 *)(pRVar5 + 0x40) = 0;

-            *(undefined8 *)(pRVar5 + 8) = 0;

-            *(undefined8 *)(pRVar5 + 0x10) = 0;

-            *(undefined8 *)(pRVar5 + 0x18) = 0;

-            *(undefined8 *)(pRVar5 + 0x20) = 0;

-            pRVar6 = pRVar5;

-            if (pRVar5 != (RequestNotificationWork *)0x0) {

-              WpnCallbackReference::Set

-                        ((WpnCallbackReference *)&local_70,*(IGlobalInterfaceTable **)(this + 8),

-                         *(ulong *)(this + 0x10));

-              uVar8 = (ulonglong)param_3;

-              lVar2 = RequestNotificationWork::Initialize

-                                (pRVar5,pIVar1,param_3,param_2,(WpnCallbackReference *)&local_70);

-              if (lVar2 < 0) {

-                wil::details::in1diag3::_Log_Hr

-                          (unaff_retaddr,0x1a5,

-                           "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                           ,lVar2);

-                if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

-                   ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-                uVar4 = 0x21;

-                pRVar7 = pRVar5;

-              }

-              else {

-                if ((DAT_2 & 8) != 0) {

-                  EtwTileRequestNotificationDetail(param_3,(longlong)param_2);

-                }

-                if ((DAT_3 & 0x10) != 0) {

-                  McGenEventWrite_EventWriteTransfer

-                            (&WPNCORE_PROVIDER_GUID_Context,

-                             (PCEVENT_DESCRIPTOR)&WPNUI_REQUEST_NOTIFICATION_ENTRY,uVar8,1,&local_60

-                            );

-                }

-                pRVar7 = (RequestNotificationWork *)0x0;

-                pRVar6 = (RequestNotificationWork *)0x0;

-                local_60.Ptr = 0;

-                lVar2 = ThreadPool::Submit(local_78,(WorkItem *)pRVar5);

-                if (((-1 < lVar2) ||

-                    (wil::details::in1diag3::_Log_Hr

-                               (unaff_retaddr,0x1b0,

-                                "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                                ,lVar2), (undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control))

-                   || ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-                uVar4 = 0x22;

-              }

-              goto LAB_4;

+          lVar1 = ConfigureNotificationDeliveryWork::SetEnabled(this_00,-1);

+          if (lVar1 < 0) {

+            wil::details::in1diag3::_Log_Hr

+                      (unaff_retaddr,0x565,

+                       "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                       ,lVar1);

+            if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+               ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+            uVar4 = 0x56;

+          }

+          else {

+            pNVar2 = Wns::NotificationPlatformPtr::Get(param_1);

+            lVar1 = ConfigureNotificationDeliveryWork::SetPlatform(this_00,pNVar2);

+            if (lVar1 < 0) {

+              wil::details::in1diag3::_Log_Hr

+                        (unaff_retaddr,0x568,

+                         "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                         ,lVar1);

+              if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+                 ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+              uVar4 = 0x57;

+            }

+            else {

+              local_res18 = (ConfigureNotificationDeliveryWork *)0x0;

+              lVar1 = ThreadPool::Submit(local_res8,(WorkItem *)this_00);

+              if (((-1 < lVar1) ||

+                  (wil::details::in1diag3::_Log_Hr

+                             (unaff_retaddr,0x56b,

+                              "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

+                              ,lVar1), (undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control)) ||

+                 ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

+              uVar4 = 0x58;

             }

           }

-          lVar2 = -0x7ff8fff2;

-          wil::details::in1diag3::_Log_Hr

-                    (unaff_retaddr,0x1a0,

-                     "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpointimpl.cpp"

-                     ,-0x7ff8fff2);

-          if (((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

-             ((WPP_GLOBAL_Control[0x1c] & 0x80) == 0)) goto LAB_0;

-          uVar4 = 0x20;

-          lVar2 = -0x7ff8fff2;

-          pRVar7 = pRVar6;

         }

       }

     }

   }

-LAB_4:

   WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar4,

-           &WPP_f86653231d4b3b29a022f81d4ab9e3bd_Traceguids,lVar2);

-  pRVar6 = pRVar7;

+           &WPP_f86653231d4b3b29a022f81d4ab9e3bd_Traceguids,lVar1);

 LAB_0:

-  this_00 = (ComPtr<DownloadTaskManager> *)&local_78;

-  Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease(this_00);

-  if (pRVar6 != (RequestNotificationWork *)0x0) {

-    std::default_delete<SebEvents>::operator()

-              ((default_delete<SebEvents> *)this_00,(SebEvents *)pRVar6);

-  }

-  WpnCallbackReference::Release((WpnCallbackReference *)&local_70);

-  return lVar2;

+  Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+            ((ComPtr<DownloadTaskManager> *)&local_res8);

+  std::unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>::

+  ~unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_>

+            ((unique_ptr<IGlobalSettings,std::default_delete<IGlobalSettings>_> *)&local_res18);

+  return lVar1;

 }
```

## `RegistrationEndpointImpl::UpdatePhoneVoipRegistration`  (modified)

```diff
--- RegistrationEndpointImpl::UpdatePhoneVoipRegistration
+++ IdleTaskEndpointImpl::Invoke
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointImpl::UpdatePhoneVoipRegistration : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB IdleTaskEndpointImpl::Invoke : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `PresentationEndpointFacade::TileRequestResourceForeground`  (modified)

```diff
--- PresentationEndpointFacade::TileRequestResourceForeground
+++ PresentationEndpointFacade::ToastReportStatusWithUserInput
@@ -1,71 +1,110 @@
 

-/* public: virtual long __cdecl PresentationEndpointFacade::TileRequestResourceForeground(enum

-   __MIDL___MIDL_itf_wpnplatform_0000_0019_0002,struct __MIDL___MIDL_itf_wpnplatform_0000_0023_0004

-   const * __ptr64,unsigned long) __ptr64 */

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastReportStatusWithUserInput(unsigned

+   short const * __ptr64,unsigned long,unsigned long,long,unsigned short const * __ptr64,struct

+   IUnknown * __ptr64) __ptr64 */

 

 long __thiscall

-PresentationEndpointFacade::TileRequestResourceForeground

-          (PresentationEndpointFacade *this,__MIDL___MIDL_itf_wpnplatform_0000_0019_0002 param_1,

-          __MIDL___MIDL_itf_wpnplatform_0000_0023_0004 *param_2,ulong param_3)

+PresentationEndpointFacade::ToastReportStatusWithUserInput

+          (PresentationEndpointFacade *this,ushort *param_1,ulong param_2,ulong param_3,long param_4

+          ,ushort *param_5,IUnknown *param_6)

 

 {

-  bool bVar1;

-  long lVar2;

+  _func_5156 *p_Var1;

+  bool bVar2;

+  HRESULT HVar3;

+  long lVar4;

   void *unaff_retaddr;

-  longlong local_18;

-  srwlock *local_10;

+  IPropertySet *local_38;

+  longlong local_30;

+  srwlock *local_28 [2];

   

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+  bVar2 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

-  if (bVar1) {

+  if (bVar2) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_10 = &Wns::s_platformLock;

+    local_28[0] = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x95,

+                (unaff_retaddr,0x1e8,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x48));

-    if (local_18 == 0) {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x40));

+    if (local_30 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x98,

+                (unaff_retaddr,0x1eb,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::TileRequestResource

-                      ((PresentationEndpointImpl *)(this + 0x70),

-                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,true);

+    local_38 = (IPropertySet *)0x0;

+    if (param_6 != (IUnknown *)0x0) {

+      p_Var1 = param_6->lpVtbl->QueryInterface;

+      Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+                ((ComPtr<DownloadTaskManager> *)&local_38);

+      HVar3 = (*p_Var1)(param_6,(IID *)&_GUID_8a43ed9f_f4e6_4421_acf9_1dab2986820c,&local_38);

+      if (HVar3 < 0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x1f0,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                   ,HVar3);

+      }

+    }

+    lVar4 = PresentationEndpointImpl::ToastReportStatusWithUserInput

+                      ((PresentationEndpointImpl *)(this + 0x68),

+                       (NotificationPlatformPtr *)&local_30,param_1,param_2,param_3,param_4,param_5,

+                       local_38);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_38);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

+    ::StrongRef::Release((StrongRef *)&local_30);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_10);

+                *)local_28);

   }

   else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x48));

-    if (local_18 == 0) {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x40));

+    if (local_30 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x9f,

+                (unaff_retaddr,0x1f8,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::TileRequestResource

-                      ((PresentationEndpointImpl *)(this + 0x70),

-                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,true);

+    local_38 = (IPropertySet *)0x0;

+    if (param_6 != (IUnknown *)0x0) {

+      p_Var1 = param_6->lpVtbl->QueryInterface;

+      Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+                ((ComPtr<DownloadTaskManager> *)&local_38);

+      HVar3 = (*p_Var1)(param_6,(IID *)&_GUID_8a43ed9f_f4e6_4421_acf9_1dab2986820c,&local_38);

+      if (HVar3 < 0) {

+                    /* WARNING: Subroutine does not return */

+        wil::details::in1diag3::_Throw_Hr

+                  (unaff_retaddr,0x1fd,

+                   "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                   ,HVar3);

+      }

+    }

+    lVar4 = PresentationEndpointImpl::ToastReportStatusWithUserInput

+                      ((PresentationEndpointImpl *)(this + 0x68),

+                       (NotificationPlatformPtr *)&local_30,param_1,param_2,param_3,param_4,param_5,

+                       local_38);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_38);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

+    ::StrongRef::Release((StrongRef *)&local_30);

   }

-  return lVar2;

+  return lVar4;

 }
```

## `PresentationEndpointFacade::QueryQuietHours`  (modified)

```diff
--- PresentationEndpointFacade::QueryQuietHours
+++ PresentationEndpointFacade::ToastClearAppNotifications
@@ -1,62 +1,2 @@
-

-/* public: virtual long __cdecl PresentationEndpointFacade::QueryQuietHours(int * __ptr64,int *

-   __ptr64) __ptr64 */

-

-long __thiscall

-PresentationEndpointFacade::QueryQuietHours

-          (PresentationEndpointFacade *this,int *param_1,int *param_2)

-

-{

-  bool bVar1;

-  void *unaff_retaddr;

-  longlong local_res20;

-  srwlock *local_18 [2];

-  

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

-                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

-                      ::__l2::impl);

-  if (bVar1) {

-    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_18[0] = &Wns::s_platformLock;

-    if (Wns::s_platformShutdown != false) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x187,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_res20 == 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x18a,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res20);

-    wil::details::

-    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-    ::

-    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)local_18);

-  }

-  else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

-    if (local_res20 == 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x191,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

-                 ,-0x7fc1fefb);

-    }

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_res20);

-  }

-  return -0x7fffbfff;

-}

-

+Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastClearAppNotifications : Error: Decompile error: 
+Marshaling error: Did not see expected closing element
```

## `PresentationEndpointFacade::GetPayloadForNotificationId`  (modified)

```diff
--- PresentationEndpointFacade::GetPayloadForNotificationId
+++ PresentationEndpointFacade::QueryQuietHours
@@ -1,67 +1,62 @@
 

-/* public: virtual long __cdecl PresentationEndpointFacade::GetPayloadForNotificationId(unsigned

-   long,unsigned short * __ptr64 * __ptr64) __ptr64 */

+/* public: virtual long __cdecl PresentationEndpointFacade::QueryQuietHours(int * __ptr64,int *

+   __ptr64) __ptr64 */

 

 long __thiscall

-PresentationEndpointFacade::GetPayloadForNotificationId

-          (PresentationEndpointFacade *this,ulong param_1,ushort **param_2)

+PresentationEndpointFacade::QueryQuietHours

+          (PresentationEndpointFacade *this,int *param_1,int *param_2)

 

 {

   bool bVar1;

-  long lVar2;

-  PresentationEndpointImpl *unaff_retaddr;

+  void *unaff_retaddr;

   longlong local_res20;

   srwlock *local_18 [2];

   

   bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

                     ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

                      &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

                       ::__l2::impl);

   if (bVar1) {

     AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

     local_18[0] = &Wns::s_platformLock;

     if (Wns::s_platformShutdown != false) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x20c,

+                (unaff_retaddr,0x187,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x38));

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

     if (local_res20 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x20f,

+                (unaff_retaddr,0x18a,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::GetPayloadForNotificationId

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

     ::StrongRef::Release((StrongRef *)&local_res20);

     wil::details::

     unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

     ::

     ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

               ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

                 *)local_18);

   }

   else {

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x38));

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

     if (local_res20 == 0) {

                     /* WARNING: Subroutine does not return */

       wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x215,

+                (unaff_retaddr,0x191,

                  "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

                  ,-0x7fc1fefb);

     }

-    lVar2 = PresentationEndpointImpl::GetPayloadForNotificationId

-                      (unaff_retaddr,(NotificationPlatformPtr *)&local_res20,param_1,param_2);

     Wns::

     Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

     ::StrongRef::Release((StrongRef *)&local_res20);

   }

-  return lVar2;

+  return -0x7fffbfff;

 }
```

## `SettingsEndpointFacade::QueryMobileBroadbandDates`  (modified)

```diff
--- SettingsEndpointFacade::QueryMobileBroadbandDates
+++ SettingsEndpointImpl::UnblockAllChannels
@@ -1,63 +1,2 @@
-

-/* public: virtual long __cdecl SettingsEndpointFacade::QueryMobileBroadbandDates(struct

-   _WPN_FILE_TIME * __ptr64,struct _WPN_FILE_TIME * __ptr64,enum WPN_MBB_DATE_SOURCE * __ptr64)

-   __ptr64 */

-

-long __thiscall

-SettingsEndpointFacade::QueryMobileBroadbandDates

-          (SettingsEndpointFacade *this,_WPN_FILE_TIME *param_1,_WPN_FILE_TIME *param_2,

-          WPN_MBB_DATE_SOURCE *param_3)

-

-{

-  bool bVar1;

-  long lVar2;

-  NotificationPlatform *pNVar3;

-  void *unaff_retaddr;

-  longlong local_18;

-  srwlock *local_10;

-  

-  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

-                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

-                      ::__l2::impl);

-  if (bVar1) {

-    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

-    local_10 = &Wns::s_platformLock;

-    if (Wns::s_platformShutdown != false) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x1a2,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

-                 ,-0x7fc1fefb);

-    }

-    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

-    if (local_18 == 0) {

-                    /* WARNING: Subroutine does not return */

-      wil::details::in1diag3::_Throw_Hr

-                (unaff_retaddr,0x1a4,

-                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

-                 ,-0x7fc1fefb);

-    }

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

-    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandDates(pNVar3,param_1,param_2,param_3);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

-    wil::details::

-    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-    ::

-    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

-                *)&local_10);

-  }

-  else {

-    Initialize(this + -0x20);

-    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

-    lVar2 = SettingsEndpointImpl::QueryMobileBroadbandDates(pNVar3,param_1,param_2,param_3);

-    Wns::

-    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

-    ::StrongRef::Release((StrongRef *)&local_18);

-  }

-  return lVar2;

-}

-

+Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointImpl::UnblockAllChannels : Error: Decompile error: 
+Marshaling error: Did not see expected closing element
```

## `RegistrationEndpointFacade::GetRegisteredHandler`  (modified)

```diff
--- RegistrationEndpointFacade::GetRegisteredHandler
+++ RegistrationEndpointFacade::GetRegisteredHandler
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::GetRegisteredHandler : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::GetRegisteredHandler(unsigned short

+   const * __ptr64,struct INotificationHandler * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::GetRegisteredHandler

+          (RegistrationEndpointFacade *this,ushort *param_1,INotificationHandler **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xf7,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xf9,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::GetRegisteredHandler(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::ChangeAppSetting`  (modified)

```diff
--- SettingsEndpointFacade::ChangeAppSetting
+++ SettingsEndpointFacade::ChangeAppSetting
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ChangeAppSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ChangeAppSetting(unsigned short const *

+   __ptr64,unsigned short const * __ptr64,int) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::ChangeAppSetting

+          (SettingsEndpointFacade *this,ushort *param_1,ushort *param_2,int param_3)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x216,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x218,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::ChangeAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x30);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::ChangeAppSetting(pNVar3,param_1,param_2,param_3);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `RegistrationEndpointFacade::UpdateHandlerCapabilities`  (modified)

```diff
--- RegistrationEndpointFacade::UpdateHandlerCapabilities
+++ RegistrationEndpointFacade::UpdateHandlerCapabilities
@@ -1,2 +1,61 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::UpdateHandlerCapabilities : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl RegistrationEndpointFacade::UpdateHandlerCapabilities(struct

+   INotificationHandlerSettings * __ptr64,int) __ptr64 */

+

+long __thiscall

+RegistrationEndpointFacade::UpdateHandlerCapabilities

+          (RegistrationEndpointFacade *this,INotificationHandlerSettings *param_1,int param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1080804665> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_1080804665>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x130,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x18));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0x132,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\endpoint\\registrationendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::UpdateHandlerCapabilities(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x28);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = RegistrationEndpointImpl::UpdateHandlerCapabilities(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `PresentationEndpointFacade::ToastReportStatus`  (modified)

```diff
--- PresentationEndpointFacade::ToastReportStatus
+++ PresentationEndpointFacade::ToastReportStatus
@@ -1,2 +1,72 @@
-Failed to decompile wpncore.dll - .ProgramDB PresentationEndpointFacade::ToastReportStatus : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl PresentationEndpointFacade::ToastReportStatus(unsigned short const *

+   __ptr64,unsigned long,unsigned long,long,unsigned short const * __ptr64) __ptr64 */

+

+long __thiscall

+PresentationEndpointFacade::ToastReportStatus

+          (PresentationEndpointFacade *this,ushort *param_1,ulong param_2,ulong param_3,long param_4

+          ,ushort *param_5)

+

+{

+  bool bVar1;

+  long lVar2;

+  void *unaff_retaddr;

+  longlong local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4097557817> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_4097557817>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xd7,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xda,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastReportStatusWithUserInput

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,param_4,param_5,

+                       (IPropertySet *)0x0);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x50));

+    if (local_18 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xe1,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\ui\\presentationendpoint.cpp"

+                 ,-0x7fc1fefb);

+    }

+    lVar2 = PresentationEndpointImpl::ToastReportStatusWithUserInput

+                      ((PresentationEndpointImpl *)(this + 0x78),

+                       (NotificationPlatformPtr *)&local_18,param_1,param_2,param_3,param_4,param_5,

+                       (IPropertySet *)0x0);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `SettingsEndpointFacade::ChangeGlobalSetting`  (modified)

```diff
--- SettingsEndpointFacade::ChangeGlobalSetting
+++ SettingsEndpointFacade::ChangeGlobalSetting
@@ -1,2 +1,72 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::ChangeGlobalSetting : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::ChangeGlobalSetting(enum

+   WPN_SETTING_TYPE,int) __ptr64 */

+

+long __thiscall

+SettingsEndpointFacade::ChangeGlobalSetting

+          (SettingsEndpointFacade *this,WPN_SETTING_TYPE param_1,int param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  IUnknown *local_res20;

+  IUnknown *local_18;

+  srwlock *local_10;

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_10 = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xa7,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res20 == (IUnknown *)0x0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xa9,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_18,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::ChangeGlobalSetting(pNVar3,param_1,param_2,local_18);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_18);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)&local_10);

+  }

+  else {

+    Initialize(this + -0x20);

+    Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::

+    ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>

+              ((ComPtr<IWpnSettingsEndpoint> *)&local_res20,this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_18);

+    lVar2 = SettingsEndpointImpl::ChangeGlobalSetting(pNVar3,param_1,param_2,local_res20);

+    Microsoft::WRL::ComPtr<DownloadTaskManager>::InternalRelease

+              ((ComPtr<DownloadTaskManager> *)&local_res20);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_18);

+  }

+  return lVar2;

+}

+
```

## `Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>`  (modified)

```diff
--- Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade>
+++ SettingsEndpointFacade::UnblockAllChannels
@@ -1,2 +1,2 @@
-Failed to decompile wpncore.dll - .ProgramDB Microsoft::WRL::ComPtr<IWpnSettingsEndpoint>::ComPtr<IWpnSettingsEndpoint><SettingsEndpointFacade> : Error: Decompile error: 
+Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::UnblockAllChannels : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `SettingsEndpointFacade::PopulateCapableApps`  (modified)

```diff
--- SettingsEndpointFacade::PopulateCapableApps
+++ SettingsEndpointFacade::PopulateCapableApps
@@ -1,2 +1,63 @@
-Failed to decompile wpncore.dll - .ProgramDB SettingsEndpointFacade::PopulateCapableApps : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl SettingsEndpointFacade::PopulateCapableApps(enum

+   WPN_SETTING_TYPE,struct __MIDL___MIDL_itf_wpnplatform_0000_0035_0002 * __ptr64 * __ptr64) __ptr64

+    */

+

+long __thiscall

+SettingsEndpointFacade::PopulateCapableApps

+          (SettingsEndpointFacade *this,WPN_SETTING_TYPE param_1,

+          __MIDL___MIDL_itf_wpnplatform_0000_0035_0002 **param_2)

+

+{

+  bool bVar1;

+  long lVar2;

+  NotificationPlatform *pNVar3;

+  void *unaff_retaddr;

+  longlong local_res20;

+  srwlock *local_18 [2];

+  

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_3990340922> *)

+                     &`private:_static_class_wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>&___ptr64___cdecl_wil::Feature<__WilFeatureTraits_Feature_3990340922>::GetImpl(void)'

+                      ::__l2::impl);

+  if (bVar1) {

+    AcquireSRWLockShared((PSRWLOCK)&Wns::s_platformLock);

+    local_18[0] = &Wns::s_platformLock;

+    if (Wns::s_platformShutdown != false) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xbf,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    Wns::NotificationPlatformHandle::Get((NotificationPlatformHandle *)(this + 0x28));

+    if (local_res20 == 0) {

+                    /* WARNING: Subroutine does not return */

+      wil::details::in1diag3::_Throw_Hr

+                (unaff_retaddr,0xc1,

+                 "onecoreuap\\base\\diagnosis\\platform\\notifications\\platform\\settings\\settingsendpointfacade.cpp"

+                 ,-0x7fc1fefb);

+    }

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::PopulateCapableApps(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+    wil::details::

+    unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+    ::

+    ~unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+              ((unique_storage<wil::details::resource_policy<_RTL_SRWLOCK*___ptr64,void_(__cdecl*)(_RTL_SRWLOCK*___ptr64),&void___cdecl_ReleaseSRWLockShared(struct__RTL_SRWLOCK*___ptr64),wistd::integral_constant<unsigned___int64,1>,_RTL_SRWLOCK*___ptr64,_RTL_SRWLOCK*___ptr64,0,std::nullptr_t>_>

+                *)local_18);

+  }

+  else {

+    Initialize(this + -0x20);

+    pNVar3 = Wns::NotificationPlatformPtr::Get((NotificationPlatformPtr *)&local_res20);

+    lVar2 = SettingsEndpointImpl::PopulateCapableApps(pNVar3,param_1,param_2);

+    Wns::

+    Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>

+    ::StrongRef::Release((StrongRef *)&local_res20);

+  }

+  return lVar2;

+}

+
```

## `Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>`  (modified)

```diff
--- Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>
+++ Microsoft::WRL::FtmBase::FtmBase
@@ -1,2 +1,36 @@
-Failed to decompile wpncore.dll - .ProgramDB Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown>::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<2>,Microsoft::WRL::FtmBase,IWpnSettingsEndpoint,IWpnPrivateSettings,IWpnSettingsEndpoint2,IFastRundown> : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Function: _guard_dispatch_icall$thunk$10345483385596137414 replaced with injection:

+   guard_dispatch_icall */

+/* public: __cdecl Microsoft::WRL::FtmBase::FtmBase(void) __ptr64 */

+

+FtmBase * __thiscall Microsoft::WRL::FtmBase::FtmBase(FtmBase *this)

+

+{

+  _func_5156 *p_Var1;

+  longlong *plVar2;

+  LPUNKNOWN pIVar3;

+  HRESULT HVar4;

+  LPUNKNOWN local_res8;

+  

+  *(undefined ***)this = &_vftable_;

+  *(undefined8 *)(this + 0x18) = 0;

+  local_res8 = (IUnknown *)0x0;

+  HVar4 = CoCreateFreeThreadedMarshaler((LPUNKNOWN)0x0,&local_res8);

+  pIVar3 = local_res8;

+  if (-1 < HVar4) {

+    p_Var1 = local_res8->lpVtbl->QueryInterface;

+    plVar2 = *(longlong **)(this + 0x18);

+    if (plVar2 != (longlong *)0x0) {

+      *(undefined8 *)(this + 0x18) = 0;

+      (**(code **)(*plVar2 + 0x10))();

+    }

+    (*p_Var1)(pIVar3,(IID *)&_GUID_00000003_0000_0000_c000_000000000046,(void **)(this + 0x18));

+  }

+  pIVar3 = local_res8;

+  if (local_res8 != (IUnknown *)0x0) {

+    local_res8 = (LPUNKNOWN)0x0;

+    (*pIVar3->lpVtbl->Release)(pIVar3);

+  }

+  return this;

+}

+
```

## `std::_Atomic_storage<Wns::Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>*___ptr64,8>::load`  (modified)

```diff
--- std::_Atomic_storage<Wns::Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>*___ptr64,8>::load
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled
@@ -1,2 +1,18 @@
-Failed to decompile wpncore.dll - .ProgramDB std::_Atomic_storage<Wns::Owner<std::unique_ptr<NotificationPlatform,std::default_delete<NotificationPlatform>_>,std::chrono::duration<__int64,std::ratio<1,1>_>_>*___ptr64,8>::load : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: bool __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_4097557817>::__private_IsEnabled(void) __ptr64 */

+

+bool __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::__private_IsEnabled

+          (FeatureImpl<__WilFeatureTraits_Feature_4097557817> *this)

+

+{

+  ReportingKind in_R8D;

+  __uint64 in_R9;

+  undefined1 local_res10;

+  

+  GetCachedFeatureEnabledState(this);

+  ReportUsage(this,(bool)(local_res10 & 1),in_R8D,in_R9);

+  return (bool)(local_res10 & 1);

+}

+
```

## `RegistrationEndpointFacade::Initialize`  (modified)

```diff
--- RegistrationEndpointFacade::Initialize
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled
@@ -1,2 +1,18 @@
-Failed to decompile wpncore.dll - .ProgramDB RegistrationEndpointFacade::Initialize : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: bool __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_1080804665>::__private_IsEnabled(void) __ptr64 */

+

+bool __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::__private_IsEnabled

+          (FeatureImpl<__WilFeatureTraits_Feature_1080804665> *this)

+

+{

+  ReportingKind in_R8D;

+  __uint64 in_R9;

+  undefined1 local_res10;

+  

+  GetCachedFeatureEnabledState(this);

+  ReportUsage(this,(bool)(local_res10 & 1),in_R8D,in_R9);

+  return (bool)(local_res10 & 1);

+}

+
```

## `API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockShared`  (modified)

```diff
--- API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockShared calling
+++ API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockShared calling
@@ -64,0 +65 @@
+IdleTaskEndpointImpl::Invoke
@@ -110,0 +112,43 @@
+PresentationEndpointFacade::ActivateToastActionTrigger
+PresentationEndpointFacade::GetAssetsFromHandler
+PresentationEndpointFacade::GetPayloadForNotificationId
+PresentationEndpointFacade::IsFromVailContainer
+PresentationEndpointFacade::QueryAppSetting
+PresentationEndpointFacade::QueryQuietHours
+PresentationEndpointFacade::ResolveMsAppDataPath
+PresentationEndpointFacade::ResolveMsAppxPath
+PresentationEndpointFacade::ResolveTextLanguage
+PresentationEndpointFacade::StartVailContainer
+PresentationEndpointFacade::StopVailContainer
+PresentationEndpointFacade::TileCloseSession
+PresentationEndpointFacade::TileCreateSession
+PresentationEndpointFacade::TileRequestNotification
+PresentationEndpointFacade::TileRequestResource
+PresentationEndpointFacade::TileRequestResourceForeground
+PresentationEndpointFacade::TileUpdateSession
+PresentationEndpointFacade::ToastClearAppNotifications
+PresentationEndpointFacade::ToastClearNotification
+PresentationEndpointFacade::ToastClearRollover
+PresentationEndpointFacade::ToastCloseSession
+PresentationEndpointFacade::ToastCreateSession
+PresentationEndpointFacade::ToastReportStatus
+PresentationEndpointFacade::ToastReportStatusWithUserInput
+PresentationEndpointFacade::ToastRequestAllNotifications
+PresentationEndpointFacade::ToastSuppress
+PresentationEndpointFacade::ToastUnblockAll
+RegistrationEndpointFacade::CachePollingEntry
+RegistrationEndpointFacade::GetRegisteredAssetsForHandler
+RegistrationEndpointFacade::GetRegisteredHandler
+RegistrationEndpointFacade::GetRegisteredHandlersFromParent
+RegistrationEndpointFacade::GetRegisteredHandlersFromParentWithCapability
+RegistrationEndpointFacade::RegisterApplication
+RegistrationEndpointFacade::RegisterHandler
+RegistrationEndpointFacade::RegisterSystemApplication
+RegistrationEndpointFacade::RemovePhoneVoipRegistration
+RegistrationEndpointFacade::UnregisterApplication
+RegistrationEndpointFacade::UnregisterByPackage
+RegistrationEndpointFacade::UnregisterHandler
+RegistrationEndpointFacade::UnregisterSystemApplication
+RegistrationEndpointFacade::UpdateHandlerCapabilities
+RegistrationEndpointFacade::UpdatePhoneVoipRegistration
+RegistrationEndpointFacade::UpdateRegistration
@@ -120,0 +165,21 @@
+SettingsEndpointFacade::ChangeAppSetting
+SettingsEndpointFacade::ChangeAppSetting
+SettingsEndpointFacade::ChangeEnergySaverSetting
+SettingsEndpointFacade::ChangeGlobalSetting
+SettingsEndpointFacade::ChangeMobileBroadbandCap
+SettingsEndpointFacade::ClearTiles
+SettingsEndpointFacade::GetSettingsFromHandler
+SettingsEndpointFacade::PopulateCapableApps
+SettingsEndpointFacade::PopulateCapableAppsInPackage
+SettingsEndpointFacade::QueryAppSetting
+SettingsEndpointFacade::QueryEnergySaverSetting
+SettingsEndpointFacade::QueryGlobalSetting
+SettingsEndpointFacade::QueryMobileBroadbandCap
+SettingsEndpointFacade::QueryMobileBroadbandDates
+SettingsEndpointFacade::QueryMobileBroadbandUsage
+SettingsEndpointFacade::QueryToastWakeupTime
+SettingsEndpointFacade::RegisterSettingCallback
+SettingsEndpointFacade::SetToastWakeupTime
+SettingsEndpointFacade::UnblockAllChannels
+SettingsEndpointFacade::UnregisterSettingCallback
+SettingsEndpointFacade::WakeupToasts
```

## `API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive`  (modified)

```diff
--- API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive calling
+++ API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive calling
@@ -112,0 +113 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_1080804665>::GetCachedFeatureEnabledState
@@ -114,0 +116 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_2379728186>::GetCachedFeatureEnabledState
@@ -115,0 +118,2 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_3990340922>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_4097557817>::GetCachedFeatureEnabledState
```
