# CVE-2026-119934 — rdpbase.dll patch diff

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

## `ValidateServerCert`  (modified)

```diff
--- ValidateServerCert
+++ ValidateServerCert
@@ -1,32 +1,75 @@
+

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

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

 

 bool ValidateServerCert(undefined4 *param_1)

 

 {

-  void *in_RDX;

-  long unaff_EBX;

-  longlong unaff_RBP;

-  CRdpUdpConnection *unaff_RSI;

-  longlong unaff_RDI;

-  _GUID *in_R8;

-  _GUID *in_R9;

-  _tlgWrapSz<char> *in_stack_00000030;

-  _tlgWrapperByVal<4> *in_stack_00000038;

-  _tlgWrapSz<char> *in_stack_00000040;

-  _tlgWrapperByVal<4> *in_stack_00000048;

+  bool bVar1;

+  PUCHAR pUVar2;

+  uint uVar3;

+  undefined1 auStack_c8 [56];

+  BCRYPT_HASH_HANDLE local_90;

+  longlong lStack_88;

+  longlong local_80;

+  longlong local_78;

+  longlong local_70;

+  ulonglong local_28;

   

-  *(undefined4 *)(unaff_RBP + 0x58) = 0x1ec;

-  *(long *)(unaff_RBP + -0x30) = unaff_EBX;

-  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

-  ::

-  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>_>

-            ((_tlgProvider_t *)param_1,in_RDX,in_R8,in_R9,(_tlgWrapSz<char> *)(unaff_RBP + -0x10),

-             (_tlgWrapperByVal<4> *)(ulonglong)((int)unaff_RBP - 0x30),in_stack_00000030,

-             in_stack_00000038,in_stack_00000040,in_stack_00000048);

-  if (*(int *)(unaff_RDI + 0xdc) != 0) {

-    CRdpUdpConnection::LogUDPClientStateTransition

-              (unaff_RSI,*(int *)(unaff_RDI + 0x170),4,8,0xb,unaff_EBX);

+                    /* 0x13e5f0  255  ValidateServerCert */

+  local_28 = __security_cookie ^ (ulonglong)auStack_c8;

+  local_90 = (BCRYPT_HASH_HANDLE)0x0;

+  lStack_88 = 0;

+  local_80 = 0;

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

+                    ((FeatureImpl<__WilFeatureTraits_Feature_4188256568> *)

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

+                      ::__l2::impl);

+  if (bVar1) {

+    if (*(ushort *)((longlong)param_1 + 0xe) < 0x14) {

+      return false;

+    }

+    uVar3 = *(uint *)(*(longlong *)(param_1 + 4) + 8);

+    if (uVar3 == 0) {

+      return false;

+    }

+    if ((uVar3 & 7) != 0) {

+      return false;

+    }

+    if (*(uint *)(*(longlong *)(param_1 + 4) + 4) < uVar3 >> 3) {

+      return false;

+    }

+    if ((uint)*(ushort *)((longlong)param_1 + 0xe) < (uVar3 >> 3) + 0x14) {

+      return false;

+    }

   }

-  TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)(unaff_RBP + -0x28));

-  return SUB41(unaff_EBX,0);

+  uVar3 = *(ushort *)((longlong)param_1 + 0xe) + 0x10;

+  pUVar2 = operator_new((ulonglong)uVar3);

+  if (pUVar2 == (PUCHAR)0x0) {

+    return false;

+  }

+  *(undefined4 *)pUVar2 = *param_1;

+  *(undefined4 *)(pUVar2 + 4) = param_1[1];

+  *(undefined4 *)(pUVar2 + 8) = param_1[2];

+  *(undefined2 *)(pUVar2 + 0xc) = *(undefined2 *)(param_1 + 3);

+  *(undefined2 *)(pUVar2 + 0xe) = *(undefined2 *)((longlong)param_1 + 0xe);

+  memcpy(pUVar2 + 0x10,*(void **)(param_1 + 4),(ulonglong)*(ushort *)((longlong)param_1 + 0xe));

+  RDP_MD5Init(&local_90);

+  RDP_HMACMD5Update(&local_90,pUVar2,uVar3);

+  RDP_MD5Final(&local_90);

+  operator_delete(pUVar2);

+  _DAT_0 = 0x31415352;

+  _DAT_1 = 0x48;

+  _DAT_2 = 0x200;

+  _DAT_3 = 0x3f;

+  _DAT_4 = 0xc0887b5b;

+  memset(&local_78,0,0x48);

+  RDP_RsaBSafeEncPublic

+            ((undefined4 *)&DAT_0,0x5c,*(uchar **)(param_1 + 7),(uchar *)&local_78);

+  local_78 = local_78 - lStack_88;

+  if (local_78 == 0) {

+    local_78 = local_70 - local_80;

+  }

+  return local_78 == 0;

 }
```

## `RDP_RsaBSafeEncPublic`  (modified)

```diff
--- RDP_RsaBSafeEncPublic
+++ RDP_RsaBSafeEncPublic
@@ -1,17 +1,77 @@
 

-ulonglong RDP_RsaBSafeEncPublic(undefined4 *param_1,uint param_2,uchar *param_3,uchar *param_4)

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

+

+undefined8 RDP_RsaBSafeEncPublic(undefined4 *param_1,uint param_2,uchar *param_3,uchar *param_4)

 

 {

-  byte bVar1;

-  byte *in_RAX;

-  ulonglong unaff_R15;

-  char *in_stack_00000020;

-  char *pcVar2;

+  bool bVar1;

+  int iVar2;

+  NTSTATUS NVar3;

+  uint uVar4;

+  undefined8 uVar5;

+  undefined8 uVar6;

+  undefined1 auStackY_1b8 [32];

+  uint local_168 [2];

+  BCRYPT_KEY_HANDLE local_160;

+  undefined4 local_158;

+  uint local_154;

+  int local_150;

+  uint local_14c;

+  undefined4 local_148;

+  undefined4 local_144;

+  uchar local_140 [264];

+  ulonglong local_38;

   

-  bVar1 = (byte)in_RAX | *in_RAX;

-  pcVar2 = (char *)CONCAT71((int7)((ulonglong)in_RAX >> 8),bVar1);

-  *pcVar2 = *pcVar2 + bVar1;

-  WPP_SF_DsD(*(undefined8 *)(param_1 + 4),(short)param_2,param_3,(int)pcVar2,in_stack_00000020);

-  return unaff_R15 & 0xffffffff;

+                    /* 0x13f540  218  RDP_RsaBSafeEncPublic */

+  local_38 = __security_cookie ^ (ulonglong)auStackY_1b8;

+  local_160 = (BCRYPT_KEY_HANDLE)0x0;

+  uVar6 = 0;

+  uVar5 = 0;

+  if ((param_1 != (undefined4 *)0x0) && (0x13 < param_2)) {

+    iVar2 = RsaBCryptInitAlgHandle();

+    if (iVar2 != 0) {

+      memset(&local_158,0,0x11c);

+      if ((uint)param_1[2] < 0x801) {

+        bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_4188256568>::

+                __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_4188256568> *)

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

+                                     ::__l2::impl);

+        if ((!bVar1) ||

+           (((uVar4 = param_1[2], uVar4 != 0 && (uVar6 = uVar5, (uVar4 & 7) == 0)) &&

+            (uVar4 >> 3 <= (uint)param_1[1])))) {

+          local_158 = *param_1;

+          uVar4 = param_1[2];

+          local_150 = 4;

+          local_154 = uVar4;

+          RDP_ReverseMemoryCopy(local_140,(uchar *)(param_1 + 4),4);

+          local_14c = uVar4 >> 3;

+          uVar4 = local_150 + 0x18;

+          RDP_ReverseMemoryCopy

+                    ((uchar *)((longlong)&local_158 + (ulonglong)uVar4),(uchar *)(param_1 + 5),

+                     local_14c);

+          local_148 = 0;

+          local_144 = 0;

+          NVar3 = BCryptImportKeyPair(g_hRSAAlg,(BCRYPT_KEY_HANDLE)0x0,L"RSAPUBLICBLOB",&local_160,

+                                      (PUCHAR)&local_158,uVar4 + local_14c,0);

+          uVar6 = uVar5;

+          if (NVar3 == 0) {

+            local_168[0] = local_14c;

+            uVar4 = local_14c;

+            RDP_ReverseMemoryCopy(param_4,param_3,local_14c);

+            NVar3 = BCryptEncrypt(local_160,param_4,uVar4,(void *)0x0,(PUCHAR)0x0,0,param_4,uVar4,

+                                  local_168,1);

+            if (NVar3 == 0) {

+              RDP_InPlaceReverse(param_4,local_168[0]);

+              uVar6 = 1;

+            }

+          }

+        }

+      }

+    }

+    if (local_160 != (BCRYPT_KEY_HANDLE)0x0) {

+      BCryptDestroyKey(local_160);

+    }

+  }

+  return uVar6;

 }
```

## `GetInstanceOfRdsAadAuthServer`  (modified)

```diff
--- GetInstanceOfRdsAadAuthServer
+++ GetInstanceOfRdsAadAuthServer
@@ -1,22 +1,150 @@
+

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

+   guard_dispatch_icall */

+/* long __cdecl GetInstanceOfRdsAadAuthServer(unsigned short const * __ptr64,class ICloudAPHelper *

+   __ptr64,class IRdsAuthorizationCallback * __ptr64,class IRdsLoggingCallback * __ptr64,unsigned

+   long,class IRdsAadAuthServer * __ptr64 * __ptr64) */

 

 long __cdecl

 GetInstanceOfRdsAadAuthServer

           (ushort *param_1,ICloudAPHelper *param_2,IRdsAuthorizationCallback *param_3,

           IRdsLoggingCallback *param_4,ulong param_5,IRdsAadAuthServer **param_6)

 

 {

-  int in_EAX;

-  long unaff_EBX;

-  longlong unaff_RBP;

+  ushort *puVar1;

+  long lVar2;

+  RdsAadAuthServer *pRVar3;

+  _tlgWrapSz<char> *p_Var4;

+  ICloudAPHelper *pIVar5;

+  _GUID *p_Var6;

+  _GUID *p_Var7;

+  undefined8 local_res8;

+  long local_res10 [2];

+  _tlgWrapSz<char> *p_Var8;

+  _tlgWrapSz<char> *p_Var9;

+  _tlgWrapSz<char> *p_Var10;

+  RdsAadAuthServer *local_58;

+  char *local_50;

+  char *local_48;

+  char *local_40;

+  char *local_38 [2];

   

-  *(ulonglong *)(unaff_RBP + -0x28) = (ulonglong)(in_EAX + 0x1f20f);

+  local_58 = (RdsAadAuthServer *)0x0;

+  local_res8._4_4_ = (undefined4)((ulonglong)param_1 >> 0x20);

+  if (param_2 == (ICloudAPHelper *)0x0) {

+    lVar2 = -0x7ff8ffa9;

+    puVar1 = param_1;

+    if (DAT_1 < 3) goto LAB_180152305;

+    local_res10[0] = -0x7ff8ffa9;

+    local_50 = "Missing paramter pCloudAPHelper";

+    local_38[0] = "Error condition failed";

+    p_Var10 = (_tlgWrapSz<char> *)&local_50;

+    local_48 = "GetInstanceOfRdsAadAuthServer";

+    p_Var9 = (_tlgWrapSz<char> *)&local_48;

+    local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x34a);

+    local_40 = "onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp";

+    p_Var8 = (_tlgWrapSz<char> *)&local_40;

+    p_Var4 = (_tlgWrapSz<char> *)local_38;

+  }

+  else {

+    p_Var7 = (_GUID *)param_4;

+    if (param_3 == (IRdsAuthorizationCallback *)0x0) {

+      lVar2 = -0x7ff8ffa9;

+      puVar1 = param_1;

+      if (DAT_1 < 3) goto LAB_180152305;

+      local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x34b);

+      local_38[0] = "Missing paramter pAuthorization";

+      local_res10[0] = -0x7ff8ffa9;

+      param_2 = (ICloudAPHelper *)param_3;

+      lVar2 = -0x7ff8ffa9;

+LAB_2:

+      local_50 = "Error condition failed";

+      param_4 = (IRdsLoggingCallback *)p_Var7;

+    }

+    else {

+      if (param_4 == (IRdsLoggingCallback *)0x0) {

+        lVar2 = -0x7ff8ffa9;

+        puVar1 = param_1;

+        if (DAT_1 < 3) goto LAB_180152305;

+        local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x34c);

+        local_38[0] = "Missing paramter pLogger";

+        local_res10[0] = -0x7ff8ffa9;

+        param_2 = (ICloudAPHelper *)param_3;

+        goto LAB_2;

+      }

+      if (param_6 == (IRdsAadAuthServer **)0x0) {

+        lVar2 = -0x7ff8ffa9;

+        puVar1 = param_1;

+        if (DAT_1 < 3) goto LAB_180152305;

+        local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x34d);

+        local_38[0] = "Missing paramter ppRdsAadAuthServer";

+        local_res10[0] = -0x7ff8ffa9;

+        param_2 = (ICloudAPHelper *)param_3;

+        goto LAB_2;

+      }

+      if (param_5 == 0) {

+        lVar2 = -0x7ff8ffa9;

+        puVar1 = param_1;

+        if (DAT_1 < 3) goto LAB_180152305;

+        local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x34e);

+        local_38[0] = "cbMaxMessageSize must be > 0";

+        local_res10[0] = -0x7ff8ffa9;

+        param_2 = (ICloudAPHelper *)param_3;

+        goto LAB_2;

+      }

+      pIVar5 = param_2;

+      p_Var6 = (_GUID *)param_3;

+      local_res8 = param_1;

+      pRVar3 = operator_new(0x90);

+      if (pRVar3 == (RdsAadAuthServer *)0x0) {

+LAB_3:

+        lVar2 = -0x7ff8fff2;

+        puVar1 = local_res8;

+        if (DAT_1 < 3) goto LAB_180152305;

+        local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x351);

+        local_38[0] = "RdsAadAuthServer allocation failed";

+        local_res10[0] = -0x7ff8fff2;

+        param_2 = (ICloudAPHelper *)p_Var6;

+        goto LAB_2;

+      }

+      pRVar3 = (RdsAadAuthServer *)RdsAadAuthServer::RdsAadAuthServer(pRVar3);

+      if (pRVar3 == (RdsAadAuthServer *)0x0) goto LAB_3;

+      TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)&local_58);

+      local_58 = pRVar3;

+      (**(code **)(*(longlong *)pRVar3 + 8))(pRVar3);

+      lVar2 = RdsAadAuthServer::Initialize(pRVar3,(ushort *)pIVar5,param_2,param_3,param_4,param_5);

+      puVar1 = local_res8;

+      if (-1 < lVar2) {

+        local_58 = (RdsAadAuthServer *)0x0;

+        *param_6 = (IRdsAadAuthServer *)pRVar3;

+        goto LAB_0;

+      }

+      if (DAT_1 < 3) goto LAB_180152305;

+      local_res8 = (ushort *)CONCAT44(local_res8._4_4_,0x354);

+      local_38[0] = "spRdsAadAuthServer->Initialize failed";

+      local_50 = "Error HResult failed";

+      param_4 = (IRdsLoggingCallback *)param_3;

+      local_res10[0] = lVar2;

+    }

+    p_Var10 = (_tlgWrapSz<char> *)local_38;

+    local_40 = "GetInstanceOfRdsAadAuthServer";

+    p_Var9 = (_tlgWrapSz<char> *)&local_40;

+    local_48 = "onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp";

+    p_Var8 = (_tlgWrapSz<char> *)&local_48;

+    p_Var4 = (_tlgWrapSz<char> *)&local_50;

+    param_3 = (IRdsAuthorizationCallback *)param_2;

+  }

   _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

   ::

   Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

-            ((_tlgProvider_t *)param_1,param_2,(_GUID *)param_3,(_GUID *)param_4,

-             (_tlgWrapSz<char> *)(unaff_RBP + -0x28),(_tlgWrapperByVal<4> *)(unaff_RBP + -0x30),

-             (_tlgWrapSz<char> *)(unaff_RBP + -0x20),(_tlgWrapperByVal<4> *)(unaff_RBP + -0x2c),

-             (_tlgWrapSz<char> *)(unaff_RBP + -0x18),(_tlgWrapSz<char> *)(unaff_RBP + -0x10));

-  return unaff_EBX;

+            ((_tlgProvider_t *)"onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp",

+             &DAT_4,(_GUID *)param_3,(_GUID *)param_4,p_Var4,

+             (_tlgWrapperByVal<4> *)local_res10,p_Var8,(_tlgWrapperByVal<4> *)&local_res8,p_Var9,

+             p_Var10);

+  puVar1 = local_res8;

+LAB_0:

+  local_res8 = puVar1;

+  TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)&local_58);

+  return lVar2;

 }
```

## `_tlgKeywordOn`  (modified)

```diff
--- _tlgKeywordOn calling
+++ _tlgKeywordOn calling
@@ -11,0 +12 @@
+CSecFilterServer::DoHandshake
@@ -25,0 +27 @@
+SecUtils::TraceAuthenticationPackageInfo
```

## `wil::details::SubscribeFeatureStateCacheToConfigurationChanges`  (modified)

```diff
--- wil::details::SubscribeFeatureStateCacheToConfigurationChanges
+++ wil::details::SubscribeFeatureStateCacheToConfigurationChanges
@@ -1,2 +1,43 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::SubscribeFeatureStateCacheToConfigurationChanges : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

+/* void __cdecl wil::details::SubscribeFeatureStateCacheToConfigurationChanges(union

+   wil_details_FeatureStateCache * __ptr64,enum wil_FeatureChangeTime,unsigned int) */

+

+void __cdecl

+wil::details::SubscribeFeatureStateCacheToConfigurationChanges

+          (wil_details_FeatureStateCache *param_1,wil_FeatureChangeTime param_2,uint param_3)

+

+{

+  bool bVar1;

+  uint uVar2;

+  undefined4 in_register_00000084;

+  undefined *local_res20;

+  wil_FeatureChangeTime local_18 [2];

+  wil_details_FeatureStateCache *local_10;

+  

+  if (_g_enabledStateManager == 0) {

+    return;

+  }

+  uVar2 = param_3;

+  AcquireSRWLockExclusive((PSRWLOCK)&DAT_0);

+  local_res20 = &DAT_0;

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

+    local_18[1] = 0;

+    local_18[0] = param_2;

+    local_10 = param_1;

+    bVar1 = details_abi::heap_buffer::push_back

+                      ((heap_buffer *)&DAT_2,local_18,CONCAT44(in_register_00000084,uVar2));

+    if (bVar1) goto LAB_3;

+  }

+  LOCK();

+  *(uint *)param_1 = *(uint *)param_1 & (-(uint)(param_2 != 0) & 0x83a) - 0x83f;

+  UNLOCK();

+LAB_3:

+  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_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_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);

+  return;

+}

+
```

## `<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>`  (modified)

```diff
--- <lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>
+++ <lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>
@@ -1,2 +1,13 @@
-Failed to decompile rdpbase.dll - .ProgramDB <lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl> : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: static __cdecl <lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>(struct

+   _TP_CALLBACK_INSTANCE * __ptr64,void * __ptr64,struct _TP_TIMER * __ptr64) */

+

+void __cdecl

+<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>

+          (_TP_CALLBACK_INSTANCE *param_1,void *param_2,_TP_TIMER *param_3)

+

+{

+  wil::details::EnabledStateManager::OnTimer(param_2);

+  return;

+}

+
```

## `wil::details::RecordSRUMFeatureUsage`  (modified)

```diff
--- wil::details::RecordSRUMFeatureUsage
+++ wil::details::RecordSRUMFeatureUsage
@@ -1,2 +1,12 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::RecordSRUMFeatureUsage : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* void __cdecl wil::details::RecordSRUMFeatureUsage(unsigned int,unsigned int,unsigned int) */

+

+void __cdecl wil::details::RecordSRUMFeatureUsage(uint param_1,uint param_2,uint param_3)

+

+{

+  char *in_R9;

+  

+  WilApi_RecordFeatureUsage(param_1,param_2 | 0x40000000,param_3,in_R9);

+  return;

+}

+
```

## `CloudAPHelper::LogonUserW`  (modified)

```diff
--- CloudAPHelper::LogonUserW
+++ CloudAPHelper::LogonUserW
@@ -1,2 +1,158 @@
-Failed to decompile rdpbase.dll - .ProgramDB CloudAPHelper::LogonUserW : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+/* public: virtual long __cdecl CloudAPHelper::LogonUserW(unsigned char * __ptr64,unsigned long,void

+   * __ptr64 * __ptr64) __ptr64 */

+

+long __thiscall

+CloudAPHelper::LogonUserW(CloudAPHelper *this,uchar *param_1,ulong param_2,void **param_3)

+

+{

+  bool bVar1;

+  uint uVar2;

+  long lVar3;

+  _tlgWrapSz<char> *p_Var4;

+  _tlgProvider_t *p_Var5;

+  undefined4 in_register_00000084;

+  _GUID *p_Var6;

+  _GUID *p_Var7;

+  undefined1 auStackY_148 [32];

+  _tlgWrapperByVal<4> *p_Var8;

+  _tlgWrapSz<char> *p_Var9;

+  _tlgWrapperByVal<4> *p_Var10;

+  _tlgWrapSz<char> *p_Var11;

+  _tlgWrapSz<char> *p_Var12;

+  long local_d8;

+  uint local_d4;

+  char *local_d0;

+  char *local_c8;

+  char *local_c0;

+  char *local_b8;

+  uint local_b0;

+  ULONG local_ac;

+  PVOID local_a8;

+  _LSA_STRING local_a0;

+  _LUID local_90;

+  _TOKEN_SOURCE local_88;

+  _QUOTA_LIMITS local_78;

+  char local_48 [24];

+  ulonglong local_30;

+  

+  p_Var6 = (_GUID *)CONCAT44(in_register_00000084,param_2);

+  local_a0.Buffer = local_48;

+  local_30 = __security_cookie ^ (ulonglong)auStackY_148;

+  local_b0 = 0;

+  local_a8 = (PVOID)0x0;

+  local_ac = 0;

+  local_90.LowPart = 0;

+  local_90.HighPart = 0;

+  builtin_strncpy(local_48,"Terminal Services API",0x16);

+  local_a0.Length = 0x15;

+  local_a0.MaximumLength = 0x16;

+  local_a0._4_4_ = 0;

+  local_88.SourceName[0] = '\0';

+  local_88.SourceName[1] = '\0';

+  local_88.SourceName[2] = '\0';

+  local_88.SourceName[3] = '\0';

+  local_88.SourceName[4] = '\0';

+  local_88.SourceName[5] = '\0';

+  local_88.SourceName[6] = '\0';

+  local_88.SourceName[7] = '\0';

+  local_88.SourceIdentifier.LowPart = 0;

+  local_88.SourceIdentifier.HighPart = 0;

+  local_78.PagedPoolLimit = 0;

+  local_78.NonPagedPoolLimit = 0;

+  local_78.MinimumWorkingSetSize = 0;

+  local_78.MaximumWorkingSetSize = 0;

+  local_78.PagefileLimit = 0;

+  local_78.TimeLimit.QuadPart = 0;

+  p_Var7 = (_GUID *)param_3;

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

+    if (DAT_0 < 3) {

+      return -0x7ff8ffa9;

+    }

+    local_d8 = -0x7ff8ffa9;

+    local_b8 = "Missing paramter pAuthBlob";

+    local_c0 = "Error condition failed";

+    p_Var12 = (_tlgWrapSz<char> *)&local_b8;

+    local_d0 = "LogonUserW";

+    p_Var11 = (_tlgWrapSz<char> *)&local_d0;

+    local_d4 = 0x160;

+    p_Var10 = (_tlgWrapperByVal<4> *)&local_d4;

+    local_c8 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    p_Var9 = (_tlgWrapSz<char> *)&local_c8;

+    p_Var8 = (_tlgWrapperByVal<4> *)&local_d8;

+    p_Var4 = (_tlgWrapSz<char> *)&local_c0;

+    uVar2 = 0x80070057;

+  }

+  else {

+    if (param_3 == (void **)0x0) {

+      if (DAT_0 < 3) {

+        return -0x7ff8ffa9;

+      }

+      local_d4 = 0x80070057;

+      local_c0 = "Missing paramter phToken";

+      local_d8 = 0x161;

+      local_b8 = "Error condition failed";

+    }

+    else {

+      p_Var7 = (_GUID *)(ulonglong)*(uint *)(this + 0x44);

+      p_Var6 = (_GUID *)0x3;

+      uVar2 = LsaLogonUser(*(HANDLE *)(this + 0x38),&local_a0,Network,*(uint *)(this + 0x44),param_1

+                           ,param_2,(PTOKEN_GROUPS)0x0,&local_88,&local_a8,&local_ac,&local_90,

+                           param_3,&local_78,(PNTSTATUS)&local_b0);

+      if ((uVar2 == 0xc000006e) && (local_b0 != 0)) {

+        uVar2 = local_b0 | 0x10000000;

+        if ((-1 < (int)uVar2) || (DAT_0 < 3)) goto LAB_1801502f2;

+        local_d8 = 0x177;

+      }

+      else {

+        bVar1 = wil::details::

+                FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>::

+                __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

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

+                                        ::__l2::impl);

+        if (bVar1) {

+          p_Var5 = *param_3;

+          lVar3 = SecUtils::TraceAuthenticationPackageInfo(p_Var5);

+          if ((lVar3 < 0) && (3 < DAT_0)) {

+            local_c0 = "LogonUserW";

+            local_c8 = "Failed to log authentication package info";

+            local_d0 = "HResult failed but continue";

+            local_d8 = lVar3;

+            _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+            ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                      (p_Var5,&DAT_2,p_Var6,p_Var7,(_tlgWrapSz<char> *)&local_d0,

+                       (_tlgWrapSz<char> *)&local_c8,(_tlgWrapperByVal<4> *)&local_d8,

+                       (_tlgWrapSz<char> *)&local_c0);

+          }

+        }

+        uVar2 = uVar2 | 0x10000000;

+        if ((-1 < (int)uVar2) || (DAT_0 < 3)) goto LAB_1801502f2;

+        local_d8 = 0x182;

+      }

+      local_c0 = "LsaLogonUser failed";

+      local_b8 = "Error HResult failed";

+      local_d4 = uVar2;

+    }

+    p_Var12 = (_tlgWrapSz<char> *)&local_c0;

+    local_c8 = "LogonUserW";

+    p_Var11 = (_tlgWrapSz<char> *)&local_c8;

+    p_Var10 = (_tlgWrapperByVal<4> *)&local_d8;

+    p_Var9 = (_tlgWrapSz<char> *)&local_d0;

+    p_Var8 = (_tlgWrapperByVal<4> *)&local_d4;

+    p_Var4 = (_tlgWrapSz<char> *)&local_b8;

+    local_d0 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    uVar2 = local_d4;

+  }

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            ((_tlgProvider_t *)"onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp",

+             &DAT_3,p_Var6,p_Var7,p_Var4,p_Var8,p_Var9,p_Var10,p_Var11,p_Var12);

+LAB_1:

+  if (local_a8 != (PVOID)0x0) {

+    LsaFreeReturnBuffer(local_a8);

+  }

+  return uVar2;

+}

+
```

## `CSecFilterServer::DoHandshake`  (modified)

```diff
--- CSecFilterServer::DoHandshake
+++ CSecFilterServer::DoHandshake
@@ -1,2 +1,126 @@
-Failed to decompile rdpbase.dll - .ProgramDB CSecFilterServer::DoHandshake : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

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

+   guard_dispatch_icall */

+/* public: virtual enum _XResult32 __cdecl CSecFilterServer::DoHandshake(unsigned char *

+   __ptr64,unsigned int,unsigned char * __ptr64 * __ptr64,unsigned int * __ptr64,enum _XBool32 *

+   __ptr64,unsigned int * __ptr64) __ptr64 */

+

+_XResult32 __thiscall

+CSecFilterServer::DoHandshake

+          (CSecFilterServer *this,uchar *param_1,uint param_2,uchar **param_3,uint *param_4,

+          _XBool32 *param_5,uint *param_6)

+

+{

+  CSecurityFilter *this_00;

+  wchar_t *_Str1;

+  bool bVar1;

+  char cVar2;

+  _XResult32 _Var3;

+  long lVar4;

+  int iVar5;

+  ulonglong uVar6;

+  _GUID *p_Var7;

+  _tlgProvider_t *p_Var8;

+  longlong lVar9;

+  _GUID *p_Var10;

+  _GUID *p_Var11;

+  undefined4 uVar12;

+  undefined1 auStackY_f8 [32];

+  _GUID local_98;

+  undefined8 *local_88;

+  wchar_t *local_80;

+  char *local_78;

+  char *local_70;

+  undefined8 local_68;

+  char *local_60 [2];

+  undefined8 local_50;

+  undefined8 uStack_48;

+  ulonglong local_40;

+  

+  local_40 = __security_cookie ^ (ulonglong)auStackY_f8;

+  this_00 = (CSecurityFilter *)(this + 8);

+  p_Var11 = (_GUID *)param_3;

+  _Var3 = CSecurityFilter::DoHandshake(this_00,param_1,param_2,param_3,param_4,param_5,param_6);

+  if (_Var3 != 0) {

+    if ((((undefined8 **)WPP_GLOBAL_Control != &WPP_GLOBAL_Control) &&

+        ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x44) & 0x20) != 0)) &&

+       (1 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x41))) {

+      uVar6 = RdpX_GetActivityIdPrefix();

+      WPP_SF_Ddd(WPP_GLOBAL_Control[7],0x22,&WPP_bcf6cbb121023be29bda4ddf912d8228_Traceguids,

+                 (int)uVar6);

+    }

+    if (*param_3 != (uchar *)0x0) {

+      return _Var3;

+    }

+    lVar4 = MapXResultToHR(_Var3);

+    CSecurityFilter::GenerateErrorMessage(this_00,lVar4,param_3,param_4);

+    return _Var3;

+  }

+  bVar1 = wil::details::

+          FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>::

+          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

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

+                                  ::__l2::impl);

+  if (!bVar1) {

+    return 0;

+  }

+  if (*param_5 != 0) {

+    local_98.Data1 = 0;

+    local_98.Data2 = 0;

+    local_98.Data3 = 0;

+    p_Var10 = &local_98;

+    _Var3 = CSecurityFilter::QueryContextAttributesW(this_00,10,p_Var10);

+    if (_Var3 == 0) {

+      lVar9 = local_98._0_8_;

+      if (local_98._0_8_ != 0) {

+        p_Var7 = RdpActivityId::GetCurrentActivityId((_GUID *)local_60);

+        lVar9 = local_98._0_8_;

+        uVar12._0_1_ = '\0';

+        uVar12._1_1_ = '\0';

+        uVar12._2_1_ = '\0';

+        uVar12._3_1_ = '\0';

+        local_50._0_4_ = p_Var7->Data1;

+        local_50._4_2_ = p_Var7->Data2;

+        local_50._6_2_ = p_Var7->Data3;

+        uStack_48 = *(undefined8 *)p_Var7->Data4;

+        _Str1 = *(wchar_t **)(local_98._0_8_ + 0x10);

+        iVar5 = wcscmp(_Str1,L"NTLM");

+        if (((iVar5 == 0) ||

+            (iVar5 = wcscmp(_Str1,L"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"), iVar5 == 0)) ||

+           (iVar5 = wcscmp(_Str1,L"MSV1_0"), iVar5 == 0)) {

+          uVar12._0_1_ = '\x01';

+          uVar12._1_1_ = '\0';

+          uVar12._2_1_ = '\0';

+          uVar12._3_1_ = '\0';

+        }

+        if (4 < DAT_0) {

+          p_Var8 = (_tlgProvider_t *)&DAT_0;

+          cVar2 = _tlgKeywordOn(0x1801ad008,0x470000000000);

+          if (cVar2 != '\0') {

+            local_88 = &local_50;

+            local_78 = "Authentication";

+            local_70 = "Stack";

+            local_60[0] = "Checkpoint";

+            local_68 = 0x1000000;

+            local_98.Data4._0_4_ = uVar12;

+            local_80 = _Str1;

+            _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+            ::

+            Write<_tlgWrapSz<char>,_tlgWrapperByVal<8>,_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapSz<unsigned_short>,_tlgWrapperByVal<4>,_tlgWrapperByRef<16>_>

+                      (p_Var8,&DAT_1,p_Var10,p_Var11,(_tlgWrapSz<char> *)local_60,

+                       (_tlgWrapperByVal<8> *)&local_68,(_tlgWrapSz<char> *)&local_70,

+                       (_tlgWrapSz<char> *)&local_78,(_tlgWrapSz<unsigned_short> *)&local_80,

+                       (_tlgWrapperByVal<4> *)local_98.Data4,(_tlgWrapperByRef<16> *)&local_88);

+            lVar9 = local_98._0_8_;

+          }

+        }

+      }

+      (**(code **)(this + 0x98))(lVar9);

+      return 0;

+    }

+    return 0;

+  }

+  return 0;

+}

+
```

## `wil::details::EnabledStateManager::ProcessShutdown`  (modified)

```diff
--- wil::details::EnabledStateManager::ProcessShutdown
+++ wil::details::EnabledStateManager::ProcessShutdown
@@ -1,2 +1,33 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::EnabledStateManager::ProcessShutdown : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: void __cdecl wil::details::EnabledStateManager::ProcessShutdown(void) __ptr64 */

+

+void __thiscall wil::details::EnabledStateManager::ProcessShutdown(EnabledStateManager *this)

+

+{

+  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>_>_>

+  *in_RDX;

+  undefined8 local_res8;

+  EnabledStateManager *local_res10;

+  

+  *(undefined4 *)this = 0;

+  local_res8 = *(undefined8 *)(this + 0x10);

+  *(undefined8 *)(this + 0x10) = 0;

+  AcquireSRWLockExclusive((PSRWLOCK)(this + 8));

+  local_res10 = this + 8;

+  RecordCachedUsageUnderLock(this,in_RDX);

+  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_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_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_res10);

+  unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+  ::reset((unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+           *)&local_res8,(_TP_TIMER *)0x0);

+  unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+  ::

+  ~unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+            ((unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+              *)&local_res8);

+  return;

+}

+
```

## `CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds`  (modified)

```diff
--- CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds
+++ CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds
@@ -1,2 +1,285 @@
-Failed to decompile rdpbase.dll - .ProgramDB CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* private: long __cdecl CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds(unsigned char *

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

+

+long __thiscall

+CRDPENCCONSecurityFilterStream::ValidateRDSTLSPasswordCreds

+          (CRDPENCCONSecurityFilterStream *this,uchar *param_1,ulong param_2,ulong *param_3)

+

+{

+  longlong *plVar1;

+  bool bVar2;

+  long lVar3;

+  int iVar4;

+  DWORD DVar5;

+  _tlgWrapSz<char> *p_Var6;

+  CRDPENCCONSecurityFilterStream *pCVar7;

+  _tlgProvider_t *p_Var8;

+  ulonglong uVar9;

+  DWORD DVar10;

+  _GUID *p_Var11;

+  _GUID *p_Var12;

+  uchar *local_res10;

+  _GUID local_res18;

+  uchar *puVar13;

+  _tlgWrapperByVal<4> *p_Var14;

+  _tlgWrapSz<char> *p_Var15;

+  _tlgWrapperByVal<4> *p_Var16;

+  _tlgWrapSz<char> *p_Var17;

+  _tlgWrapSz<char> *p_Var18;

+  undefined1 local_78 [16];

+  undefined1 local_68 [16];

+  char *local_58;

+  char *local_50;

+  int local_48 [2];

+  _GUID *local_40;

+  

+  p_Var11 = &local_res18;

+  local_78[8] = '\0';

+  local_78[9] = '\0';

+  local_78[10] = '\0';

+  local_78[0xb] = '\0';

+  local_78[0xc] = '\0';

+  local_78[0xd] = '\0';

+  local_78[0xe] = '\0';

+  local_78[0xf] = '\0';

+  local_68[8] = '\0';

+  local_68[9] = '\0';

+  local_68[10] = '\0';

+  local_68[0xb] = '\0';

+  local_68[0xc] = '\0';

+  local_68[0xd] = '\0';

+  local_68[0xe] = '\0';

+  local_68[0xf] = '\0';

+  *param_3 = 0x52e;

+  p_Var12 = (_GUID *)(local_78 + 8);

+  local_68._0_8_ = (_GUID *)0x0;

+  local_78._0_8_ = (_GUID *)0x0;

+  local_40 = (_GUID *)0x0;

+  local_res18.Data4[0] = '\0';

+  local_res18.Data4[1] = '\0';

+  local_res18.Data4[2] = '\0';

+  local_res18.Data4[3] = '\0';

+  local_48[0] = 0;

+  pCVar7 = this;

+  local_res10 = param_1;

+  local_res18.Data1 = param_2;

+  lVar3 = NextStringInMessage(this,&local_res10,&p_Var11->Data1,(ushort **)p_Var12);

+  if (lVar3 < 0) {

+    if (DAT_1 < 3) goto LAB_1800e548c;

+    local_68._0_4_ = 0x720;

+    local_78._8_8_ = "this->NextStringInMessage failed.";

+    local_68._8_8_ = "ValidateRDSTLSPasswordCreds";

+    local_58 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+    local_78._0_4_ = lVar3;

+    local_50 = "Error HResult failed";

+    p_Var18 = (_tlgWrapSz<char> *)(local_78 + 8);

+    p_Var17 = (_tlgWrapSz<char> *)(local_68 + 8);

+    p_Var16 = (_tlgWrapperByVal<4> *)local_68;

+    p_Var15 = (_tlgWrapSz<char> *)&local_58;

+    p_Var14 = (_tlgWrapperByVal<4> *)local_78;

+    p_Var6 = (_tlgWrapSz<char> *)&local_50;

+    this = pCVar7;

+  }

+  else {

+    p_Var12 = (_GUID *)(local_68 + 8);

+    p_Var11 = &local_res18;

+    lVar3 = NextStringInMessage(pCVar7,&local_res10,&p_Var11->Data1,(ushort **)p_Var12);

+    if (lVar3 < 0) {

+      if (DAT_1 < 3) goto LAB_1800e548c;

+      local_78._0_4_ = 0x726;

+      local_50 = "this->NextStringInMessage failed.";

+      local_58 = "ValidateRDSTLSPasswordCreds";

+      local_78._8_8_ =

+           "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+      local_68._0_4_ = lVar3;

+      local_68._8_8_ = "Error HResult failed";

+      p_Var18 = (_tlgWrapSz<char> *)&local_50;

+      p_Var17 = (_tlgWrapSz<char> *)&local_58;

+      p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+      p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+      p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+      p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+      this = pCVar7;

+    }

+    else {

+      p_Var12 = (_GUID *)local_68;

+      p_Var11 = &local_res18;

+      lVar3 = NextStringInMessage(pCVar7,&local_res10,&p_Var11->Data1,(ushort **)p_Var12);

+      if (lVar3 < 0) {

+        if (DAT_1 < 3) goto LAB_1800e548c;

+        local_78._0_4_ = 0x72c;

+        local_50 = "this->NextStringInMessage failed.";

+        local_58 = "ValidateRDSTLSPasswordCreds";

+        local_78._8_8_ =

+             "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+        local_68._0_4_ = lVar3;

+        local_68._8_8_ = "Error HResult failed";

+        p_Var18 = (_tlgWrapSz<char> *)&local_50;

+        p_Var17 = (_tlgWrapSz<char> *)&local_58;

+        p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+        p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+        p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+        p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+        this = pCVar7;

+      }

+      else {

+        p_Var12 = (_GUID *)local_78;

+        p_Var11 = &local_res18;

+        lVar3 = NextStringInMessage(pCVar7,&local_res10,&p_Var11->Data1,(ushort **)p_Var12);

+        if (lVar3 < 0) {

+          if (DAT_1 < 3) goto LAB_1800e548c;

+          local_78._0_4_ = 0x732;

+          local_50 = "this->NextStringInMessage failed.";

+          local_58 = "ValidateRDSTLSPasswordCreds";

+          local_78._8_8_ =

+               "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+          local_68._0_4_ = lVar3;

+          local_68._8_8_ = "Error HResult failed";

+          p_Var18 = (_tlgWrapSz<char> *)&local_50;

+          p_Var17 = (_tlgWrapSz<char> *)&local_58;

+          p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+          p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+          p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+          p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+          this = pCVar7;

+        }

+        else if (local_res18.Data1 == 0) {

+          puVar13 = local_res18.Data4;

+          p_Var12 = (_GUID *)&local_40;

+          pCVar7 = this;

+          p_Var11 = (_GUID *)local_78._0_8_;

+          lVar3 = DecryptRDSTLSPasswordCreds

+                            (this,(ushort *)local_78._8_8_,(ushort *)local_78._0_8_,

+                             (ushort **)p_Var12,(ulong *)puVar13);

+          if (lVar3 < 0) {

+            if (DAT_1 < 3) goto LAB_1800e548c;

+            local_78._0_4_ = 0x742;

+            local_50 = "this->DecryptRDSTLSPasswordCreds failed.";

+            local_58 = "ValidateRDSTLSPasswordCreds";

+            local_78._8_8_ =

+                 "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp"

+            ;

+            local_68._0_4_ = lVar3;

+            local_68._8_8_ = "Error HResult failed";

+            p_Var18 = (_tlgWrapSz<char> *)&local_50;

+            p_Var17 = (_tlgWrapSz<char> *)&local_58;

+            p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+            p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+            p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+            p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+            this = pCVar7;

+          }

+          else {

+            pCVar7 = this + 0x210;

+            if ((*(short *)pCVar7 == 2) || (*(short *)pCVar7 == 0x17)) {

+              SeciAllocateAndSetIPAddress(pCVar7,*(undefined4 *)(this + 0x20c),local_48);

+            }

+            p_Var12 = (_GUID *)0x3;

+            p_Var11 = local_40;

+            iVar4 = LogonUserExExW(local_68._8_8_,local_68._0_8_,local_40,3,

+                                   (ulonglong)puVar13 & 0xffffffff00000000,0,this + 0x1d0,0,0,0,0);

+            if (iVar4 == 0) {

+              DVar5 = GetLastError();

+              plVar1 = *(longlong **)(this + 0x180);

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

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

+              }

+              if ((((DVar5 == 0x520) || (DVar5 == 0x52e)) || (DVar5 == 0x530)) ||

+                 (((DVar5 == 0x532 || (DVar5 == 0x533)) ||

+                  ((DVar5 == 0x773 || (DVar10 = 0x52e, DVar5 == 0x775)))))) {

+                DVar10 = DVar5;

+              }

+              *param_3 = DVar10;

+              lVar3 = 0;

+              goto LAB_0;

+            }

+            bVar2 = wil::details::

+                    FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

+                    ::__private_IsEnabled

+                              ((FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

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

+                                   ::__l2::impl);

+            if (bVar2) {

+              p_Var8 = *(_tlgProvider_t **)(this + 0x1d0);

+              lVar3 = SecUtils::TraceAuthenticationPackageInfo(p_Var8);

+              if ((lVar3 < 0) && (3 < DAT_1)) {

+                local_78._0_4_ = lVar3;

+                local_50 = "ValidateRDSTLSPasswordCreds";

+                local_58 = "Failed to log authentication package info";

+                local_78._8_8_ = "HResult failed but continue";

+                _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                          (p_Var8,&DAT_2,p_Var11,p_Var12,(_tlgWrapSz<char> *)(local_78 + 8),

+                           (_tlgWrapSz<char> *)&local_58,(_tlgWrapperByVal<4> *)local_78,

+                           (_tlgWrapSz<char> *)&local_50);

+              }

+            }

+            p_Var11 = (_GUID *)local_68._0_8_;

+            p_Var12 = local_40;

+            lVar3 = StoreCredentials(this,(ushort *)local_68._8_8_,(ushort *)local_68._0_8_,

+                                     (ushort *)local_40);

+            if (-1 < lVar3) {

+              *param_3 = 0;

+              goto LAB_0;

+            }

+            if (DAT_1 < 3) goto LAB_1800e548c;

+            local_58 = "ValidateRDSTLSPasswordCreds";

+            local_50 = "this->StoreCredentials failed.";

+            local_78._0_4_ = 0x76a;

+            local_78._8_8_ =

+                 "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp"

+            ;

+            local_68._8_8_ = "Error HResult failed";

+            p_Var18 = (_tlgWrapSz<char> *)&local_50;

+            p_Var17 = (_tlgWrapSz<char> *)&local_58;

+            p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+            p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+            p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+            p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+            local_68._0_4_ = lVar3;

+          }

+        }

+        else {

+          lVar3 = -0x7ff8fff3;

+          if (DAT_1 < 3) goto LAB_1800e548c;

+          local_78._0_4_ = 0x73a;

+          local_50 = "ValidateRDSTLSCreds buffer is of invalid size.";

+          local_58 = "ValidateRDSTLSPasswordCreds";

+          local_78._8_8_ =

+               "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+          local_68._0_4_ = 0x8007000d;

+          local_68._8_8_ = "Error HResult failed";

+          p_Var18 = (_tlgWrapSz<char> *)&local_50;

+          p_Var17 = (_tlgWrapSz<char> *)&local_58;

+          p_Var16 = (_tlgWrapperByVal<4> *)local_78;

+          p_Var15 = (_tlgWrapSz<char> *)(local_78 + 8);

+          p_Var14 = (_tlgWrapperByVal<4> *)local_68;

+          p_Var6 = (_tlgWrapSz<char> *)(local_68 + 8);

+          this = pCVar7;

+        }

+      }

+    }

+  }

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            ((_tlgProvider_t *)this,&DAT_3,p_Var11,p_Var12,p_Var6,p_Var14,p_Var15,p_Var16,

+             p_Var17,p_Var18);

+LAB_0:

+  if (local_40 != (_GUID *)0x0) {

+    p_Var11 = local_40;

+    for (uVar9 = (ulonglong)(uint)local_res18.Data4._0_4_; uVar9 != 0; uVar9 = uVar9 - 1) {

+      *(undefined1 *)&p_Var11->Data1 = 0;

+      p_Var11 = (_GUID *)((longlong)&p_Var11->Data1 + 1);

+    }

+    operator_delete(local_40);

+  }

+  if (local_48[0] != 0) {

+    SeciFreeCallContext();

+  }

+  return lVar3;

+}

+
```

## `RdsAadAuthServer::Initialize`  (modified)

```diff
--- RdsAadAuthServer::Initialize
+++ RdsAadAuthServer::Initialize
@@ -1,2 +1,97 @@
-Failed to decompile rdpbase.dll - .ProgramDB RdsAadAuthServer::Initialize : 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: long __cdecl RdsAadAuthServer::Initialize(unsigned short const * __ptr64,class

+   ICloudAPHelper * __ptr64,class IRdsAuthorizationCallback * __ptr64,class IRdsLoggingCallback *

+   __ptr64,unsigned long) __ptr64 */

+

+long __thiscall

+RdsAadAuthServer::Initialize

+          (RdsAadAuthServer *this,ushort *param_1,ICloudAPHelper *param_2,

+          IRdsAuthorizationCallback *param_3,IRdsLoggingCallback *param_4,ulong param_5)

+

+{

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

+  *this_00;

+  TCntPtr<IRDPENCTcpStreamPool> *pTVar1;

+  long lVar2;

+  _GUID *p_Var3;

+  _GUID *p_Var4;

+  ushort *local_res10;

+  undefined4 local_58 [2];

+  BSTR local_50;

+  char *local_48;

+  char *local_40;

+  char *local_38;

+  char *local_30;

+  

+  lVar2 = 0;

+  p_Var3 = (_GUID *)param_2;

+  p_Var4 = (_GUID *)param_3;

+  local_res10 = param_1;

+  local_50 = SysAllocString(L"a4a365df-50f1-4397-bc59-1a1564b8bb9c;termsrv.wvd.microsoft.com");

+  this_00 = (unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(unsigned_short*___ptr64),&void___cdecl_SysFreeString(unsigned_short*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

+             *)(this + 0x40);

+  if (this_00 !=

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

+       *)&local_50) {

+    wil::details::

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

+    ::replace(this_00,(unique_storage<struct_wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(unsigned_short*___ptr64),&void___cdecl_SysFreeString(unsigned_short*___ptr64),struct_wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

+                       *)&local_50);

+  }

+  wil::details::

+  unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void_(__cdecl*)(unsigned_short*___ptr64),&void___cdecl_SysFreeString(unsigned_short*___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*)(unsigned_short*___ptr64),&void___cdecl_SysFreeString(unsigned_short*___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*)(unsigned_short*___ptr64),&void___cdecl_SysFreeString(unsigned_short*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

+              *)&local_50);

+  if (*(longlong *)this_00 == 0) {

+    lVar2 = -0x7ff8fff2;

+    if (2 < DAT_0) {

+      local_res10 = (ushort *)CONCAT44(local_res10._4_4_,100);

+      local_48 = "pwszValidRdsAadAuthResourceAppIDs allocation failed";

+      local_58[0] = 0x8007000e;

+      local_40 = "Initialize";

+      local_38 = "onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp";

+      local_30 = "Error condition failed";

+      _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+      ::

+      Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+                ((_tlgProvider_t *)0x8007000e,&DAT_1,p_Var3,p_Var4,

+                 (_tlgWrapSz<char> *)&local_30,(_tlgWrapperByVal<4> *)local_58,

+                 (_tlgWrapSz<char> *)&local_38,(_tlgWrapperByVal<4> *)&local_res10,

+                 (_tlgWrapSz<char> *)&local_40,(_tlgWrapSz<char> *)&local_48);

+    }

+  }

+  else {

+    pTVar1 = (TCntPtr<IRDPENCTcpStreamPool> *)(this + 0x58);

+    if (param_4 != *(IRdsLoggingCallback **)pTVar1) {

+      TCntPtr<IRDPENCTcpStreamPool>::SafeRelease(pTVar1);

+      *(IRdsLoggingCallback **)pTVar1 = param_4;

+      if (param_4 != (IRdsLoggingCallback *)0x0) {

+        (**(code **)(*(longlong *)param_4 + 8))(param_4);

+      }

+    }

+    pTVar1 = (TCntPtr<IRDPENCTcpStreamPool> *)(this + 0x50);

+    if (param_3 != *(IRdsAuthorizationCallback **)pTVar1) {

+      TCntPtr<IRDPENCTcpStreamPool>::SafeRelease(pTVar1);

+      *(IRdsAuthorizationCallback **)pTVar1 = param_3;

+      if (param_3 != (IRdsAuthorizationCallback *)0x0) {

+        (**(code **)(*(longlong *)param_3 + 8))(param_3);

+      }

+    }

+    pTVar1 = (TCntPtr<IRDPENCTcpStreamPool> *)(this + 0x48);

+    if (param_2 != *(ICloudAPHelper **)pTVar1) {

+      TCntPtr<IRDPENCTcpStreamPool>::SafeRelease(pTVar1);

+      *(ICloudAPHelper **)pTVar1 = param_2;

+      if (param_2 != (ICloudAPHelper *)0x0) {

+        (**(code **)(*(longlong *)param_2 + 8))(param_2);

+      }

+    }

+    *(ulong *)(this + 0x60) = param_5;

+    ChangeState(this,1,0,0);

+  }

+  return lVar2;

+}

+
```

## `CloudAPHelper::GetServerNonce`  (modified)

```diff
--- CloudAPHelper::GetServerNonce
+++ CloudAPHelper::GetServerNonce
@@ -1,2 +1,233 @@
-Failed to decompile rdpbase.dll - .ProgramDB CloudAPHelper::GetServerNonce : 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 CloudAPHelper::GetServerNonce(unsigned short * __ptr64 * __ptr64)

+   __ptr64 */

+

+long __thiscall CloudAPHelper::GetServerNonce(CloudAPHelper *this,ushort **param_1)

+

+{

+  long lVar1;

+  _tlgWrapSz<char> *p_Var2;

+  _tlgProvider_t *p_Var3;

+  _tlgProvider_t *p_Var4;

+  _GUID *in_R8;

+  _GUID *p_Var5;

+  _GUID *in_R9;

+  _GUID local_res10;

+  long local_res20 [2];

+  _tlgWrapSz<char> *p_Var6;

+  _tlgWrapSz<char> *p_Var7;

+  _tlgWrapSz<char> *p_Var8;

+  long local_68 [2];

+  _tlgProvider_t *local_60;

+  uchar local_58 [8];

+  _tlgProvider_t *local_50;

+  char *local_48;

+  char *local_40;

+  char *local_38;

+  char *local_30;

+  

+  local_50 = (_tlgProvider_t *)0x0;

+  local_58[0] = '\0';

+  local_58[1] = '\0';

+  local_58[2] = '\0';

+  local_58[3] = '\0';

+  local_58[4] = '\0';

+  local_58[5] = '\0';

+  local_58[6] = '\0';

+  local_58[7] = '\0';

+  local_res10.Data1 = 0;

+  local_60 = (_tlgProvider_t *)0x0;

+  local_res10.Data4[0] = '\0';

+  local_res10.Data4[1] = '\0';

+  local_res10.Data4[2] = '\0';

+  local_res10.Data4[3] = '\0';

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

+    lVar1 = -0x7ff8ffa9;

+    if (DAT_1 < 3) goto LAB_18014ffbb;

+    local_res20[0] = 0xa9;

+    local_48 = "Missing paramter ppNonce";

+    local_40 = "GetServerNonce";

+    local_38 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    local_30 = "Error condition failed";

+    p_Var8 = (_tlgWrapSz<char> *)&local_48;

+    p_Var7 = (_tlgWrapSz<char> *)&local_40;

+    p_Var6 = (_tlgWrapSz<char> *)&local_38;

+    p_Var2 = (_tlgWrapSz<char> *)&local_30;

+    p_Var4 = (_tlgProvider_t *)this;

+    param_1 = (ushort **)in_R8;

+LAB_2:

+    local_68[0] = lVar1;

+    _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+    ::

+    Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+              (p_Var4,&DAT_3,(_GUID *)param_1,in_R9,p_Var2,(_tlgWrapperByVal<4> *)local_68,

+               p_Var6,(_tlgWrapperByVal<4> *)local_res20,p_Var7,p_Var8);

+  }

+  else {

+    p_Var3 = (_tlgProvider_t *)&local_50;

+    lVar1 = GetInstanceOfJsonHelper((IJsonHelper **)p_Var3);

+    p_Var4 = local_50;

+    if (lVar1 < 0) {

+      if (2 < DAT_1) {

+        local_res20[0] = 0xb1;

+        local_30 = "GetInstanceOfJsonHelper failed";

+        local_38 = "GetServerNonce";

+        local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+        local_48 = "Error HResult failed";

+        p_Var8 = (_tlgWrapSz<char> *)&local_30;

+        p_Var7 = (_tlgWrapSz<char> *)&local_38;

+        p_Var6 = (_tlgWrapSz<char> *)&local_40;

+        p_Var2 = (_tlgWrapSz<char> *)&local_48;

+        p_Var4 = p_Var3;

+        param_1 = (ushort **)in_R8;

+        goto LAB_2;

+      }

+    }

+    else {

+      p_Var3 = local_50;

+      lVar1 = (**(code **)(*(longlong *)local_50 + 0x68))(local_50,L"call",0x4022000000000000);

+      if (lVar1 < 0) {

+        if (2 < DAT_1) {

+          local_res20[0] = 0xb4;

+          local_30 = "spJsonHelper->SetValue(call) failed";

+          local_38 = "GetServerNonce";

+          local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+          local_48 = "Error HResult failed";

+          p_Var8 = (_tlgWrapSz<char> *)&local_30;

+          p_Var7 = (_tlgWrapSz<char> *)&local_38;

+          p_Var6 = (_tlgWrapSz<char> *)&local_40;

+          p_Var2 = (_tlgWrapSz<char> *)&local_48;

+          p_Var4 = p_Var3;

+          param_1 = (ushort **)in_R8;

+          goto LAB_2;

+        }

+      }

+      else {

+        p_Var5 = (_GUID *)(this + 0x48);

+        p_Var3 = p_Var4;

+        lVar1 = (**(code **)(*(longlong *)p_Var4 + 0x78))(p_Var4,L"correlationId");

+        if (lVar1 < 0) {

+          if (2 < DAT_1) {

+            local_res20[0] = 0xb7;

+            local_30 = "spJsonHelper->SetValue(correlationId) failed";

+            local_38 = "GetServerNonce";

+            local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+            local_48 = "Error HResult failed";

+            p_Var8 = (_tlgWrapSz<char> *)&local_30;

+            p_Var7 = (_tlgWrapSz<char> *)&local_38;

+            p_Var6 = (_tlgWrapSz<char> *)&local_40;

+            p_Var2 = (_tlgWrapSz<char> *)&local_48;

+            p_Var4 = p_Var3;

+            param_1 = (ushort **)p_Var5;

+            goto LAB_2;

+          }

+        }

+        else {

+          p_Var5 = &local_res10;

+          p_Var3 = p_Var4;

+          lVar1 = (**(code **)(*(longlong *)p_Var4 + 0x30))(p_Var4,local_58);

+          if (lVar1 < 0) {

+            if (2 < DAT_1) {

+              local_res20[0] = 0xba;

+              local_30 = "spJsonHelper->GetJsonStringAsByteArray failed";

+              local_38 = "GetServerNonce";

+              local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+              local_48 = "Error HResult failed";

+              p_Var8 = (_tlgWrapSz<char> *)&local_30;

+              p_Var7 = (_tlgWrapSz<char> *)&local_38;

+              p_Var6 = (_tlgWrapSz<char> *)&local_40;

+              p_Var2 = (_tlgWrapSz<char> *)&local_48;

+              p_Var4 = p_Var3;

+              param_1 = (ushort **)p_Var5;

+              goto LAB_2;

+            }

+          }

+          else {

+            p_Var5 = (_GUID *)(ulonglong)local_res10.Data1;

+            in_R9 = (_GUID *)&local_60;

+            lVar1 = CallCloudAP(this,(uchar *)local_58,local_res10.Data1,(void **)in_R9,

+                                (ulong *)local_res10.Data4);

+            if (lVar1 < 0) {

+              if (3 < DAT_1) {

+                local_30 = "GetServerNonce";

+                local_38 = "CallCloudAP failed";

+                local_40 = "Warning HResult failed";

+                local_res20[0] = lVar1;

+                _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                          ((_tlgProvider_t *)this,&DAT_4,p_Var5,in_R9,

+                           (_tlgWrapSz<char> *)&local_40,(_tlgWrapSz<char> *)&local_38,

+                           (_tlgWrapperByVal<4> *)local_res20,(_tlgWrapSz<char> *)&local_30);

+              }

+            }

+            else if ((local_60 == (_tlgProvider_t *)0x0) ||

+                    (p_Var5 = (_GUID *)(ulonglong)(uint)local_res10.Data4._0_4_,

+                    local_res10.Data4._0_4_ == 0)) {

+              lVar1 = -0x7fffbffb;

+              if (2 < DAT_1) {

+                local_res20[0] = 0xc2;

+                local_30 = "GetServerNonce";

+                local_68[0] = -0x7fffbffb;

+                local_38 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                local_40 = "CloudAP returned an empty responce to the nonce request";

+                _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                ::

+                Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                          (local_60,&DAT_5,p_Var5,in_R9,(_tlgWrapSz<char> *)&local_40,

+                           (_tlgWrapperByVal<4> *)local_68,(_tlgWrapSz<char> *)&local_38,

+                           (_tlgWrapperByVal<4> *)local_res20,(_tlgWrapSz<char> *)&local_30);

+              }

+            }

+            else {

+              p_Var3 = p_Var4;

+              lVar1 = (**(code **)(*(longlong *)p_Var4 + 0x38))(p_Var4,local_60);

+              if (lVar1 < 0) {

+                if (2 < DAT_1) {

+                  local_res20[0] = 0xcc;

+                  local_30 = "spJsonHelper->SetJsonString failed";

+                  local_38 = "GetServerNonce";

+                  local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                  local_48 = "Error HResult failed";

+                  p_Var8 = (_tlgWrapSz<char> *)&local_30;

+                  p_Var7 = (_tlgWrapSz<char> *)&local_38;

+                  p_Var6 = (_tlgWrapSz<char> *)&local_40;

+                  p_Var2 = (_tlgWrapSz<char> *)&local_48;

+                  p_Var4 = p_Var3;

+                  param_1 = (ushort **)p_Var5;

+                  goto LAB_2;

+                }

+              }

+              else {

+                lVar1 = (**(code **)(*(longlong *)p_Var4 + 0x58))(p_Var4,L"ts_nonce");

+                if ((lVar1 < 0) && (2 < DAT_1)) {

+                  local_res20[0] = 0xcf;

+                  local_30 = "spJsonHelper->GetValue(ts_nonce) failed";

+                  local_38 = "GetServerNonce";

+                  local_40 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                  local_48 = "Error HResult failed";

+                  p_Var8 = (_tlgWrapSz<char> *)&local_30;

+                  p_Var7 = (_tlgWrapSz<char> *)&local_38;

+                  p_Var6 = (_tlgWrapSz<char> *)&local_40;

+                  p_Var2 = (_tlgWrapSz<char> *)&local_48;

+                  goto LAB_2;

+                }

+              }

+            }

+          }

+        }

+      }

+    }

+  }

+  if (local_60 != (_tlgProvider_t *)0x0) {

+    LsaFreeReturnBuffer(local_60);

+  }

+  if (local_58 != (uchar  [8])0x0) {

+    operator_delete((void *)local_58);

+  }

+LAB_0:

+  TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)&local_50);

+  return lVar1;

+}

+
```

## `RdsAadAuthServer::ValidateRdpAssertion`  (modified)

```diff
--- RdsAadAuthServer::ValidateRdpAssertion
+++ RdsAadAuthServer::ValidateRdpAssertion
@@ -1,2 +1,159 @@
-Failed to decompile rdpbase.dll - .ProgramDB RdsAadAuthServer::ValidateRdpAssertion : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* WARNING: Type propagation algorithm not settling */

+/* private: long __cdecl RdsAadAuthServer::ValidateRdpAssertion(unsigned char * __ptr64

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

+

+long __thiscall

+RdsAadAuthServer::ValidateRdpAssertion

+          (RdsAadAuthServer *this,uchar *param_1,ulong param_2,uchar **param_3,ulong *param_4)

+

+{

+  longlong lVar1;

+  DWORD DVar2;

+  _GUID *p_Var3;

+  longlong lVar4;

+  _tlgWrapSz<char> *p_Var6;

+  _tlgProvider_t *p_Var7;

+  undefined4 in_register_00000084;

+  _GUID *p_Var8;

+  _GUID *p_Var9;

+  _GUID *local_res8;

+  ulong local_res18 [4];

+  _tlgWrapSz<char> *p_Var10;

+  _tlgWrapSz<char> *p_Var11;

+  _tlgWrapSz<char> *p_Var12;

+  undefined4 local_68;

+  undefined4 uStack_64;

+  _GUID local_60;

+  char *local_50;

+  char *local_48;

+  char *local_40;

+  longlong lVar5;

+  

+  p_Var8 = (_GUID *)CONCAT44(in_register_00000084,param_2);

+  if (*(uint *)(this + 0x38) < param_2) {

+    if (DAT_0 < 3) {

+      return 0x80090308;

+    }

+    local_60._0_8_ = "ValidateRdpAssertion";

+    local_res8 = (_GUID *)CONCAT44(local_res8._4_4_,0x300);

+    local_60.Data4 = (uchar  [8])0x18018fde8;

+    local_50 = "RDP Assertion size is too big";

+    local_68 = 0x80090308;

+    local_res18[0] = param_2;

+    _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+    ::

+    Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>_>

+              ((_tlgProvider_t *)this,&DAT_1,p_Var8,(_GUID *)param_3,

+               (_tlgWrapSz<char> *)&local_50,(_tlgWrapperByVal<4> *)&local_68,

+               (_tlgWrapSz<char> *)local_60.Data4,(_tlgWrapperByVal<4> *)&local_res8,

+               (_tlgWrapSz<char> *)&local_60,(_tlgWrapperByVal<4> *)local_res18);

+    return 0x80090308;

+  }

+  p_Var9 = (_GUID *)param_3;

+  wil::

+  make_unique_string_nothrow<wil::unique_any_t<wil::details::unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void*___ptr64_(__cdecl*)(void*___ptr64),&void*___ptr64___cdecl_LocalFree(void*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>_>_>

+            ((ushort *)&local_68,*(__uint64 *)(this + 0x40));

+  p_Var7 = (_tlgProvider_t *)CONCAT44(uStack_64,local_68);

+  if (p_Var7 == (_tlgProvider_t *)0x0) {

+    DVar2 = GetLastError();

+    if (0 < (int)DVar2) {

+      DVar2 = DVar2 & 0xffff | 0x80070000;

+    }

+    if (DAT_0 < 3) goto LAB_1801539c6;

+    local_40 = "Failed to create intermediate buffer";

+    local_res18[0] = 0x307;

+LAB_3:

+    local_60.Data4 = (uchar  [8])0x18016e9a0;

+  }

+  else {

+    p_Var8 = &local_60;

+    local_60._0_8_ = (char *)0x0;

+    p_Var3 = (_GUID *)_o_wcstok_s(p_Var7,L";");

+    if (p_Var3 == (_GUID *)0x0) {

+LAB_4:

+      DVar2 = 0x80070057;

+      if (DAT_0 < 3) goto LAB_1801539c6;

+      local_40 = "Invalid resource app ID length";

+      local_res18[0] = 0x30d;

+      DVar2 = 0x80070057;

+      goto LAB_3;

+    }

+    lVar5 = -1;

+    do {

+      lVar4 = lVar5 + 1;

+      lVar1 = lVar5 * 2;

+      lVar5 = lVar4;

+    } while (*(short *)(p_Var3->Data4 + lVar1 + -6) != 0);

+    if (lVar4 == 0) goto LAB_4;

+    do {

+      if (4 < DAT_0) {

+        local_50 = "Checking RDS AAD Auth Resource App ID";

+        local_res8 = p_Var3;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::Write<_tlgWrapSz<char>,_tlgWrapSz<unsigned_short>_>

+                  (p_Var7,&DAT_5,p_Var8,p_Var9,(_tlgWrapSz<char> *)&local_50,

+                   (_tlgWrapSz<unsigned_short> *)&local_res8);

+      }

+      p_Var7 = *(_tlgProvider_t **)(this + 0x48);

+      p_Var8 = (_GUID *)(ulonglong)param_2;

+      p_Var9 = p_Var3;

+      DVar2 = (**(code **)(*(longlong *)p_Var7 + 0x28))

+                        (p_Var7,param_1,p_Var8,p_Var3,param_3,param_4);

+      if (-1 < (int)DVar2) goto LAB_2;

+      if ((DVar2 != 0x8004855b) && (DVar2 != 0xd004855b)) {

+        if (DAT_0 < 3) goto LAB_1801539c6;

+        local_res18[0] = 800;

+        local_50 = "m_pCloudAPHelper->ValidateRdpAssertion returned an unexpected failure.";

+        local_60.Data4 = (uchar  [8])0x18018f9c0;

+        local_48 = "onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp";

+        local_40 = "Error HResult failed";

+        p_Var12 = (_tlgWrapSz<char> *)&local_50;

+        p_Var11 = (_tlgWrapSz<char> *)local_60.Data4;

+        p_Var10 = (_tlgWrapSz<char> *)&local_48;

+        p_Var6 = (_tlgWrapSz<char> *)&local_40;

+        goto LAB_6;

+      }

+      if (3 < DAT_0) {

+        local_50 = 

+        "CloudAP returned AAD_CLOUDAP_E_RDP_CALLER_MISMATCH when validating the RDP assertion";

+        local_res8 = p_Var3;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::Write<_tlgWrapSz<char>,_tlgWrapSz<unsigned_short>_>

+                  (p_Var7,&DAT_7,p_Var8,p_Var9,(_tlgWrapSz<char> *)&local_50,

+                   (_tlgWrapSz<unsigned_short> *)&local_res8);

+      }

+      p_Var8 = &local_60;

+      p_Var7 = (_tlgProvider_t *)0x0;

+      p_Var3 = (_GUID *)_o_wcstok_s(0,L";");

+    } while (p_Var3 != (_GUID *)0x0);

+    if (DAT_0 < 3) goto LAB_1801539c6;

+    local_res18[0] = 0x32e;

+    local_40 = "m_pCloudAPHelper->ValidateRdpAssertion returned an unexpected failure.";

+    local_60.Data4 = (uchar  [8])0x18016e9d0;

+  }

+  local_48 = "ValidateRdpAssertion";

+  local_50 = "onecore\\termsrv\\rdp\\win\\security\\rdsaadauthserver.cpp";

+  p_Var12 = (_tlgWrapSz<char> *)&local_40;

+  p_Var11 = (_tlgWrapSz<char> *)&local_48;

+  p_Var10 = (_tlgWrapSz<char> *)&local_50;

+  p_Var6 = (_tlgWrapSz<char> *)local_60.Data4;

+LAB_6:

+  local_res8 = (_GUID *)CONCAT44(local_res8._4_4_,DVar2);

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            (p_Var7,&DAT_8,p_Var8,p_Var9,p_Var6,(_tlgWrapperByVal<4> *)&local_res8,p_Var10,

+             (_tlgWrapperByVal<4> *)local_res18,p_Var11,p_Var12);

+LAB_2:

+  wil::details::

+  unique_storage<wil::details::resource_policy<unsigned_short*___ptr64,void*___ptr64_(__cdecl*)(void*___ptr64),&void*___ptr64___cdecl_LocalFree(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*___ptr64_(__cdecl*)(void*___ptr64),&void*___ptr64___cdecl_LocalFree(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*___ptr64_(__cdecl*)(void*___ptr64),&void*___ptr64___cdecl_LocalFree(void*___ptr64),wistd::integral_constant<unsigned___int64,0>,unsigned_short*___ptr64,unsigned_short*___ptr64,0,std::nullptr_t>_>

+              *)&local_68);

+  return DVar2;

+}

+
```

## `wil::details::EnsureSubscribedToFeatureConfigurationChanges`  (modified)

```diff
--- wil::details::EnsureSubscribedToFeatureConfigurationChanges
+++ wil::details::EnsureSubscribedToFeatureConfigurationChanges
@@ -1,2 +1,16 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::EnsureSubscribedToFeatureConfigurationChanges : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* unsigned int __cdecl wil::details::EnsureSubscribedToFeatureConfigurationChanges(void) */

+

+uint __cdecl wil::details::EnsureSubscribedToFeatureConfigurationChanges(void)

+

+{

+  uint uVar1;

+  

+  uVar1 = DAT_0;

+  if (DAT_0 == 0) {

+    uVar1 = EnabledStateManager::EnsureSubscribedToFeatureConfigurationChangesImpl

+                      ((EnabledStateManager *)&g_enabledStateManager);

+  }

+  return uVar1;

+}

+
```

## `CRDPENCCONSecurityFilterStream::DoRdsAadHandshake`  (modified)

```diff
--- CRDPENCCONSecurityFilterStream::DoRdsAadHandshake
+++ CRDPENCCONSecurityFilterStream::DoRdsAadHandshake
@@ -1,2 +1,213 @@
-Failed to decompile rdpbase.dll - .ProgramDB CRDPENCCONSecurityFilterStream::DoRdsAadHandshake : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

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

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

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

+/* private: long __cdecl CRDPENCCONSecurityFilterStream::DoRdsAadHandshake(struct

+   IRDPENCNetStreamBuffer * __ptr64) __ptr64 */

+

+long __thiscall

+CRDPENCCONSecurityFilterStream::DoRdsAadHandshake

+          (CRDPENCCONSecurityFilterStream *this,IRDPENCNetStreamBuffer *param_1)

+

+{

+  CRDPENCCONSecurityFilterStream *pCVar1;

+  uint uVar2;

+  _XResult32 _Var3;

+  uint uVar4;

+  _GUID *p_Var5;

+  CRDPENCCONSecurityFilterStream *pCVar6;

+  IRdsAadAuthServer *pIVar7;

+  _GUID *in_R8;

+  _GUID *p_Var8;

+  _GUID *p_Var9;

+  _GUID *in_R9;

+  undefined1 auStackY_c8 [32];

+  uint local_74;

+  uint local_70 [2];

+  char *local_68;

+  char *local_60;

+  char *local_58;

+  _GUID local_50;

+  uchar *local_40;

+  uchar local_38 [8];

+  char *local_30;

+  uchar auStack_28 [8];

+  ulonglong local_20;

+  

+  local_20 = __security_cookie ^ (ulonglong)auStackY_c8;

+  local_38[0] = '\0';

+  local_38[1] = '\0';

+  local_38[2] = '\0';

+  local_38[3] = '\0';

+  local_38[4] = '\0';

+  local_38[5] = '\0';

+  local_38[6] = '\0';

+  local_38[7] = '\0';

+  pCVar1 = this + 0x1b0;

+  local_50.Data1 = 0;

+  local_40 = (uchar *)0x0;

+  local_50.Data2 = 0;

+  local_50.Data3 = 0;

+  if (*(IRdsAadAuthServer **)pCVar1 == (IRdsAadAuthServer *)0x0) {

+    local_30 = *(char **)(this + 0x1e8);

+    auStack_28 = *(uchar (*) [8])(this + 0x1f0);

+    local_50.Data4[0] = '\0';

+    local_50.Data4[1] = '\0';

+    local_50.Data4[2] = '\0';

+    local_50.Data4[3] = '\0';

+    local_50.Data4[4] = '\0';

+    local_50.Data4[5] = '\0';

+    local_50.Data4[6] = '\0';

+    local_50.Data4[7] = '\0';

+    p_Var5 = (_GUID *)&local_30;

+    uVar2 = GetInstanceOfCloudAPHelper(p_Var5,(ICloudAPHelper **)local_50.Data4);

+    if ((int)uVar2 < 0) {

+      if (2 < DAT_0) {

+        local_68 = "DoRdsAadHandshake";

+        local_58 = "GetInstanceOfCloudAPHelper failed";

+        local_70[0] = 0x609;

+        local_60 = 

+        "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+        local_30 = "Error HResult failed";

+        local_74 = uVar2;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::

+        Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+                  ((_tlgProvider_t *)p_Var5,&DAT_1,in_R8,in_R9,(_tlgWrapSz<char> *)&local_30

+                   ,(_tlgWrapperByVal<4> *)&local_74,(_tlgWrapSz<char> *)&local_60,

+                   (_tlgWrapperByVal<4> *)local_70,(_tlgWrapSz<char> *)&local_68,

+                   (_tlgWrapSz<char> *)&local_58);

+      }

+      if (local_50.Data4 != (uchar  [8])0x0) {

+        (**(code **)(*(longlong *)local_50.Data4 + 0x10))();

+      }

+      goto LAB_2;

+    }

+    p_Var9 = (_GUID *)(this + 0x58);

+    p_Var8 = (_GUID *)(this + 0x60);

+    uVar2 = GetInstanceOfRdsAadAuthServer

+                      ((ushort *)p_Var5,(ICloudAPHelper *)local_50.Data4,

+                       (IRdsAuthorizationCallback *)p_Var8,(IRdsLoggingCallback *)p_Var9,

+                       *(ulong *)(this + 0x1c0),(IRdsAadAuthServer **)pCVar1);

+    if ((int)uVar2 < 0) {

+      if (2 < DAT_0) {

+        local_60 = "DoRdsAadHandshake";

+        local_30 = "GetInstanceOfRdsAadAuthServer failed";

+        local_74 = 0x610;

+        local_68 = 

+        "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+        local_58 = "Error HResult failed";

+        local_70[0] = uVar2;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::

+        Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+                  ((_tlgProvider_t *)p_Var5,&DAT_1,p_Var8,p_Var9,

+                   (_tlgWrapSz<char> *)&local_58,(_tlgWrapperByVal<4> *)local_70,

+                   (_tlgWrapSz<char> *)&local_68,(_tlgWrapperByVal<4> *)&local_74,

+                   (_tlgWrapSz<char> *)&local_60,(_tlgWrapSz<char> *)&local_30);

+      }

+    }

+    else {

+      pIVar7 = *(IRdsAadAuthServer **)pCVar1;

+      p_Var5 = (_GUID *)&local_40;

+      p_Var9 = (_GUID *)0x0;

+      uVar2 = (**(code **)(*(longlong *)pIVar7 + 0x20))(pIVar7,0);

+      if (-1 < (int)uVar2) {

+        TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)local_50.Data4);

+        goto LAB_3;

+      }

+      if (3 < DAT_0) {

+        local_30 = "DoRdsAadHandshake";

+        local_60 = "m_spRdsAadAuthServer->DoHandshake failed";

+        local_68 = "HResult failed but continue";

+        local_74 = uVar2;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                  ((_tlgProvider_t *)pIVar7,&DAT_4,p_Var9,p_Var5,

+                   (_tlgWrapSz<char> *)&local_68,(_tlgWrapSz<char> *)&local_60,

+                   (_tlgWrapperByVal<4> *)&local_74,(_tlgWrapSz<char> *)&local_30);

+      }

+      uVar2 = LogDiagnosticsFailure(this,0x14,uVar2,0,0);

+    }

+    TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)local_50.Data4);

+    goto LAB_2;

+  }

+  p_Var5 = (_GUID *)0x0;

+  pCVar6 = this;

+  uVar2 = ProcessRecvdData(this,param_1,0);

+  if ((int)uVar2 < 0) {

+    if (DAT_0 < 3) goto LAB_18003001a;

+    local_30 = "ProcessRecvdData failed.";

+    local_74 = 0x620;

+    local_70[0] = uVar2;

+  }

+  else {

+    p_Var5 = &local_50;

+    _Var3 = (**(code **)(**(longlong **)(this + 0x1a8) + 0x80))

+                      (*(longlong **)(this + 0x1a8),local_38);

+    pCVar6 = (CRDPENCCONSecurityFilterStream *)(ulonglong)_Var3;

+    uVar2 = MapXResultToHR(_Var3);

+    if ((int)uVar2 < 0) {

+      if (DAT_0 < 3) goto LAB_18003001a;

+      local_30 = "m_spSecFilter->GetProcessedBuffer failed.";

+      local_74 = 0x624;

+      local_70[0] = uVar2;

+    }

+    else {

+      if ((local_38 != (uchar  [8])0x0) && (local_50.Data1 != 0)) {

+        (**(code **)(**(longlong **)(this + 0x1a8) + 0x88))();

+        pIVar7 = *(IRdsAadAuthServer **)pCVar1;

+        p_Var9 = (_GUID *)(ulonglong)local_50.Data1;

+        p_Var5 = (_GUID *)&local_40;

+        uVar2 = (**(code **)(*(longlong *)pIVar7 + 0x20))(pIVar7,local_38);

+        if ((int)uVar2 < 0) {

+          if (3 < DAT_0) {

+            local_30 = "DoRdsAadHandshake";

+            local_60 = "m_spRdsAadAuthServer->DoHandshake failed";

+            local_68 = "HResult failed but continue";

+            local_74 = uVar2;

+            _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+            ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                      ((_tlgProvider_t *)pIVar7,&DAT_4,p_Var9,p_Var5,

+                       (_tlgWrapSz<char> *)&local_68,(_tlgWrapSz<char> *)&local_60,

+                       (_tlgWrapperByVal<4> *)&local_74,(_tlgWrapSz<char> *)&local_30);

+          }

+          uVar2 = LogDiagnosticsFailure(this,0x14,uVar2,0,0);

+        }

+      }

+LAB_3:

+      if ((local_40 == (uchar *)0x0) ||

+         (p_Var5 = (_GUID *)(ulonglong)(uint)local_50._4_4_, local_50._4_4_ == 0))

+      goto LAB_2;

+      in_R9 = (_GUID *)(ulonglong)(uVar2 >> 0x1f);

+      uVar4 = SendRdsAadHandshakeToken(this,local_40,local_50._4_4_,uVar2 >> 0x1f);

+      pCVar6 = (CRDPENCCONSecurityFilterStream *)(ulonglong)uVar4;

+      if (-1 < (int)uVar4) goto LAB_2;

+      if (-1 < (int)uVar2) {

+        uVar2 = uVar4;

+      }

+      if (DAT_0 < 3) goto LAB_18003001a;

+      local_30 = "this->SendRdsAadHandshakeToken failed";

+      local_74 = 0x643;

+      local_70[0] = uVar4;

+    }

+  }

+  local_68 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+  local_58 = "Error HResult failed";

+  local_60 = "DoRdsAadHandshake";

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            ((_tlgProvider_t *)pCVar6,&DAT_1,p_Var5,in_R9,(_tlgWrapSz<char> *)&local_58,

+             (_tlgWrapperByVal<4> *)local_70,(_tlgWrapSz<char> *)&local_68,

+             (_tlgWrapperByVal<4> *)&local_74,(_tlgWrapSz<char> *)&local_60,

+             (_tlgWrapSz<char> *)&local_30);

+LAB_2:

+  if (local_40 != (uchar *)0x0) {

+    operator_delete(local_40);

+  }

+  return uVar2;

+}

+
```

## `CRDPENCCONSecurityFilterStream::ProcessRecvdData`  (modified)

```diff
--- CRDPENCCONSecurityFilterStream::ProcessRecvdData
+++ CRDPENCCONSecurityFilterStream::ProcessRecvdData
@@ -1,2 +1,220 @@
-Failed to decompile rdpbase.dll - .ProgramDB CRDPENCCONSecurityFilterStream::ProcessRecvdData : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* private: long __cdecl CRDPENCCONSecurityFilterStream::ProcessRecvdData(struct

+   IRDPENCNetStreamBuffer * __ptr64,int) __ptr64 */

+

+long __thiscall

+CRDPENCCONSecurityFilterStream::ProcessRecvdData

+          (CRDPENCCONSecurityFilterStream *this,IRDPENCNetStreamBuffer *param_1,int param_2)

+

+{

+  longlong *plVar1;

+  _XResult32 _Var2;

+  uint uVar3;

+  int iVar4;

+  _tlgWrapSz<char> *p_Var5;

+  CRDPENCCONSecurityFilterStream *pCVar6;

+  _GUID *p_Var7;

+  _GUID *in_R9;

+  uint local_res10 [2];

+  uint local_res20 [2];

+  _tlgWrapperByVal<4> *p_Var8;

+  _tlgWrapSz<char> *p_Var9;

+  _tlgWrapperByVal<4> *p_Var10;

+  _tlgWrapSz<char> *p_Var11;

+  _tlgWrapSz<char> *p_Var12;

+  uint local_78;

+  undefined1 local_74 [4];

+  char *local_70;

+  char *local_68;

+  char *local_60;

+  uchar *local_58;

+  undefined1 local_50 [16];

+  longlong local_40;

+  char *local_38;

+  char *local_30;

+  void *local_28 [2];

+  

+  uVar3 = 0;

+  local_40 = 0;

+  local_28[0] = (void *)0x0;

+  local_50[8] = '\0';

+  local_50[9] = '\0';

+  local_50[10] = '\0';

+  local_50[0xb] = '\0';

+  local_50._0_4_ = 0;

+  local_50._4_2_ = 0;

+  local_50._6_2_ = 0;

+  local_res20[0] = 0;

+  local_res10[0] = 0;

+  (**(code **)(*(longlong *)param_1 + 0x18))(param_1,&local_40);

+  (**(code **)(*(longlong *)param_1 + 0x38))(param_1,local_res20);

+  (**(code **)(*(longlong *)param_1 + 0x28))(param_1,local_res10);

+  p_Var7 = (_GUID *)(ulonglong)local_res10[0];

+  if (local_res10[0] == 0) {

+LAB_0:

+    if (param_2 == 0) {

+      return uVar3;

+    }

+    if (*(int *)(this + 0x110) != 2) {

+      return uVar3;

+    }

+    if (*(int *)(this + 0x204) != 0) {

+      return uVar3;

+    }

+    if (*(int *)(this + 0x200) != 0) {

+      return uVar3;

+    }

+    p_Var7 = (_GUID *)local_74;

+    local_58 = (uchar *)0x0;

+    local_74 = (undefined1  [4])0x0;

+    _Var2 = (**(code **)(**(longlong **)(this + 0x1a8) + 0x80))

+                      (*(longlong **)(this + 0x1a8),&local_58);

+    pCVar6 = (CRDPENCCONSecurityFilterStream *)(ulonglong)_Var2;

+    uVar3 = MapXResultToHR(_Var2);

+    if ((int)uVar3 < 0) {

+      if (DAT_1 < 3) {

+        return uVar3;

+      }

+      local_78 = 0x5dd;

+      local_60 = "m_spSecFilter->GetProcessedBuffer failed.";

+      local_70 = (char *)CONCAT44(local_70._4_4_,uVar3);

+      local_68 = "ProcessRecvdData";

+      local_38 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp"

+      ;

+      local_30 = "Error HResult failed";

+      p_Var12 = (_tlgWrapSz<char> *)&local_60;

+      p_Var11 = (_tlgWrapSz<char> *)&local_68;

+      p_Var10 = (_tlgWrapperByVal<4> *)&local_78;

+      p_Var9 = (_tlgWrapSz<char> *)&local_38;

+      p_Var8 = (_tlgWrapperByVal<4> *)&local_70;

+      p_Var5 = (_tlgWrapSz<char> *)&local_30;

+      goto LAB_2;

+    }

+    if (local_58 == (uchar *)0x0) {

+      return uVar3;

+    }

+    p_Var7 = (_GUID *)(ulonglong)(uint)local_74;

+    if (local_74 == (undefined1  [4])0x0) {

+      return uVar3;

+    }

+    iVar4 = IsPreRDPConnectRequest(this,local_58,(ulong)local_74);

+    *(int *)(this + 0x200) = iVar4;

+    if (iVar4 != 0) {

+      return uVar3;

+    }

+    uVar3 = AuthorizeClientInternal(this,(void *)0x0);

+    if (-1 < (int)uVar3) {

+      return uVar3;

+    }

+    if (DAT_1 < 3) {

+      return uVar3;

+    }

+    local_70 = (char *)CONCAT44(local_70._4_4_,0x5ea);

+    local_30 = "AuthorizeClient failed.";

+    local_38 = "ProcessRecvdData";

+    local_60 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+    local_68 = "Error HResult failed";

+    p_Var12 = (_tlgWrapSz<char> *)&local_30;

+    p_Var11 = (_tlgWrapSz<char> *)&local_38;

+    p_Var10 = (_tlgWrapperByVal<4> *)&local_70;

+    p_Var9 = (_tlgWrapSz<char> *)&local_60;

+    p_Var5 = (_tlgWrapSz<char> *)&local_68;

+  }

+  else {

+    plVar1 = *(longlong **)(this + 0x290);

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

+LAB_3:

+      p_Var7 = (_GUID *)local_50;

+      _Var2 = (**(code **)(**(longlong **)(this + 0x1a8) + 0x70))

+                        (*(longlong **)(this + 0x1a8),local_28);

+      pCVar6 = (CRDPENCCONSecurityFilterStream *)(ulonglong)_Var2;

+      uVar3 = MapXResultToHR(_Var2);

+      if ((int)uVar3 < 0) {

+        if (DAT_1 < 3) {

+          return uVar3;

+        }

+        local_78 = 0x5b1;

+        local_60 = "Failed to get input buffer";

+        local_68 = "ProcessRecvdData";

+        local_58 = 

+        "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+        local_70 = "Error HResult failed";

+        p_Var12 = (_tlgWrapSz<char> *)&local_60;

+        p_Var11 = (_tlgWrapSz<char> *)&local_68;

+        p_Var10 = (_tlgWrapperByVal<4> *)&local_78;

+        p_Var9 = (_tlgWrapSz<char> *)&local_58;

+        p_Var8 = (_tlgWrapperByVal<4> *)local_74;

+        p_Var5 = (_tlgWrapSz<char> *)&local_70;

+        local_74 = (undefined1  [4])uVar3;

+        goto LAB_2;

+      }

+      if ((uint)local_50._0_4_ < local_res10[0]) {

+        return -0x7fff0001;

+      }

+      memcpy(local_28[0],(void *)((ulonglong)local_res20[0] + local_40),(ulonglong)local_res10[0]);

+      (**(code **)(**(longlong **)(this + 0x1a8) + 0x78))

+                (*(longlong **)(this + 0x1a8),local_res10[0]);

+      in_R9 = (_GUID *)(local_50 + 8);

+      p_Var7 = (_GUID *)0x0;

+      _Var2 = (**(code **)(**(longlong **)(this + 0x1a8) + 0x20))

+                        (*(longlong **)(this + 0x1a8),0,0,in_R9,local_50 + 4);

+      if ((_Var2 != 0) && (plVar1 = *(longlong **)(this + 0x290), plVar1 != (longlong *)0x0)) {

+        (**(code **)(*plVar1 + 0x18))(plVar1,_Var2);

+      }

+      uVar3 = MapXResultToHR(_Var2);

+      if ((int)uVar3 < 0) {

+        LogError(this,uVar3);

+        if (DAT_1 < 3) {

+          return uVar3;

+        }

+        local_78 = 0x5cd;

+        local_60 = "m_spSecFilter->FilterIncomingData failed.";

+        local_68 = "ProcessRecvdData";

+        local_58 = 

+        "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+        local_70 = "Error HResult failed";

+        p_Var12 = (_tlgWrapSz<char> *)&local_60;

+        p_Var11 = (_tlgWrapSz<char> *)&local_68;

+        p_Var10 = (_tlgWrapperByVal<4> *)&local_78;

+        p_Var9 = (_tlgWrapSz<char> *)&local_58;

+        p_Var8 = (_tlgWrapperByVal<4> *)local_74;

+        p_Var5 = (_tlgWrapSz<char> *)&local_70;

+        pCVar6 = this;

+        local_74 = (undefined1  [4])uVar3;

+        goto LAB_2;

+      }

+      goto LAB_0;

+    }

+    _Var2 = (**(code **)(*plVar1 + 8))(plVar1,(ulonglong)local_res20[0] + local_40);

+    pCVar6 = (CRDPENCCONSecurityFilterStream *)(ulonglong)_Var2;

+    uVar3 = MapXResultToHR(_Var2);

+    if (-1 < (int)uVar3) goto LAB_3;

+    if (DAT_1 < 3) {

+      return uVar3;

+    }

+    local_74 = (undefined1  [4])0x5a9;

+    local_58 = "TLSLogger detected bad input data in CRDPENCCONSecurityFilterStream.";

+    local_70 = "ProcessRecvdData";

+    local_68 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+    local_60 = "Error HResult failed";

+    p_Var12 = (_tlgWrapSz<char> *)&local_58;

+    p_Var11 = (_tlgWrapSz<char> *)&local_70;

+    p_Var10 = (_tlgWrapperByVal<4> *)local_74;

+    p_Var9 = (_tlgWrapSz<char> *)&local_68;

+    p_Var5 = (_tlgWrapSz<char> *)&local_60;

+    this = pCVar6;

+  }

+  p_Var8 = (_tlgWrapperByVal<4> *)&local_78;

+  pCVar6 = this;

+  local_78 = uVar3;

+LAB_2:

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            ((_tlgProvider_t *)pCVar6,&DAT_4,p_Var7,in_R9,p_Var5,p_Var8,p_Var9,p_Var10,

+             p_Var11,p_Var12);

+  return uVar3;

+}

+
```

## `wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset`  (modified)

```diff
--- wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
+++ wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
@@ -1,2 +1,28 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: void __cdecl wil::details::unique_storage<struct wil::details::resource_policy<struct

+   _TP_TIMER * __ptr64,void (__cdecl*)(struct _TP_TIMER * __ptr64),&public: static void __cdecl

+   wil::details::DestroyThreadPoolTimer<struct

+   wil::details::SystemThreadPoolMethods,0>::Destroy(struct _TP_TIMER * __ptr64),struct

+   wistd::integral_constant<unsigned __int64,0>,struct _TP_TIMER * __ptr64,struct _TP_TIMER *

+   __ptr64,0,std::nullptr_t> >::reset(struct _TP_TIMER * __ptr64) __ptr64 */

+

+void __thiscall

+wil::details::

+unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+::reset(unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>

+        *this,_TP_TIMER *param_1)

+

+{

+  _TP_TIMER *p_Var1;

+  last_error_context local_res8 [8];

+  

+  p_Var1 = *(_TP_TIMER **)this;

+  if (p_Var1 != (_TP_TIMER *)0x0) {

+    last_error_context::last_error_context(local_res8);

+    DestroyThreadPoolTimer<wil::details::SystemThreadPoolMethods,0>::Destroy(p_Var1);

+    last_error_context::~last_error_context(local_res8);

+  }

+  *(_TP_TIMER **)this = param_1;

+  return;

+}

+
```

## `<lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>`  (modified)

```diff
--- <lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>
+++ <lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>
@@ -1,2 +1,12 @@
-Failed to decompile rdpbase.dll - .ProgramDB <lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl> : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: static __cdecl <lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>(void *

+   __ptr64) */

+

+void __cdecl <lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>(void *param_1)

+

+{

+  wil::details::EnabledStateManager::OnTimer

+            ((EnabledStateManager *)&wil::details::g_enabledStateManager);

+  return;

+}

+
```

## `wil::details::EnabledStateManager::OnStateChange`  (modified)

```diff
--- wil::details::EnabledStateManager::OnStateChange
+++ wil::details::EnabledStateManager::OnStateChange
@@ -1,2 +1,35 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::EnabledStateManager::OnStateChange : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: void __cdecl wil::details::EnabledStateManager::OnStateChange(void) __ptr64 */

+

+void __thiscall wil::details::EnabledStateManager::OnStateChange(EnabledStateManager *this)

+

+{

+  int *piVar1;

+  int iVar2;

+  int *piVar3;

+  EnabledStateManager *local_res8;

+  

+  if (*(int *)this != 0) {

+    AcquireSRWLockExclusive((PSRWLOCK)(this + 8));

+    piVar1 = *(int **)(this + 0x48);

+    for (piVar3 = *(int **)(this + 0x40); piVar3 != piVar1; piVar3 = piVar3 + 4) {

+      LOCK();

+      **(uint **)(piVar3 + 2) = **(uint **)(piVar3 + 2) & (-(uint)(*piVar3 != 0) & 0x83a) - 0x83f;

+      UNLOCK();

+    }

+    *(undefined8 *)(this + 0x48) = *(undefined8 *)(this + 0x40);

+    iVar2 = 1;

+    if (*(int *)(this + 0x1c) + 1 != 0) {

+      iVar2 = *(int *)(this + 0x1c) + 1;

+    }

+    *(int *)(this + 0x1c) = iVar2;

+    local_res8 = this + 8;

+    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_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_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_res8);

+  }

+  return;

+}

+
```

## `wil::details::EnabledStateManager::RecordCachedUsageUnderLock`  (modified)

```diff
--- wil::details::EnabledStateManager::RecordCachedUsageUnderLock
+++ wil::details::EnabledStateManager::RecordCachedUsageUnderLock
@@ -1,2 +1,31 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::EnabledStateManager::RecordCachedUsageUnderLock : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: void __cdecl wil::details::EnabledStateManager::RecordCachedUsageUnderLock(class

+   wil::unique_any_t<class wil::details::unique_storage<struct wil::details::resource_policy<struct

+   _RTL_SRWLOCK * __ptr64,void (__cdecl*)(struct _RTL_SRWLOCK * __ptr64),&void __cdecl

+   ReleaseSRWLockExclusive(struct _RTL_SRWLOCK * __ptr64),struct wistd::integral_constant<unsigned

+   __int64,1>,struct _RTL_SRWLOCK * __ptr64,struct _RTL_SRWLOCK * __ptr64,0,std::nullptr_t> > >

+   const & __ptr64) __ptr64 */

+

+void __thiscall

+wil::details::EnabledStateManager::RecordCachedUsageUnderLock

+          (EnabledStateManager *this,

+          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>_>_>

+          *param_1)

+

+{

+  undefined4 *puVar1;

+  undefined4 *puVar2;

+  char *in_R9;

+  

+  puVar1 = *(undefined4 **)(this + 0x28);

+  puVar2 = *(undefined4 **)(this + 0x20);

+  if (0xf < (ulonglong)((longlong)puVar1 - (longlong)puVar2)) {

+    for (; puVar2 != puVar1; puVar2 = puVar2 + 4) {

+      wil_details_RecordCachedUsage(*puVar2,*(uint **)(puVar2 + 2));

+    }

+    *(undefined8 *)(this + 0x28) = *(undefined8 *)(this + 0x20);

+    WilApi_RecordFeatureUsage(0,0xfe,0,in_R9);

+  }

+  return;

+}

+
```

## `wil::details::ReportUsageToService`  (modified)

```diff
--- wil::details::ReportUsageToService
+++ wil::details::ReportUsageToService
@@ -1,2 +1,32 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::ReportUsageToService : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* void __cdecl wil::details::ReportUsageToService(struct wil_details_FeatureReportingCache *

+   __ptr64,unsigned int,int,int,struct FEATURE_LOGGED_TRAITS const * __ptr64,int,enum

+   wil_ReportingKind,unsigned __int64) */

+

+void __cdecl

+wil::details::ReportUsageToService

+          (wil_details_FeatureReportingCache *param_1,uint param_2,int param_3,int param_4,

+          FEATURE_LOGGED_TRAITS *param_5,int param_6,wil_ReportingKind param_7,__uint64 param_8)

+

+{

+  wil_details_ServiceReportingKind wVar1;

+  int iVar2;

+  uint in_stack_ffffffffffffffd0;

+  undefined1 in_stack_ffffffffffffffd8;

+  undefined7 in_stack_ffffffffffffffd9;

+  

+  if (param_7 != 0) {

+    wVar1 = wil_details_MapReportingKind(param_7,param_6);

+    iVar2 = ReportUsageToServiceDirect

+                      (param_1,param_2,param_3,param_4,wVar1,in_stack_ffffffffffffffd0,

+                       CONCAT71(in_stack_ffffffffffffffd9,in_stack_ffffffffffffffd8),

+                       (uchar)param_5[4]);

+    if ((iVar2 != 0) && (g_wil_details_pfnFeatureLoggingHook != (code *)0x0)) {

+      (*g_wil_details_pfnFeatureLoggingHook)(param_2,param_5,0,param_6,&param_7,0,0,1);

+    }

+  }

+  return;

+}

+
```

## `wil::details_abi::heap_buffer::push_back`  (modified)

```diff
--- wil::details_abi::heap_buffer::push_back
+++ wil::details_abi::heap_buffer::push_back
@@ -1,2 +1,31 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details_abi::heap_buffer::push_back : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: bool __cdecl wil::details_abi::heap_buffer::push_back(void const * __ptr64,unsigned

+   __int64) __ptr64 */

+

+bool __thiscall

+wil::details_abi::heap_buffer::push_back(heap_buffer *this,void *param_1,__uint64 param_2)

+

+{

+  ulonglong uVar1;

+  bool bVar2;

+  __uint64 _Var3;

+  

+  if ((ulonglong)(*(longlong *)(this + 0x10) - *(longlong *)this) <=

+      (*(ulonglong *)(this + 8) - *(longlong *)this) + 0x10) {

+    uVar1 = (*(longlong *)(this + 0x10) - *(longlong *)this) * 2;

+    _Var3 = 0x10;

+    if (0x10 < uVar1) {

+      _Var3 = uVar1;

+    }

+    bVar2 = reserve(this,_Var3);

+    if (!bVar2) {

+      return bVar2;

+    }

+  }

+  uVar1 = *(ulonglong *)(this + 8);

+  memcpy_s(uVar1,-(ulonglong)(uVar1 < *(ulonglong *)(this + 0x10)) &

+                 *(longlong *)(this + 0x10) - uVar1,param_1,0x10);

+  *(longlong *)(this + 8) = *(longlong *)(this + 8) + 0x10;

+  return true;

+}

+
```

## `CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert`  (modified)

```diff
--- CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert
+++ CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert
@@ -1,2 +1,455 @@
-Failed to decompile rdpbase.dll - .ProgramDB CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

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

+   guard_dispatch_icall */

+/* WARNING: Type propagation algorithm not settling */

+/* private: long __cdecl CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert(unsigned char *

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

+

+long __thiscall

+CRDPENCCONSecurityFilterStream::ValidateRDSTLSLogonCert

+          (CRDPENCCONSecurityFilterStream *this,uchar *param_1,ulong param_2,ulong *param_3)

+

+{

+  CRDPENCCONSecurityFilterStream *pCVar1;

+  bool bVar2;

+  ulong uVar3;

+  int iVar4;

+  ulong uVar5;

+  NTSTATUS NVar6;

+  _GUID *p_Var7;

+  _tlgWrapSz<char> *p_Var8;

+  _tlgProvider_t *p_Var9;

+  _GUID *p_Var10;

+  _tlgProvider_t *p_Var11;

+  char *pcVar12;

+  FeatureImpl<struct___WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry> *pFVar13;

+  ulonglong uVar14;

+  undefined *puVar15;

+  _GUID *p_Var16;

+  ushort *puVar17;

+  _GUID *p_Var18;

+  undefined1 auStackY_1a8 [32];

+  _tlgWrapSz<char> *p_Var19;

+  _GUID *p_Var20;

+  _tlgWrapSz<char> *p_Var21;

+  _GUID local_138;

+  uchar *local_128;

+  ulong *local_120;

+  char *local_118;

+  char *local_110;

+  _GUID *local_108;

+  uchar local_100 [8];

+  ulong local_f8 [2];

+  char *local_f0;

+  char *local_e8;

+  ushort *local_e0;

+  undefined1 local_d8 [16];

+  _LSA_STRING local_c8;

+  _LUID local_b8;

+  PVOID local_b0;

+  _TOKEN_SOURCE local_a8;

+  _QUOTA_LIMITS local_98;

+  char local_68 [24];

+  ulonglong local_50;

+  

+  local_50 = __security_cookie ^ (ulonglong)auStackY_1a8;

+  p_Var9 = (_tlgProvider_t *)0x0;

+  *param_3 = 0x52e;

+  local_d8[8] = '\0';

+  local_d8[9] = '\0';

+  local_d8[10] = '\0';

+  local_d8[0xb] = '\0';

+  local_d8[0xc] = '\0';

+  local_d8[0xd] = '\0';

+  local_d8[0xe] = '\0';

+  local_d8[0xf] = '\0';

+  local_108 = (_GUID *)0x0;

+  local_e0 = (ushort *)0x0;

+  local_f8[0] = 0;

+  local_d8._0_4_ = 0;

+  if (*(longlong *)(this + 0x178) == 0) {

+    return 0x8000ffff;

+  }

+  p_Var18 = (_GUID *)((longlong)local_d8 + 8);

+  p_Var16 = &local_138;

+  pcVar12 = (char *)this;

+  local_138.Data1 = param_2;

+  local_128 = param_1;

+  local_120 = param_3;

+  uVar3 = NextStringInMessage(this,&local_128,&p_Var16->Data1,(ushort **)p_Var18);

+  if ((int)uVar3 < 0) {

+    if (DAT_1 < 3) goto LAB_1800e4e4c;

+    local_138.Data1 = 0x832;

+    local_100 = (uchar  [8])0x18017ab08;

+    p_Var20 = &local_138;

+    p_Var7 = (_GUID *)local_138.Data4;

+    local_138.Data4._0_4_ = uVar3;

+LAB_2:

+    p_Var10 = (_GUID *)local_100;

+    p_Var21 = (_tlgWrapSz<char> *)&local_120;

+    p_Var19 = (_tlgWrapSz<char> *)&local_128;

+    local_108 = (_GUID *)0x18016e9d0;

+    puVar15 = &DAT_3;

+    local_128 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+    local_120 = (ulong *)0x18017adc8;

+    p_Var8 = (_tlgWrapSz<char> *)&local_108;

+  }

+  else {

+    p_Var18 = (_GUID *)&local_108;

+    p_Var16 = &local_138;

+    uVar3 = NextStringInMessage((CRDPENCCONSecurityFilterStream *)pcVar12,&local_128,&p_Var16->Data1

+                                ,(ushort **)p_Var18);

+    if ((int)uVar3 < 0) {

+      if (DAT_1 < 3) goto LAB_1800e4e4c;

+      local_138.Data4[0] = '8';

+      local_138.Data4[1] = '\b';

+      local_138.Data4[2] = '\0';

+      local_138.Data4[3] = '\0';

+      local_100 = (uchar  [8])0x18017ab08;

+      p_Var20 = (_GUID *)local_138.Data4;

+      p_Var7 = &local_138;

+      local_138.Data1 = uVar3;

+      goto LAB_2;

+    }

+    if (local_138.Data1 != 0) {

+      uVar3 = 0x8007000d;

+      if (DAT_1 < 3) goto LAB_1800e4e4c;

+      local_138.Data4[0] = '@';

+      local_138.Data4[1] = '\b';

+      local_138.Data4[2] = '\0';

+      local_138.Data4[3] = '\0';

+      local_100 = (uchar  [8])0x18017ab50;

+      local_138.Data1 = 0x8007000d;

+      p_Var20 = (_GUID *)local_138.Data4;

+      p_Var7 = &local_138;

+      goto LAB_2;

+    }

+    p_Var18 = (_GUID *)&local_e0;

+    pcVar12 = (char *)this;

+    p_Var16 = local_108;

+    uVar3 = DecryptRDSTLSPasswordCreds

+                      (this,(ushort *)local_d8._8_8_,(ushort *)local_108,(ushort **)p_Var18,local_f8

+                      );

+    if ((int)uVar3 < 0) {

+      if (DAT_1 < 3) goto LAB_1800e4e4c;

+      local_138.Data4[0] = 'H';

+      local_138.Data4[1] = '\b';

+      local_138.Data4[2] = '\0';

+      local_138.Data4[3] = '\0';

+      local_100 = (uchar  [8])0x18017ab80;

+      p_Var20 = (_GUID *)local_138.Data4;

+      p_Var7 = &local_138;

+      local_138.Data1 = uVar3;

+      goto LAB_2;

+    }

+    pCVar1 = this + 0x210;

+    if ((*(short *)pCVar1 == 2) || (*(short *)pCVar1 == 0x17)) {

+      p_Var16 = (_GUID *)local_d8;

+      SeciAllocateAndSetIPAddress(pCVar1,*(undefined4 *)(this + 0x20c));

+    }

+    iVar4 = IsNGCValidationEnabled();

+    if (iVar4 == 0) {

+      p_Var11 = *(_tlgProvider_t **)(this + 0x178);

+      p_Var16 = (_GUID *)(this + 0x1d0);

+      uVar3 = (**(code **)(*(longlong *)p_Var11 + 0x18))(p_Var11,local_e0);

+      if (4 < DAT_1) {

+        local_100 = (uchar  [8])0x18017ade0;

+        local_138.Data4._0_4_ = uVar3;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>_>

+                  (p_Var11,&DAT_4,p_Var16,p_Var18,(_tlgWrapSz<char> *)local_100,

+                   (_tlgWrapperByVal<4> *)local_138.Data4);

+      }

+    }

+    iVar4 = IsNGCValidationEnabled();

+    if (iVar4 == 0) {

+LAB_5:

+      p_Var11 = *(_tlgProvider_t **)(this + 0x180);

+      if (p_Var11 != (_tlgProvider_t *)0x0) {

+        (**(code **)(*(longlong *)p_Var11 + 0xb8))(p_Var11,uVar3);

+      }

+      if ((int)uVar3 < 0) {

+        if (2 < DAT_1) {

+          local_e8 = "m_spRestrictedCallsCallbackPrivate->ValidateLogonCert failed.";

+          local_128 = (uchar *)CONCAT44(local_128._4_4_,0x8b4);

+          this = (CRDPENCCONSecurityFilterStream *)p_Var11;

+LAB_6:

+          local_120 = (ulong *)0x18016e9d0;

+          local_118 = (char *)CONCAT44(local_118._4_4_,uVar3);

+          local_110 = 

+          "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+          local_f0 = "ValidateRDSTLSLogonCert";

+          _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+          ::

+          Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+                    ((_tlgProvider_t *)this,&DAT_3,p_Var16,p_Var18,

+                     (_tlgWrapSz<char> *)&local_120,(_tlgWrapperByVal<4> *)&local_118,

+                     (_tlgWrapSz<char> *)&local_110,(_tlgWrapperByVal<4> *)&local_128,

+                     (_tlgWrapSz<char> *)&local_f0,(_tlgWrapSz<char> *)&local_e8);

+        }

+      }

+      else {

+        uVar3 = StoreCredentials(this,local_e0);

+        if ((int)uVar3 < 0) {

+          if (2 < DAT_1) {

+            local_e8 = "this->StoreCredentials failed.";

+            local_128 = (uchar *)CONCAT44(local_128._4_4_,0x8b8);

+            goto LAB_6;

+          }

+        }

+        else {

+          *param_3 = 0;

+        }

+      }

+      if (p_Var9 == (_tlgProvider_t *)0x0) goto LAB_0;

+LAB_7:

+      p_Var11 = p_Var9;

+      for (uVar14 = (ulonglong)local_f8[0]; uVar14 != 0; uVar14 = uVar14 - 1) {

+        *p_Var11 = (_tlgProvider_t)0x0;

+        p_Var11 = p_Var11 + 1;

+      }

+      operator_delete(p_Var9);

+      goto LAB_0;

+    }

+    local_100[0] = '\0';

+    local_100[1] = '\0';

+    local_100[2] = '\0';

+    local_100[3] = '\0';

+    local_100[4] = '\0';

+    local_100[5] = '\0';

+    local_100[6] = '\0';

+    local_100[7] = '\0';

+    if (4 < DAT_1) {

+      p_Var16 = (_GUID *)0x0;

+      local_128 = "Using NGC validation path";

+      _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+      ::Write<_tlgWrapSz<char>_>

+                ((_tlgProvider_t *)&DAT_1,&DAT_180198c1a,(_GUID *)0x0,p_Var18,

+                 (_tlgWrapSz<char> *)&local_128);

+    }

+    builtin_strncpy(local_68,"Terminal Services API",0x16);

+    local_c8.Buffer = local_68;

+    local_a8.SourceName[0] = '\0';

+    local_a8.SourceName[1] = '\0';

+    local_a8.SourceName[2] = '\0';

+    local_a8.SourceName[3] = '\0';

+    local_a8.SourceName[4] = '\0';

+    local_a8.SourceName[5] = '\0';

+    local_a8.SourceName[6] = '\0';

+    local_a8.SourceName[7] = '\0';

+    local_a8.SourceIdentifier.LowPart = 0;

+    local_a8.SourceIdentifier.HighPart = 0;

+    local_138.Data1 = 0;

+    local_98.PagedPoolLimit = 0;

+    local_98.NonPagedPoolLimit = 0;

+    local_c8.Length = 0x16;

+    local_c8.MaximumLength = 0x16;

+    local_c8._4_4_ = 0;

+    local_98.MinimumWorkingSetSize = 0;

+    local_98.MaximumWorkingSetSize = 0;

+    local_b0 = (PVOID)0x0;

+    local_98.PagefileLimit = 0;

+    local_98.TimeLimit.QuadPart = 0;

+    local_108 = (_GUID *)((ulonglong)local_108 & 0xffffffff00000000);

+    local_b8.LowPart = 0;

+    local_b8.HighPart = 0;

+    local_d8._8_8_ = local_d8._8_8_ & 0xffffffff00000000;

+    p_Var9 = operator_new((ulonglong)local_f8[0]);

+    if (p_Var9 != (_tlgProvider_t *)0x0) {

+      p_Var16 = (_GUID *)(ulonglong)(local_f8[0] >> 1);

+      wcsncpy_s(p_Var9);

+      p_Var18 = (_GUID *)0x0;

+      uVar3 = GetLogonBlobForCertValidation((ushort *)p_Var9,&local_138.Data1,(uchar *)0x0);

+      if (((int)uVar3 < 0) && (3 < DAT_1)) {

+        local_110 = "ValidateRDSTLSLogonCert";

+        local_128 = "GetLogonBlobForCertValidation failed when telling us how big of a buffer.";

+        local_118 = "HResult failed but continue";

+        local_138.Data4._0_4_ = uVar3;

+        _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+        ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                  ((_tlgProvider_t *)"HResult failed but continue",&DAT_8,p_Var18,p_Var16,

+                   (_tlgWrapSz<char> *)&local_118,(_tlgWrapSz<char> *)&local_128,

+                   (_tlgWrapperByVal<4> *)local_138.Data4,(_tlgWrapSz<char> *)&local_110);

+      }

+      p_Var10 = operator_new((ulonglong)local_138.Data1);

+      if (p_Var10 == (_GUID *)0x0) {

+        uVar3 = 0x8007000e;

+        if (2 < DAT_1) {

+          pcVar12 = "Could not allocate pPackedCredentials variable";

+          local_138.Data4[0] = 0x81;

+          local_138.Data4[1] = '\b';

+          local_138.Data4[2] = '\0';

+          local_138.Data4[3] = '\0';

+          local_110 = "Could not allocate pPackedCredentials variable";

+          local_138.Data1 = 0x8007000e;

+LAB_9:

+          uVar3 = local_138.Data1;

+          local_128 = 

+          "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+          local_118 = "Error HResult failed";

+          local_120 = (ulong *)0x18017adc8;

+          _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+          ::

+          Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+                    ((_tlgProvider_t *)pcVar12,&DAT_10,p_Var18,p_Var16,

+                     (_tlgWrapSz<char> *)&local_118,(_tlgWrapperByVal<4> *)&local_138,

+                     (_tlgWrapSz<char> *)&local_128,(_tlgWrapperByVal<4> *)local_138.Data4,

+                     (_tlgWrapSz<char> *)&local_120,(_tlgWrapSz<char> *)&local_110);

+        }

+      }

+      else {

+        pcVar12 = (char *)p_Var9;

+        p_Var18 = p_Var10;

+        uVar3 = GetLogonBlobForCertValidation((ushort *)p_Var9,&local_138.Data1,(uchar *)p_Var10);

+        if ((int)uVar3 < 0) {

+          if (2 < DAT_1) {

+            local_138.Data4[0] = 0x84;

+            local_138.Data4[1] = '\b';

+            local_138.Data4[2] = '\0';

+            local_138.Data4[3] = '\0';

+            local_110 = "GetLogonBlobForCertValidation failed after allocating buffer";

+            local_138.Data1 = uVar3;

+            goto LAB_9;

+          }

+        }

+        else {

+          uVar5 = LsaConnectUntrusted((PHANDLE)local_100);

+          if (-1 < (int)uVar5) {

+            p_Var18 = (_GUID *)0x0;

+            p_Var16 = (_GUID *)0x3;

+            NVar6 = LsaLogonUser((HANDLE)local_100,&local_c8,Network,0,p_Var10,local_138.Data1,

+                                 (PTOKEN_GROUPS)0x0,&local_a8,&local_b0,(PULONG)&local_108,&local_b8

+                                 ,(PHANDLE)(this + 0x1d0),&local_98,

+                                 (PNTSTATUS)((longlong)local_d8 + 8));

+            if (NVar6 < 0) {

+              param_3 = local_120;

+              uVar3 = 0x80004005;

+              if (2 < DAT_1) {

+                local_118 = (char *)CONCAT44(local_118._4_4_,NVar6);

+                local_138.Data4[0] = '\x05';

+                local_138.Data4[1] = '@';

+                local_138.Data4[2] = '\0';

+                local_138.Data4[3] = 0x80;

+                local_e8 = "LogonUser and LsaLogonuser with NGC cert failed";

+                local_f0 = "ValidateRDSTLSLogonCert";

+                local_138.Data1 = 0x8a0;

+                local_110 = 

+                "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+                local_128 = (uchar *)CONCAT44(local_128._4_4_,0x80004005);

+                _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                ::

+                Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapperByVal<4>_>

+                          ((_tlgProvider_t *)0x80004005,&DAT_11,p_Var16,p_Var18,

+                           (_tlgWrapSz<char> *)&local_e8,(_tlgWrapperByVal<4> *)&local_128,

+                           (_tlgWrapSz<char> *)&local_110,(_tlgWrapperByVal<4> *)&local_138,

+                           (_tlgWrapSz<char> *)&local_f0,(_tlgWrapperByVal<4> *)local_138.Data4,

+                           (_tlgWrapperByVal<4> *)&local_118);

+                param_3 = local_120;

+                uVar3 = 0x80004005;

+              }

+            }

+            else {

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

+                         ::__l2::impl;

+              bVar2 = wil::details::

+                      FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

+                      ::__private_IsEnabled

+                                ((FeatureImpl<__WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

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

+                                     ::__l2::impl);

+              if (bVar2) {

+                pFVar13 = *(FeatureImpl<struct___WilFeatureTraits_Feature_AuthenticationPackageUtilizationTelemetry>

+                            **)(this + 0x1d0);

+                uVar3 = SecUtils::TraceAuthenticationPackageInfo(pFVar13);

+                if (((int)uVar3 < 0) && (3 < DAT_1)) {

+                  local_128 = (uchar *)CONCAT44(local_128._4_4_,uVar3);

+                  local_e8 = "ValidateRDSTLSLogonCert";

+                  local_f0 = "Failed to log authentication package info";

+                  local_110 = "HResult failed but continue";

+                  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                  ::Write<_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                            ((_tlgProvider_t *)pFVar13,&DAT_12,p_Var16,p_Var18,

+                             (_tlgWrapSz<char> *)&local_110,(_tlgWrapSz<char> *)&local_f0,

+                             (_tlgWrapperByVal<4> *)&local_128,(_tlgWrapSz<char> *)&local_e8);

+                }

+              }

+              if (4 < DAT_1) {

+                local_128 = (uchar *)CONCAT44(local_128._4_4_,NVar6);

+                local_e8 = "LsaLogonuser with NGC was successful";

+                local_118 = (char *)CONCAT44(local_118._4_4_,uVar3);

+                _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                ::Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapperByVal<4>_>

+                          ((_tlgProvider_t *)pFVar13,&DAT_13,p_Var16,p_Var18,

+                           (_tlgWrapSz<char> *)&local_e8,(_tlgWrapperByVal<4> *)&local_118,

+                           (_tlgWrapperByVal<4> *)&local_128);

+              }

+              uVar3 = 0;

+              param_3 = local_120;

+            }

+            goto LAB_5;

+          }

+          uVar3 = 0x80004005;

+          if (2 < DAT_1) {

+            local_120 = (ulong *)0x18017adc8;

+            local_110 = "LsaConnectUntrusted failed";

+            local_f0 = "Error HResult failed";

+            local_138.Data1 = 0x88a;

+            local_128 = 

+            "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+            local_118 = (char *)CONCAT44(local_118._4_4_,0x80004005);

+            local_138.Data4._0_4_ = uVar5;

+            _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+            ::

+            Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>,_tlgWrapperByVal<4>_>

+                      ((_tlgProvider_t *)0x80004005,&DAT_14,p_Var18,p_Var16,

+                       (_tlgWrapSz<char> *)&local_f0,(_tlgWrapperByVal<4> *)&local_118,

+                       (_tlgWrapSz<char> *)&local_128,(_tlgWrapperByVal<4> *)&local_138,

+                       (_tlgWrapSz<char> *)&local_120,(_tlgWrapSz<char> *)&local_110,

+                       (_tlgWrapperByVal<4> *)local_138.Data4);

+          }

+        }

+      }

+      goto LAB_7;

+    }

+    uVar3 = 0x8007000e;

+    if (DAT_1 < 3) goto LAB_1800e4e4c;

+    local_138.Data1 = 0x8007000e;

+    pcVar12 = "Could not allocate tempCert variable";

+    local_120 = (ulong *)0x18017ae30;

+    local_110 = "Error HResult failed";

+    puVar15 = &DAT_10;

+    p_Var10 = (_GUID *)&local_120;

+    local_128 = "ValidateRDSTLSLogonCert";

+    p_Var21 = (_tlgWrapSz<char> *)&local_128;

+    p_Var20 = (_GUID *)local_138.Data4;

+    p_Var19 = (_tlgWrapSz<char> *)&local_118;

+    p_Var7 = &local_138;

+    p_Var8 = (_tlgWrapSz<char> *)&local_110;

+    local_138.Data4[0] = 'w';

+    local_138.Data4[1] = '\b';

+    local_138.Data4[2] = '\0';

+    local_138.Data4[3] = '\0';

+    local_118 = "onecore\\termsrv\\rdpplatform\\rdpenc\\transports\\rdpenccon\\rdpencsecfilter.cpp";

+    uVar3 = 0x8007000e;

+  }

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            ((_tlgProvider_t *)pcVar12,puVar15,p_Var16,p_Var18,p_Var8,(_tlgWrapperByVal<4> *)p_Var7,

+             p_Var19,(_tlgWrapperByVal<4> *)p_Var20,p_Var21,(_tlgWrapSz<char> *)p_Var10);

+LAB_0:

+  if (local_e0 != (ushort *)0x0) {

+    puVar17 = local_e0;

+    for (uVar14 = (ulonglong)local_f8[0]; uVar14 != 0; uVar14 = uVar14 - 1) {

+      *(undefined1 *)puVar17 = 0;

+      puVar17 = (ushort *)((longlong)puVar17 + 1);

+    }

+    operator_delete(local_e0);

+  }

+  if (local_d8._0_4_ != 0) {

+    SeciFreeCallContext();

+  }

+  return uVar3;

+}

+
```

## `wil::details::WilApi_RecordFeatureUsageReports`  (modified)

```diff
--- wil::details::WilApi_RecordFeatureUsageReports
+++ wil::details::WilApi_RecordFeatureUsageReports
@@ -1,2 +1,25 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::WilApi_RecordFeatureUsageReports : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* void __cdecl wil::details::WilApi_RecordFeatureUsageReports(struct __WIL_RTL_FEATURE_USAGE_DATA *

+   __ptr64,unsigned __int64) */

+

+void __cdecl

+wil::details::WilApi_RecordFeatureUsageReports

+          (__WIL_RTL_FEATURE_USAGE_DATA *param_1,__uint64 param_2)

+

+{

+  __WIL_RTL_FEATURE_USAGE_DATA *p_Var1;

+  char *in_R9;

+  

+  if (param_2 != 0) {

+    p_Var1 = param_1 + 4;

+    do {

+      WilApi_RecordFeatureUsage

+                (*(uint *)(p_Var1 + -4),(uint)*(ushort *)p_Var1,(uint)*(ushort *)(p_Var1 + 2),in_R9)

+      ;

+      p_Var1 = p_Var1 + 8;

+      param_2 = param_2 - 1;

+    } while (param_2 != 0);

+  }

+  return;

+}

+
```

## `CloudAPHelper::ValidateRdpAssertion`  (modified)

```diff
--- CloudAPHelper::ValidateRdpAssertion
+++ CloudAPHelper::ValidateRdpAssertion
@@ -1,2 +1,449 @@
-Failed to decompile rdpbase.dll - .ProgramDB CloudAPHelper::ValidateRdpAssertion : 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 CloudAPHelper::ValidateRdpAssertion(char const * __ptr64,unsigned

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

+   __ptr64 */

+

+long __thiscall

+CloudAPHelper::ValidateRdpAssertion

+          (CloudAPHelper *this,char *param_1,ulong param_2,ushort *param_3,uchar **param_4,

+          ulong *param_5)

+

+{

+  uint uVar1;

+  long lVar2;

+  _tlgWrapSz<char> *p_Var3;

+  _tlgProvider_t *p_Var4;

+  _tlgProvider_t *p_Var5;

+  undefined4 in_register_00000084;

+  uchar auVar6 [8];

+  uchar auVar7 [8];

+  _GUID *p_Var8;

+  uint local_res10 [2];

+  _tlgWrapperByVal<4> *p_Var9;

+  _tlgWrapSz<char> *p_Var10;

+  _tlgWrapperByVal<4> *p_Var11;

+  _tlgWrapSz<char> *p_Var12;

+  _tlgWrapSz<char> *p_Var13;

+  long local_88;

+  undefined4 local_84;

+  char *local_80;

+  char *local_78;

+  char *local_70;

+  char *local_68;

+  _tlgProvider_t *local_60;

+  uint local_58;

+  ulong local_54;

+  uchar local_50 [8];

+  _tlgProvider_t *local_48;

+  PVOID local_40;

+  uchar local_38 [2] [8];

+  

+  auVar6._4_4_ = in_register_00000084;

+  auVar6._0_4_ = param_2;

+  local_60 = (_tlgProvider_t *)0x0;

+  local_50[0] = '\0';

+  local_50[1] = '\0';

+  local_50[2] = '\0';

+  local_50[3] = '\0';

+  local_50[4] = '\0';

+  local_50[5] = '\0';

+  local_50[6] = '\0';

+  local_50[7] = '\0';

+  local_res10[0] = 0;

+  local_38[0][0] = '\0';

+  local_38[0][1] = '\0';

+  local_38[0][2] = '\0';

+  local_38[0][3] = '\0';

+  local_38[0][4] = '\0';

+  local_38[0][5] = '\0';

+  local_38[0][6] = '\0';

+  local_38[0][7] = '\0';

+  local_58 = 0;

+  local_40 = (PVOID)0x0;

+  local_54 = 0;

+  local_48 = (_tlgProvider_t *)0x0;

+  p_Var8 = (_GUID *)param_3;

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

+    lVar2 = -0x7ff8ffa9;

+    if (DAT_1 < 3) goto LAB_180150e70;

+    local_88 = 0xf3;

+    local_68 = "Missing paramter pRdpAssertion";

+    local_84 = 0x80070057;

+    local_80 = "ValidateRdpAssertion";

+    local_78 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    local_70 = "Error condition failed";

+    p_Var13 = (_tlgWrapSz<char> *)&local_68;

+    p_Var12 = (_tlgWrapSz<char> *)&local_80;

+    p_Var11 = (_tlgWrapperByVal<4> *)&local_88;

+    p_Var10 = (_tlgWrapSz<char> *)&local_78;

+    p_Var9 = (_tlgWrapperByVal<4> *)&local_84;

+    p_Var3 = (_tlgWrapSz<char> *)&local_70;

+    p_Var4 = (_tlgProvider_t *)0x80070057;

+  }

+  else if (param_4 == (uchar **)0x0) {

+    lVar2 = -0x7ff8ffa9;

+    if (DAT_1 < 3) goto LAB_180150e70;

+    local_84 = 0xf4;

+    local_70 = "Missing paramter ppAuthBlob";

+    local_88 = -0x7ff8ffa9;

+    local_78 = "ValidateRdpAssertion";

+    local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    local_68 = "Error condition failed";

+    p_Var13 = (_tlgWrapSz<char> *)&local_70;

+    p_Var12 = (_tlgWrapSz<char> *)&local_78;

+    p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+    p_Var10 = (_tlgWrapSz<char> *)&local_80;

+    p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+    p_Var3 = (_tlgWrapSz<char> *)&local_68;

+    p_Var4 = (_tlgProvider_t *)0x80070057;

+    lVar2 = -0x7ff8ffa9;

+  }

+  else if (param_5 == (ulong *)0x0) {

+    lVar2 = -0x7ff8ffa9;

+    if (DAT_1 < 3) goto LAB_180150e70;

+    local_84 = 0xf5;

+    local_70 = "Missing paramter pcbAuthBlob";

+    local_88 = -0x7ff8ffa9;

+    local_78 = "ValidateRdpAssertion";

+    local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+    local_68 = "Error condition failed";

+    p_Var13 = (_tlgWrapSz<char> *)&local_70;

+    p_Var12 = (_tlgWrapSz<char> *)&local_78;

+    p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+    p_Var10 = (_tlgWrapSz<char> *)&local_80;

+    p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+    p_Var3 = (_tlgWrapSz<char> *)&local_68;

+    p_Var4 = (_tlgProvider_t *)0x80070057;

+  }

+  else {

+    p_Var4 = (_tlgProvider_t *)&local_60;

+    lVar2 = GetInstanceOfJsonHelper((IJsonHelper **)p_Var4);

+    p_Var5 = local_60;

+    if (lVar2 < 0) {

+      if (DAT_1 < 3) goto LAB_180150e70;

+      local_84 = 0xfd;

+      local_70 = "GetInstanceOfJsonHelper failed";

+      local_78 = "ValidateRdpAssertion";

+      local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+      local_68 = "Error HResult failed";

+      p_Var13 = (_tlgWrapSz<char> *)&local_70;

+      p_Var12 = (_tlgWrapSz<char> *)&local_78;

+      p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+      p_Var10 = (_tlgWrapSz<char> *)&local_80;

+      p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+      p_Var3 = (_tlgWrapSz<char> *)&local_68;

+      local_88 = lVar2;

+    }

+    else {

+      auVar6[4] = '\0';

+      auVar6[5] = '\0';

+      auVar6[6] = '\0';

+      auVar6[7] = '\0';

+      p_Var4 = local_60;

+      lVar2 = (**(code **)(*(longlong *)local_60 + 0x38))(local_60,param_1);

+      if (lVar2 < 0) {

+        if (DAT_1 < 3) goto LAB_180150e70;

+        local_84 = 0xff;

+        local_70 = "spJsonHelper->SetJsonString failed";

+        local_78 = "ValidateRdpAssertion";

+        local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+        local_68 = "Error HResult failed";

+        p_Var13 = (_tlgWrapSz<char> *)&local_70;

+        p_Var12 = (_tlgWrapSz<char> *)&local_78;

+        p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+        p_Var10 = (_tlgWrapSz<char> *)&local_80;

+        p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+        p_Var3 = (_tlgWrapSz<char> *)&local_68;

+        local_88 = lVar2;

+      }

+      else {

+        p_Var4 = p_Var5;

+        lVar2 = (**(code **)(*(longlong *)p_Var5 + 0x78))(p_Var5,L"rdp_resourceid");

+        if (lVar2 < 0) {

+          if (DAT_1 < 3) goto LAB_180150e70;

+          local_84 = 0x102;

+          local_70 = "spJsonHelper->SetValue(rdp_resourceid) failed";

+          local_78 = "ValidateRdpAssertion";

+          local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+          local_68 = "Error HResult failed";

+          p_Var13 = (_tlgWrapSz<char> *)&local_70;

+          p_Var12 = (_tlgWrapSz<char> *)&local_78;

+          p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+          p_Var10 = (_tlgWrapSz<char> *)&local_80;

+          p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+          p_Var3 = (_tlgWrapSz<char> *)&local_68;

+          auVar6 = (uchar  [8])param_3;

+          local_88 = lVar2;

+        }

+        else {

+          auVar7 = (uchar  [8])local_res10;

+          p_Var4 = p_Var5;

+          lVar2 = (**(code **)(*(longlong *)p_Var5 + 0x30))(p_Var5,local_50);

+          if (lVar2 < 0) {

+            if (DAT_1 < 3) goto LAB_180150e70;

+            local_84 = 0x105;

+            local_70 = "spJsonHelper->GetJsonStringAsByteArray failed";

+            local_78 = "ValidateRdpAssertion";

+            local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+            local_68 = "Error HResult failed";

+            p_Var13 = (_tlgWrapSz<char> *)&local_70;

+            p_Var12 = (_tlgWrapSz<char> *)&local_78;

+            p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+            p_Var10 = (_tlgWrapSz<char> *)&local_80;

+            p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+            p_Var3 = (_tlgWrapSz<char> *)&local_68;

+            auVar6 = auVar7;

+            local_88 = lVar2;

+          }

+          else {

+            if (p_Var5 != (_tlgProvider_t *)0x0) {

+              TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)&local_60)

+              ;

+              local_60 = (_tlgProvider_t *)0x0;

+            }

+            auVar6 = local_50;

+            uVar1 = local_res10[0];

+            p_Var5 = (_tlgProvider_t *)&local_60;

+            lVar2 = GetInstanceOfJsonHelper((IJsonHelper **)p_Var5);

+            p_Var4 = local_60;

+            if (lVar2 < 0) {

+              if (DAT_1 < 3) goto LAB_180150e70;

+              local_84 = 0x10b;

+              local_70 = "GetInstanceOfJsonHelper failed";

+              local_78 = "ValidateRdpAssertion";

+              local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+              local_68 = "Error HResult failed";

+              p_Var13 = (_tlgWrapSz<char> *)&local_70;

+              p_Var12 = (_tlgWrapSz<char> *)&local_78;

+              p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+              p_Var10 = (_tlgWrapSz<char> *)&local_80;

+              p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+              p_Var3 = (_tlgWrapSz<char> *)&local_68;

+              p_Var4 = p_Var5;

+              auVar6 = auVar7;

+              local_88 = lVar2;

+            }

+            else {

+              p_Var5 = local_60;

+              lVar2 = (**(code **)(*(longlong *)local_60 + 0x68))

+                                (local_60,L"call",0x4024000000000000);

+              if (lVar2 < 0) {

+                if (DAT_1 < 3) goto LAB_180150e70;

+                local_84 = 0x10d;

+                local_70 = "spJsonHelper->SetValue(call) failed";

+                local_78 = "ValidateRdpAssertion";

+                local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                local_68 = "Error HResult failed";

+                p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                p_Var4 = p_Var5;

+                auVar6 = auVar7;

+                local_88 = lVar2;

+              }

+              else {

+                p_Var8 = (_GUID *)(ulonglong)uVar1;

+                p_Var5 = p_Var4;

+                lVar2 = (**(code **)(*(longlong *)p_Var4 + 0x70))(p_Var4,L"payload");

+                if (lVar2 < 0) {

+                  if (DAT_1 < 3) goto LAB_180150e70;

+                  local_84 = 0x110;

+                  local_70 = "spJsonHelper->SetValue(payload) failed";

+                  local_78 = "ValidateRdpAssertion";

+                  local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                  local_68 = "Error HResult failed";

+                  p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                  p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                  p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                  p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                  p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                  p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                  p_Var4 = p_Var5;

+                  local_88 = lVar2;

+                }

+                else {

+                  auVar6 = (uchar  [8])((longlong)this + 0x48);

+                  p_Var5 = p_Var4;

+                  lVar2 = (**(code **)(*(longlong *)p_Var4 + 0x78))(p_Var4,L"correlationId");

+                  if (lVar2 < 0) {

+                    if (DAT_1 < 3) goto LAB_180150e70;

+                    local_84 = 0x113;

+                    local_70 = "spJsonHelper->SetValue(correlationId) failed";

+                    local_78 = "ValidateRdpAssertion";

+                    local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                    local_68 = "Error HResult failed";

+                    p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                    p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                    p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                    p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                    p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                    p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                    p_Var4 = p_Var5;

+                    local_88 = lVar2;

+                  }

+                  else {

+                    auVar6 = (uchar  [8])&local_58;

+                    p_Var5 = p_Var4;

+                    lVar2 = (**(code **)(*(longlong *)p_Var4 + 0x30))(p_Var4,local_38);

+                    if (lVar2 < 0) {

+                      if (DAT_1 < 3) goto LAB_180150e70;

+                      local_84 = 0x116;

+                      local_70 = "spJsonHelper->GetJsonStringAsByteArray failed";

+                      local_78 = "ValidateRdpAssertion";

+                      local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                      local_68 = "Error HResult failed";

+                      p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                      p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                      p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                      p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                      p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                      p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                      p_Var4 = p_Var5;

+                      local_88 = lVar2;

+                    }

+                    else {

+                      auVar6[4] = '\0';

+                      auVar6[5] = '\0';

+                      auVar6[6] = '\0';

+                      auVar6[7] = '\0';

+                      auVar6[0] = (undefined1)local_58;

+                      auVar6[1] = local_58._1_1_;

+                      auVar6[2] = local_58._2_1_;

+                      auVar6[3] = local_58._3_1_;

+                      p_Var8 = (_GUID *)&local_40;

+                      lVar2 = CallCloudAP(this,(uchar *)local_38[0],local_58,(void **)p_Var8,

+                                          &local_54);

+                      if (lVar2 < 0) {

+                        if (DAT_1 < 3) goto LAB_180150e70;

+                        local_84 = 0x119;

+                        local_70 = "CallCloudAP failed";

+                        local_78 = "ValidateRdpAssertion";

+                        local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                        local_68 = "Error HResult failed";

+                        p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                        p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                        p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                        p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                        p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                        p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                        p_Var4 = (_tlgProvider_t *)this;

+                        local_88 = lVar2;

+                      }

+                      else {

+                        if ((local_40 == (PVOID)0x0) ||

+                           (auVar6[4] = '\0', auVar6[5] = '\0', auVar6[6] = '\0', auVar6[7] = '\0',

+                           auVar6[0] = (undefined1)local_54, auVar6[1] = local_54._1_1_,

+                           auVar6[2] = local_54._2_1_, auVar6[3] = local_54._3_1_, local_54 == 0)) {

+                          lVar2 = -0x7fffbffb;

+                          if (2 < DAT_1) {

+                            local_84 = 0x11e;

+                            local_70 = "ValidateRdpAssertion";

+                            local_88 = -0x7fffbffb;

+                            local_78 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                            local_80 = 

+                            "CloudAP returned an empty responce to the RDP assertion validation request"

+                            ;

+                            _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+                            ::

+                            Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>_>

+                                      ((_tlgProvider_t *)this,&DAT_2,(_GUID *)auVar6,p_Var8,

+                                       (_tlgWrapSz<char> *)&local_80,

+                                       (_tlgWrapperByVal<4> *)&local_88,

+                                       (_tlgWrapSz<char> *)&local_78,

+                                       (_tlgWrapperByVal<4> *)&local_84,

+                                       (_tlgWrapSz<char> *)&local_70);

+                          }

+                          goto LAB_0;

+                        }

+                        p_Var5 = p_Var4;

+                        lVar2 = (**(code **)(*(longlong *)p_Var4 + 0x38))();

+                        if (lVar2 < 0) {

+                          if (DAT_1 < 3) goto LAB_180150e70;

+                          local_84 = 0x128;

+                          local_70 = "spJsonHelper->SetJsonString failed";

+                          local_78 = "ValidateRdpAssertion";

+                          local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                          local_68 = "Error HResult failed";

+                          p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                          p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                          p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                          p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                          p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                          p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                          p_Var4 = p_Var5;

+                          local_88 = lVar2;

+                        }

+                        else {

+                          auVar6 = (uchar  [8])&local_48;

+                          lVar2 = (**(code **)(*(longlong *)p_Var4 + 0x58))(p_Var4,L"authbuffer");

+                          if (lVar2 < 0) {

+                            if (DAT_1 < 3) goto LAB_180150e70;

+                            local_84 = 299;

+                            local_70 = "spJsonHelper->GetValue failed";

+                            local_78 = "ValidateRdpAssertion";

+                            local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                            local_68 = "Error HResult failed";

+                            p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                            p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                            p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                            p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                            p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                            p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                            local_88 = lVar2;

+                          }

+                          else {

+                            p_Var4 = local_48;

+                            lVar2 = CTSCryptUtils::UrlEncodedStringToBinaryW

+                                              ((ushort *)local_48,param_4,param_5);

+                            if ((-1 < lVar2) || (DAT_1 < 3)) goto LAB_180150e70;

+                            local_84 = 0x132;

+                            local_70 = "CTSCryptUtils::UrlEncodedStringToBinaryW failed";

+                            local_78 = "ValidateRdpAssertion";

+                            local_80 = "onecore\\termsrv\\rdp\\win\\security\\cloudaphelper.cpp";

+                            local_68 = "Error HResult failed";

+                            p_Var13 = (_tlgWrapSz<char> *)&local_70;

+                            p_Var12 = (_tlgWrapSz<char> *)&local_78;

+                            p_Var11 = (_tlgWrapperByVal<4> *)&local_84;

+                            p_Var10 = (_tlgWrapSz<char> *)&local_80;

+                            p_Var9 = (_tlgWrapperByVal<4> *)&local_88;

+                            p_Var3 = (_tlgWrapSz<char> *)&local_68;

+                            auVar6 = (uchar  [8])param_5;

+                            local_88 = lVar2;

+                          }

+                        }

+                      }

+                    }

+                  }

+                }

+              }

+            }

+          }

+        }

+      }

+    }

+  }

+  _tlgWriteTemplate<long___cdecl(_tlgProvider_t_const*___ptr64,void_const*___ptr64,_GUID_const*___ptr64,_GUID_const*___ptr64,unsigned_int,_EVENT_DATA_DESCRIPTOR*___ptr64),&long___cdecl__tlgWriteTransfer_EventWriteTransfer(struct__tlgProvider_t_const*___ptr64,void_const*___ptr64,struct__GUID_const*___ptr64,struct__GUID_const*___ptr64,unsigned_int,struct__EVENT_DATA_DESCRIPTOR*___ptr64),_GUID_const*___ptr64,_GUID_const*___ptr64>

+  ::

+  Write<_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapperByVal<4>,_tlgWrapSz<char>,_tlgWrapSz<char>_>

+            (p_Var4,&DAT_3,(_GUID *)auVar6,p_Var8,p_Var3,p_Var9,p_Var10,p_Var11,p_Var12,

+             p_Var13);

+LAB_0:

+  operator_delete((void *)local_50);

+  if (local_48 != (_tlgProvider_t *)0x0) {

+    operator_delete(local_48);

+  }

+  if (local_40 != (PVOID)0x0) {

+    LsaFreeReturnBuffer(local_40);

+  }

+  if (local_38[0] != (uchar  [8])0x0) {

+    operator_delete((void *)local_38[0]);

+  }

+  TCntPtr<IRDPENCTcpStreamPool>::SafeRelease((TCntPtr<IRDPENCTcpStreamPool> *)&local_60);

+  return lVar2;

+}

+
```

## `wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''`  (modified)

```diff
--- wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
+++ wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
@@ -1,2 +1,15 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager'' : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+void wil::details::_dynamic_atexit_destructor_for__g_enabledStateManager__(void)

+

+{

+  bool bVar1;

+  

+  bVar1 = ProcessShutdownInProgress();

+  if (bVar1) {

+    EnabledStateManager::ProcessShutdown((EnabledStateManager *)&g_enabledStateManager);

+    return;

+  }

+  EnabledStateManager::~EnabledStateManager((EnabledStateManager *)&g_enabledStateManager);

+  return;

+}

+
```

## `wil::details::ReportUsageToService`  (modified)

```diff
--- wil::details::ReportUsageToService
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
@@ -1,2 +1,182 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::ReportUsageToService : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

+/* public: void __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage(bool,enum

+   wil::ReportingKind,unsigned __int64) __ptr64 */

+

+void __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::

+ReportUsage(FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2> *this,

+           bool param_1,ReportingKind param_2,__uint64 param_3)

+

+{

+  PTP_TIMER pti;

+  void *lpMem;

+  int iVar1;

+  uchar uVar2;

+  DWORD DVar3;

+  DWORD dwErrCode;

+  __uint64 *p_Var4;

+  undefined1 (*pauVar5) [16];

+  void *pvVar6;

+  HANDLE hHeap;

+  PTP_TIMER p_Var7;

+  code *pcVar8;

+  uint uVar9;

+  ulonglong uVar10;

+  ulonglong uVar11;

+  __uint64 _Var12;

+  FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2> *pFVar13;

+  uint uVar14;

+  ulonglong uVar15;

+  longlong lVar16;

+  bool bVar17;

+  undefined4 local_res8;

+  undefined2 local_resc;

+  undefined4 local_res18 [2];

+  __uint64 local_res20;

+  _FILETIME local_98;

+  undefined1 local_90 [16];

+  undefined8 local_80;

+  FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2> *local_78;

+  undefined8 local_60;

+  uint local_58 [8];

+  

+  local_res18[0] = CONCAT31(local_res18[0]._1_3_,(char)param_2);

+  uVar14 = Feature_IncreaseUdpTransportTimerInterval2__private_cppFeatureState;

+  local_res20 = param_3;

+  if ((Feature_IncreaseUdpTransportTimerInterval2__private_cppFeatureState & 4) == 0) {

+    p_Var4 = (__uint64 *)GetCachedFeatureEnabledState(this);

+    local_res20 = *p_Var4;

+    uVar14 = (uint)local_res20;

+  }

+  local_resc = 2;

+  local_res18[0] = 3;

+  pFVar13 = this + 8;

+  local_res8 = 0;

+  uVar9 = (param_1 ^ 1) * 4 + 2;

+  uVar15 = (ulonglong)uVar9;

+  pauVar5 = (undefined1 (*) [16])

+            wil_details_FeatureReporting_RecordUsageInCache(local_58,(uint *)pFVar13,uVar15);

+  local_90 = *pauVar5;

+  local_60 = *(undefined8 *)pauVar5[1];

+  if ((((local_90._0_4_ == 0) || (_g_enabledStateManager == 0)) ||

+      (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) goto LAB_0;

+  AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+  if (((_g_enabledStateManager == 0) || (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) {

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+    goto LAB_0;

+  }

+  uVar10 = DAT_2 - (longlong)DAT_1801b13d8;

+  local_80 = 0x35fcdba;

+  local_78 = pFVar13;

+  if ((DAT_3 - (longlong)DAT_1801b13d8) + 0x10 < uVar10) {

+LAB_4:

+    lVar16 = 0;

+    if (DAT_3 < DAT_1801b13e8) {

+      lVar16 = DAT_2 - DAT_1801b13e0;

+    }

+    memcpy_s(DAT_3,lVar16);

+    DAT_3 = DAT_3 + 0x10;

+  }

+  else {

+    uVar11 = 0x10;

+    if (0x10 < uVar10 * 2) {

+      uVar11 = uVar10 * 2;

+    }

+    if (uVar11 <= uVar10) goto LAB_4;

+    DVar3 = GetLastError();

+    _Var12 = (uVar11 & 0xffffffffffffffc0) + 0x40;

+    pvVar6 = ProcessHeapAlloc(0,_Var12);

+    if (pvVar6 != (void *)0x0) {

+      lVar16 = DAT_3 - (longlong)DAT_1801b13d8;

+      memcpy_s(pvVar6,_Var12,DAT_5,lVar16);

+      lpMem = DAT_6;

+      bVar17 = DAT_6 != (void *)0x0;

+      DAT_6 = pvVar6;

+      if (bVar17) {

+        hHeap = GetProcessHeap();

+        HeapFree(hHeap,0,lpMem);

+      }

+      DAT_3 = lVar16 + (longlong)pvVar6;

+      DAT_2 = (longlong)pvVar6 + _Var12;

+      DAT_5 = pvVar6;

+      SetLastError(DVar3);

+      goto LAB_4;

+    }

+    SetLastError(DVar3);

+  }

+  if (DAT_7 == '\0') {

+    if (DAT_8 == (PTP_TIMER)0x0) {

+      DVar3 = GetLastError();

+      p_Var7 = CreateThreadpoolTimer

+                         (<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>,

+                          &g_enabledStateManager,(PTP_CALLBACK_ENVIRON)0x0);

+      pti = DAT_8;

+      if (DAT_8 != (PTP_TIMER)0x0) {

+        dwErrCode = GetLastError();

+        SetThreadpoolTimer(pti,(PFILETIME)0x0,0,0);

+        WaitForThreadpoolTimerCallbacks(pti,1);

+        CloseThreadpoolTimer(pti);

+        SetLastError(dwErrCode);

+      }

+      DAT_8 = p_Var7;

+      SetLastError(DVar3);

+      if (DAT_8 == (PTP_TIMER)0x0) goto LAB_180120e81;

+    }

+    local_98.dwLowDateTime = 0x4d2fa200;

+    local_98.dwHighDateTime = 0xffffffff;

+    SetThreadpoolTimer(DAT_8,&local_98,0,75000);

+    DAT_7 = '\x01';

+  }

+LAB_9:

+  ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+LAB_0:

+  if ((local_90._4_4_ != 0) &&

+     ((pcVar8 = g_wil_details_internalRecordFeatureUsage,

+      g_wil_details_internalRecordFeatureUsage != (code *)0x0 ||

+      (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+      g_wil_details_apiRecordFeatureUsage != (code *)0x0)))) {

+    (*pcVar8)(0x35fcdba,local_90._8_4_,local_90._4_4_,0);

+  }

+  iVar1 = (int)local_60;

+  if (((int)local_60 == 0) && (_g_enabledStateManager != 0)) {

+    AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+    if ((DAT_10 == 0) &&

+       ((DAT_10 = 0, pcVar8 = g_wil_details_internalSubscribeFeatureStateChangeNotification,

+        g_wil_details_internalSubscribeFeatureStateChangeNotification != (code *)0x0 ||

+        (pcVar8 = g_wil_details_apiSubscribeFeatureStateChangeNotification,

+        g_wil_details_apiSubscribeFeatureStateChangeNotification != (code *)0x0)))) {

+      (*pcVar8)(&DAT_10,<lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>,

+                0xffffffffffffffff);

+    }

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+  }

+  if ((uVar14 >> 10 & 1) != 0) {

+    if ((uVar14 >> 0xb & 1) != 0) {

+      uVar9 = uVar9 | 0x80000000;

+    }

+    pcVar8 = g_wil_details_internalRecordFeatureUsage;

+    if ((g_wil_details_internalRecordFeatureUsage != (code *)0x0) ||

+       (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+       g_wil_details_apiRecordFeatureUsage != (code *)0x0)) {

+      (*pcVar8)(0x35fcdba,uVar9,0,0);

+    }

+  }

+  if (iVar1 == 0) {

+    if (g_wil_details_realtimeFeatureUsageHook != (code *)0x0) {

+      (*g_wil_details_realtimeFeatureUsageHook)(0x35fcdba,uVar15,2);

+    }

+    if (g_wil_details_pfnFeatureLoggingHook != (code *)0x0) {

+      (*g_wil_details_pfnFeatureLoggingHook)(0x35fcdba,&local_res8,0,param_1,local_res18,0,0,1);

+    }

+  }

+  return;

+}

+
```

## `wil::details::ReportUsageToService`  (modified)

```diff
--- wil::details::ReportUsageToService
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
@@ -1,2 +1,182 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::ReportUsageToService : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

+/* public: void __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage(bool,enum

+   wil::ReportingKind,unsigned __int64) __ptr64 */

+

+void __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage

+          (FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks> *this,bool param_1,

+          ReportingKind param_2,__uint64 param_3)

+

+{

+  PTP_TIMER pti;

+  void *lpMem;

+  int iVar1;

+  uchar uVar2;

+  DWORD DVar3;

+  DWORD dwErrCode;

+  __uint64 *p_Var4;

+  undefined1 (*pauVar5) [16];

+  void *pvVar6;

+  HANDLE hHeap;

+  PTP_TIMER p_Var7;

+  code *pcVar8;

+  uint uVar9;

+  ulonglong uVar10;

+  ulonglong uVar11;

+  __uint64 _Var12;

+  FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks> *pFVar13;

+  uint uVar14;

+  ulonglong uVar15;

+  longlong lVar16;

+  bool bVar17;

+  undefined4 local_res8;

+  undefined2 local_resc;

+  undefined4 local_res18 [2];

+  __uint64 local_res20;

+  _FILETIME local_98;

+  undefined1 local_90 [16];

+  undefined8 local_80;

+  FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks> *local_78;

+  undefined8 local_60;

+  uint local_58 [8];

+  

+  local_res18[0] = CONCAT31(local_res18[0]._1_3_,(char)param_2);

+  uVar14 = Feature_FuzzedBoundaryChecks__private_cppFeatureState;

+  local_res20 = param_3;

+  if ((Feature_FuzzedBoundaryChecks__private_cppFeatureState & 4) == 0) {

+    p_Var4 = (__uint64 *)GetCachedFeatureEnabledState(this);

+    local_res20 = *p_Var4;

+    uVar14 = (uint)local_res20;

+  }

+  local_resc = 2;

+  local_res18[0] = 3;

+  pFVar13 = this + 8;

+  local_res8 = 0;

+  uVar9 = (param_1 ^ 1) * 4 + 2;

+  uVar15 = (ulonglong)uVar9;

+  pauVar5 = (undefined1 (*) [16])

+            wil_details_FeatureReporting_RecordUsageInCache(local_58,(uint *)pFVar13,uVar15);

+  local_90 = *pauVar5;

+  local_60 = *(undefined8 *)pauVar5[1];

+  if ((((local_90._0_4_ == 0) || (_g_enabledStateManager == 0)) ||

+      (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) goto LAB_0;

+  AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+  if (((_g_enabledStateManager == 0) || (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) {

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+    goto LAB_0;

+  }

+  uVar10 = DAT_2 - (longlong)DAT_1801b13d8;

+  local_80 = 0x36d5418;

+  local_78 = pFVar13;

+  if ((DAT_3 - (longlong)DAT_1801b13d8) + 0x10 < uVar10) {

+LAB_4:

+    lVar16 = 0;

+    if (DAT_3 < DAT_1801b13e8) {

+      lVar16 = DAT_2 - DAT_1801b13e0;

+    }

+    memcpy_s(DAT_3,lVar16);

+    DAT_3 = DAT_3 + 0x10;

+  }

+  else {

+    uVar11 = 0x10;

+    if (0x10 < uVar10 * 2) {

+      uVar11 = uVar10 * 2;

+    }

+    if (uVar11 <= uVar10) goto LAB_4;

+    DVar3 = GetLastError();

+    _Var12 = (uVar11 & 0xffffffffffffffc0) + 0x40;

+    pvVar6 = ProcessHeapAlloc(0,_Var12);

+    if (pvVar6 != (void *)0x0) {

+      lVar16 = DAT_3 - (longlong)DAT_1801b13d8;

+      memcpy_s(pvVar6,_Var12,DAT_5,lVar16);

+      lpMem = DAT_6;

+      bVar17 = DAT_6 != (void *)0x0;

+      DAT_6 = pvVar6;

+      if (bVar17) {

+        hHeap = GetProcessHeap();

+        HeapFree(hHeap,0,lpMem);

+      }

+      DAT_3 = lVar16 + (longlong)pvVar6;

+      DAT_2 = (longlong)pvVar6 + _Var12;

+      DAT_5 = pvVar6;

+      SetLastError(DVar3);

+      goto LAB_4;

+    }

+    SetLastError(DVar3);

+  }

+  if (DAT_7 == '\0') {

+    if (DAT_8 == (PTP_TIMER)0x0) {

+      DVar3 = GetLastError();

+      p_Var7 = CreateThreadpoolTimer

+                         (<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>,

+                          &g_enabledStateManager,(PTP_CALLBACK_ENVIRON)0x0);

+      pti = DAT_8;

+      if (DAT_8 != (PTP_TIMER)0x0) {

+        dwErrCode = GetLastError();

+        SetThreadpoolTimer(pti,(PFILETIME)0x0,0,0);

+        WaitForThreadpoolTimerCallbacks(pti,1);

+        CloseThreadpoolTimer(pti);

+        SetLastError(dwErrCode);

+      }

+      DAT_8 = p_Var7;

+      SetLastError(DVar3);

+      if (DAT_8 == (PTP_TIMER)0x0) goto LAB_1800b6871;

+    }

+    local_98.dwLowDateTime = 0x4d2fa200;

+    local_98.dwHighDateTime = 0xffffffff;

+    SetThreadpoolTimer(DAT_8,&local_98,0,75000);

+    DAT_7 = '\x01';

+  }

+LAB_9:

+  ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+LAB_0:

+  if ((local_90._4_4_ != 0) &&

+     ((pcVar8 = g_wil_details_internalRecordFeatureUsage,

+      g_wil_details_internalRecordFeatureUsage != (code *)0x0 ||

+      (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+      g_wil_details_apiRecordFeatureUsage != (code *)0x0)))) {

+    (*pcVar8)(0x36d5418,local_90._8_4_,local_90._4_4_,0);

+  }

+  iVar1 = (int)local_60;

+  if (((int)local_60 == 0) && (_g_enabledStateManager != 0)) {

+    AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+    if ((DAT_10 == 0) &&

+       ((DAT_10 = 0, pcVar8 = g_wil_details_internalSubscribeFeatureStateChangeNotification,

+        g_wil_details_internalSubscribeFeatureStateChangeNotification != (code *)0x0 ||

+        (pcVar8 = g_wil_details_apiSubscribeFeatureStateChangeNotification,

+        g_wil_details_apiSubscribeFeatureStateChangeNotification != (code *)0x0)))) {

+      (*pcVar8)(&DAT_10,<lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>,

+                0xffffffffffffffff);

+    }

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+  }

+  if ((uVar14 >> 10 & 1) != 0) {

+    if ((uVar14 >> 0xb & 1) != 0) {

+      uVar9 = uVar9 | 0x80000000;

+    }

+    pcVar8 = g_wil_details_internalRecordFeatureUsage;

+    if ((g_wil_details_internalRecordFeatureUsage != (code *)0x0) ||

+       (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+       g_wil_details_apiRecordFeatureUsage != (code *)0x0)) {

+      (*pcVar8)(0x36d5418,uVar9,0,0);

+    }

+  }

+  if (iVar1 == 0) {

+    if (g_wil_details_realtimeFeatureUsageHook != (code *)0x0) {

+      (*g_wil_details_realtimeFeatureUsageHook)(0x36d5418,uVar15,2);

+    }

+    if (g_wil_details_pfnFeatureLoggingHook != (code *)0x0) {

+      (*g_wil_details_pfnFeatureLoggingHook)(0x36d5418,&local_res8,0,param_1,local_res18,0,0,1);

+    }

+  }

+  return;

+}

+
```

## `wil::details::ReportUsageToService`  (modified)

```diff
--- wil::details::ReportUsageToService
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
@@ -1,2 +1,182 @@
-Failed to decompile rdpbase.dll - .ProgramDB wil::details::ReportUsageToService : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

+/* public: void __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_StrideChecks>::ReportUsage(bool,enum wil::ReportingKind,unsigned

+   __int64) __ptr64 */

+

+void __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage

+          (FeatureImpl<__WilFeatureTraits_Feature_StrideChecks> *this,bool param_1,

+          ReportingKind param_2,__uint64 param_3)

+

+{

+  PTP_TIMER pti;

+  void *lpMem;

+  int iVar1;

+  uchar uVar2;

+  DWORD DVar3;

+  DWORD dwErrCode;

+  __uint64 *p_Var4;

+  undefined1 (*pauVar5) [16];

+  void *pvVar6;

+  HANDLE hHeap;

+  PTP_TIMER p_Var7;

+  code *pcVar8;

+  uint uVar9;

+  ulonglong uVar10;

+  ulonglong uVar11;

+  __uint64 _Var12;

+  FeatureImpl<__WilFeatureTraits_Feature_StrideChecks> *pFVar13;

+  uint uVar14;

+  ulonglong uVar15;

+  longlong lVar16;

+  bool bVar17;

+  undefined4 local_res8;

+  undefined2 local_resc;

+  undefined4 local_res18 [2];

+  __uint64 local_res20;

+  _FILETIME local_98;

+  undefined1 local_90 [16];

+  undefined8 local_80;

+  FeatureImpl<__WilFeatureTraits_Feature_StrideChecks> *local_78;

+  undefined8 local_60;

+  uint local_58 [8];

+  

+  local_res18[0] = CONCAT31(local_res18[0]._1_3_,(char)param_2);

+  uVar14 = Feature_StrideChecks__private_cppFeatureState;

+  local_res20 = param_3;

+  if ((Feature_StrideChecks__private_cppFeatureState & 4) == 0) {

+    p_Var4 = (__uint64 *)GetCachedFeatureEnabledState(this);

+    local_res20 = *p_Var4;

+    uVar14 = (uint)local_res20;

+  }

+  local_resc = 2;

+  local_res18[0] = 3;

+  pFVar13 = this + 8;

+  local_res8 = 0;

+  uVar9 = (param_1 ^ 1) * 4 + 2;

+  uVar15 = (ulonglong)uVar9;

+  pauVar5 = (undefined1 (*) [16])

+            wil_details_FeatureReporting_RecordUsageInCache(local_58,(uint *)pFVar13,uVar15);

+  local_90 = *pauVar5;

+  local_60 = *(undefined8 *)pauVar5[1];

+  if ((((local_90._0_4_ == 0) || (_g_enabledStateManager == 0)) ||

+      (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) goto LAB_0;

+  AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+  if (((_g_enabledStateManager == 0) || (g_processShutdownInProgress != false)) ||

+     ((g_pfnDllShutdownInProgress != (_func_uchar *)0x0 &&

+      (uVar2 = (*g_pfnDllShutdownInProgress)(), uVar2 != '\0')))) {

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+    goto LAB_0;

+  }

+  uVar10 = DAT_2 - (longlong)DAT_1801b13d8;

+  local_80 = 0x37ad711;

+  local_78 = pFVar13;

+  if ((DAT_3 - (longlong)DAT_1801b13d8) + 0x10 < uVar10) {

+LAB_4:

+    lVar16 = 0;

+    if (DAT_3 < DAT_1801b13e8) {

+      lVar16 = DAT_2 - DAT_1801b13e0;

+    }

+    memcpy_s(DAT_3,lVar16);

+    DAT_3 = DAT_3 + 0x10;

+  }

+  else {

+    uVar11 = 0x10;

+    if (0x10 < uVar10 * 2) {

+      uVar11 = uVar10 * 2;

+    }

+    if (uVar11 <= uVar10) goto LAB_4;

+    DVar3 = GetLastError();

+    _Var12 = (uVar11 & 0xffffffffffffffc0) + 0x40;

+    pvVar6 = ProcessHeapAlloc(0,_Var12);

+    if (pvVar6 != (void *)0x0) {

+      lVar16 = DAT_3 - (longlong)DAT_1801b13d8;

+      memcpy_s(pvVar6,_Var12,DAT_5,lVar16);

+      lpMem = DAT_6;

+      bVar17 = DAT_6 != (void *)0x0;

+      DAT_6 = pvVar6;

+      if (bVar17) {

+        hHeap = GetProcessHeap();

+        HeapFree(hHeap,0,lpMem);

+      }

+      DAT_3 = lVar16 + (longlong)pvVar6;

+      DAT_2 = (longlong)pvVar6 + _Var12;

+      DAT_5 = pvVar6;

+      SetLastError(DVar3);

+      goto LAB_4;

+    }

+    SetLastError(DVar3);

+  }

+  if (DAT_7 == '\0') {

+    if (DAT_8 == (PTP_TIMER)0x0) {

+      DVar3 = GetLastError();

+      p_Var7 = CreateThreadpoolTimer

+                         (<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>,

+                          &g_enabledStateManager,(PTP_CALLBACK_ENVIRON)0x0);

+      pti = DAT_8;

+      if (DAT_8 != (PTP_TIMER)0x0) {

+        dwErrCode = GetLastError();

+        SetThreadpoolTimer(pti,(PFILETIME)0x0,0,0);

+        WaitForThreadpoolTimerCallbacks(pti,1);

+        CloseThreadpoolTimer(pti);

+        SetLastError(dwErrCode);

+      }

+      DAT_8 = p_Var7;

+      SetLastError(DVar3);

+      if (DAT_8 == (PTP_TIMER)0x0) goto LAB_1800b6dd1;

+    }

+    local_98.dwLowDateTime = 0x4d2fa200;

+    local_98.dwHighDateTime = 0xffffffff;

+    SetThreadpoolTimer(DAT_8,&local_98,0,75000);

+    DAT_7 = '\x01';

+  }

+LAB_9:

+  ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+LAB_0:

+  if ((local_90._4_4_ != 0) &&

+     ((pcVar8 = g_wil_details_internalRecordFeatureUsage,

+      g_wil_details_internalRecordFeatureUsage != (code *)0x0 ||

+      (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+      g_wil_details_apiRecordFeatureUsage != (code *)0x0)))) {

+    (*pcVar8)(0x37ad711,local_90._8_4_,local_90._4_4_,0);

+  }

+  iVar1 = (int)local_60;

+  if (((int)local_60 == 0) && (_g_enabledStateManager != 0)) {

+    AcquireSRWLockExclusive((PSRWLOCK)&DAT_1);

+    if ((DAT_10 == 0) &&

+       ((DAT_10 = 0, pcVar8 = g_wil_details_internalSubscribeFeatureStateChangeNotification,

+        g_wil_details_internalSubscribeFeatureStateChangeNotification != (code *)0x0 ||

+        (pcVar8 = g_wil_details_apiSubscribeFeatureStateChangeNotification,

+        g_wil_details_apiSubscribeFeatureStateChangeNotification != (code *)0x0)))) {

+      (*pcVar8)(&DAT_10,<lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>,

+                0xffffffffffffffff);

+    }

+    ReleaseSRWLockExclusive((PSRWLOCK)&DAT_1);

+  }

+  if ((uVar14 >> 10 & 1) != 0) {

+    if ((uVar14 >> 0xb & 1) != 0) {

+      uVar9 = uVar9 | 0x80000000;

+    }

+    pcVar8 = g_wil_details_internalRecordFeatureUsage;

+    if ((g_wil_details_internalRecordFeatureUsage != (code *)0x0) ||

+       (pcVar8 = g_wil_details_apiRecordFeatureUsage,

+       g_wil_details_apiRecordFeatureUsage != (code *)0x0)) {

+      (*pcVar8)(0x37ad711,uVar9,0,0);

+    }

+  }

+  if (iVar1 == 0) {

+    if (g_wil_details_realtimeFeatureUsageHook != (code *)0x0) {

+      (*g_wil_details_realtimeFeatureUsageHook)(0x37ad711,uVar15,2);

+    }

+    if (g_wil_details_pfnFeatureLoggingHook != (code *)0x0) {

+      (*g_wil_details_pfnFeatureLoggingHook)(0x37ad711,&local_res8,0,param_1,local_res18,0,0,1);

+    }

+  }

+  return;

+}

+
```

## `API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::WaitForThreadpoolTimerCallbacks`  (modified)

```diff
--- API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::WaitForThreadpoolTimerCallbacks calling
+++ API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::WaitForThreadpoolTimerCallbacks calling
@@ -1,3 +1,4 @@
-wil::details::EnabledStateManager::ProcessShutdown
-wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
-wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
+wil::details::DestroyThreadPoolTimer<wil::details::SystemThreadPoolMethods,0>::Destroy
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::GetLastError`  (modified)

```diff
--- API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::GetLastError calling
+++ API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::GetLastError calling
@@ -149,0 +150 @@
+SecUtils::TraceAuthenticationPackageInfo
@@ -154 +155,6 @@
-wil::details::EnabledStateManager::ProcessShutdown
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
@@ -156,2 +161,0 @@
-wil::details::RecordFeatureUsageCallback
-wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
@@ -160 +163,0 @@
-wil::details_abi::heap_buffer::push_back
```

## `API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::SetThreadpoolTimer`  (modified)

```diff
--- API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::SetThreadpoolTimer calling
+++ API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::SetThreadpoolTimer calling
@@ -7,4 +7,5 @@
-wil::details::EnabledStateManager::ProcessShutdown
-wil::details::RecordFeatureUsageCallback
-wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
-wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
+wil::details::DestroyThreadPoolTimer<wil::details::SystemThreadPoolMethods,0>::Destroy
+wil::details::EnsureCoalescedTimer<wil::details::EnabledStateManager>
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `API-MS-WIN-CORE-HEAP-L1-1-0.DLL::GetProcessHeap`  (modified)

```diff
--- API-MS-WIN-CORE-HEAP-L1-1-0.DLL::GetProcessHeap calling
+++ API-MS-WIN-CORE-HEAP-L1-1-0.DLL::GetProcessHeap calling
@@ -0,0 +1,6 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
@@ -3 +8,0 @@
-wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
@@ -9 +13,0 @@
-wil::details_abi::heap_buffer::push_back
```

## `API-MS-WIN-CORE-HEAP-L1-1-0.DLL::HeapFree`  (modified)

```diff
--- API-MS-WIN-CORE-HEAP-L1-1-0.DLL::HeapFree calling
+++ API-MS-WIN-CORE-HEAP-L1-1-0.DLL::HeapFree calling
@@ -1 +1,6 @@
-wil::details::`dynamic_atexit_destructor_for_'g_enabledStateManager''
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
@@ -7 +11,0 @@
-wil::details_abi::heap_buffer::push_back
```

## `API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CloseThreadpoolTimer`  (modified)

```diff
--- API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CloseThreadpoolTimer calling
+++ API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CloseThreadpoolTimer calling
@@ -3,2 +3,3 @@
-wil::details::EnabledStateManager::ProcessShutdown
-wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `API-MS-WIN-SECURITY-BASE-L1-1-0.DLL::GetTokenInformation`  (modified)

```diff
--- API-MS-WIN-SECURITY-BASE-L1-1-0.DLL::GetTokenInformation calling
+++ API-MS-WIN-SECURITY-BASE-L1-1-0.DLL::GetTokenInformation calling
@@ -4,0 +5 @@
+SecUtils::TraceAuthenticationPackageInfo
```

## `API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CreateThreadpoolTimer`  (modified)

```diff
--- API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CreateThreadpoolTimer calling
+++ API-MS-WIN-CORE-THREADPOOL-L1-2-0.DLL::CreateThreadpoolTimer calling
@@ -4 +4,4 @@
-wil::details::RecordFeatureUsageCallback
+wil::details::EnsureCoalescedTimer<wil::details::EnabledStateManager>
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `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
@@ -1,2 +0,0 @@
-<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>
-<lambda_aa194dc0bf891154933407eb98fb868a>::<lambda_invoker_cdecl>
@@ -20,0 +19,2 @@
+wil::details::EnabledStateManager::EnsureSubscribedToFeatureConfigurationChangesImpl
+wil::details::EnabledStateManager::EnsureSubscribedToUsageFlush
@@ -21,0 +22 @@
+wil::details::EnabledStateManager::OnTimer
@@ -23 +24 @@
-wil::details::EnsureSubscribedToFeatureConfigurationChanges
+wil::details::EnabledStateManager::QueueBackgroundUsageReporting
@@ -25 +26,2 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_GatePerf>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
@@ -26,0 +29,2 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
@@ -28,3 +32,2 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_UxLabTest>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_ValLabTest>::GetCachedFeatureEnabledState
-wil::details::RecordFeatureUsageCallback
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::ReleaseSRWLockExclusive`  (modified)

```diff
--- API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::ReleaseSRWLockExclusive calling
+++ API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::ReleaseSRWLockExclusive calling
@@ -1 +0,0 @@
-<lambda_0374aa0a5d1201b2358c6bce99369c58>::<lambda_invoker_cdecl>
@@ -18,3 +16,0 @@
-wil::details::EnabledStateManager::OnStateChange
-wil::details::EnabledStateManager::ProcessShutdown
-wil::details::EnsureSubscribedToFeatureConfigurationChanges
@@ -22 +18,2 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_GatePerf>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
@@ -23,0 +21,2 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
@@ -25,4 +24,3 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_UxLabTest>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_ValLabTest>::GetCachedFeatureEnabledState
-wil::details::RecordFeatureUsageCallback
-wil::details::SubscribeFeatureStateCacheToConfigurationChanges
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCurrentFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
+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_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>_>
```

## `API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::SetLastError`  (modified)

```diff
--- API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::SetLastError calling
+++ API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::SetLastError calling
@@ -1,4 +1,6 @@
-wil::details::EnabledStateManager::ProcessShutdown
-wil::details::RecordFeatureUsageCallback
-wil::details::unique_storage<wil::details::resource_policy<_TP_TIMER*___ptr64,void_(__cdecl*)(_TP_TIMER*___ptr64),&public:_static_void___cdecl_wil::details::DestroyThreadPoolTimer<struct_wil::details::SystemThreadPoolMethods,0>::Destroy(struct__TP_TIMER*___ptr64),wistd::integral_constant<unsigned___int64,0>,_TP_TIMER*___ptr64,_TP_TIMER*___ptr64,0,std::nullptr_t>_>::reset
-wil::details_abi::heap_buffer::push_back
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_FuzzedBoundaryChecks>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_IncreaseUdpTransportTimerInterval2>::ReportUsage
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_StrideChecks>::ReportUsage
```

## `SSPICLI.DLL::LsaFreeReturnBuffer`  (modified)

```diff
--- SSPICLI.DLL::LsaFreeReturnBuffer calling
+++ SSPICLI.DLL::LsaFreeReturnBuffer calling
@@ -3,0 +4 @@
+wistd::unique_ptr<_SECURITY_LOGON_SESSION_DATA,wil::function_deleter<long_(__cdecl*)(void*___ptr64),&long___cdecl_LsaFreeReturnBuffer(void*___ptr64)>_>::reset
```
