# CVE-2026-42985 — rdpcorets.dll patch diff

`rdpcorets.dll` 10.0.26100.8457 -> 10.0.26100.8655 (ghidriff).

## `CProxyStream::SendFileContentsRequest`  (modified)

```diff
--- CProxyStream::SendFileContentsRequest
+++ CProxyStreamManager::OnStreamDataReceived
@@ -1,244 +1,94 @@
 

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

    guard_dispatch_icall */

-/* private: long __cdecl CProxyStream::SendFileContentsRequest(unsigned long,unsigned long) __ptr64

-    */

+/* public: long __cdecl CProxyStreamManager::OnStreamDataReceived(long,unsigned char *

+   __ptr64,unsigned long,int) __ptr64 */

 

 long __thiscall

-CProxyStream::SendFileContentsRequest(CProxyStream *this,ulong param_1,ulong param_2)

+CProxyStreamManager::OnStreamDataReceived

+          (CProxyStreamManager *this,long param_1,uchar *param_2,ulong param_3,int param_4)

 

 {

-  longlong *plVar1;

-  ulonglong uVar2;

-  bool bVar3;

+  LPCRITICAL_SECTION lpCriticalSection;

+  SmartArray<CProxyStream,long> *this_00;

+  CProxyStream *pCVar1;

+  bool bVar2;

+  int iVar3;

   uint uVar4;

-  int iVar5;

-  undefined4 uVar6;

-  long lVar7;

-  DWORD DVar8;

-  char *pcVar9;

-  undefined2 uVar10;

-  HANDLE **pppvVar11;

-  DWORD *pDVar12;

-  DWORD local_res8 [2];

-  ulong local_res10;

-  undefined4 local_res20 [2];

-  HANDLE *local_48;

-  undefined8 local_40;

+  long lVar5;

+  CProxyStream *local_res8;

   

-  local_48 = (HANDLE *)0x0;

-  local_res8[0] = 0;

-  local_res20[0] = 0;

-  local_res10 = param_1;

-  if (*(longlong *)(this + 0x38) == 0) {

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

-      return -0x7fff0001;

+  local_res8 = (CProxyStream *)0x0;

+  lpCriticalSection = (LPCRITICAL_SECTION)(this + 0x38);

+  this_00 = (SmartArray<CProxyStream,long> *)(this + 0x70);

+  EnterCriticalSection(lpCriticalSection);

+  iVar3 = SmartArray<CProxyStream,long>::GetAt(this_00,param_1,&local_res8);

+  pCVar1 = local_res8;

+  if (iVar3 == 0) {

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

+        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+      WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1a,

+                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

     }

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

-      return -0x7fff0001;

+    lVar5 = -0x7ff8fb6f;

+  }

+  else if (local_res8 == (CProxyStream *)0x0) {

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

+        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+      WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1b,

+               &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

     }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return -0x7fff0001;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x27;

-LAB_0:

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

-             &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-    return -0x7fff0001;

-  }

-  if (*(longlong *)(*(longlong *)(this + 0x38) + 0x68) == 0) {

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

-      return -0x7fff0001;

-    }

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

-      return -0x7fff0001;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return -0x7fff0001;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x28;

-    goto LAB_0;

-  }

-  if (*(int *)(this + 0x74) < 0) {

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

-      return -0x7fff0001;

-    }

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

-      return -0x7fff0001;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return -0x7fff0001;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x29;

-    goto LAB_0;

-  }

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

-      ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2a,

-                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-  }

-  pDVar12 = local_res8;

-  pppvVar11 = &local_48;

-  plVar1 = *(longlong **)(*(longlong *)(this + 0x38) + 0x68);

-  iVar5 = (**(code **)(*plVar1 + 0x18))(plVar1);

-  if (iVar5 < 0) {

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

-      return iVar5;

-    }

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

-      return iVar5;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return iVar5;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x2b;

-    pcVar9 = "GetStreamDataEvents failed!";

-LAB_1:

-    WPP_SF_DsD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

-               &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4,pcVar9);

-    return iVar5;

-  }

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

-    if (((WPP_GLOBAL_Control[0x1c] & 1) != 0) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

-      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-      pppvVar11 = (HANDLE **)0x2c;

-      pDVar12 = (DWORD *)&WPP_a8127e6349d334906d559d27be98d1da_Traceguids;

-      WPP_SF_DDD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2c,

-                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-    }

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

-        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

-      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-      WPP_SF_DdI(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),pppvVar11,pDVar12,uVar4);

-    }

-  }

-  uVar2 = *(ulonglong *)(this + 0x58);

-  local_40 = uVar2;

-  iVar5 = CProxyStreamManager::AcquireProxyStream

-                    (*(CProxyStreamManager **)(this + 0x38),this,*(long *)(this + 0x40));

-  if (iVar5 < 0) {

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

-      return iVar5;

-    }

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

-      return iVar5;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return iVar5;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x2e;

-    pcVar9 = "AcquireProxyStream failed.";

-    goto LAB_1;

-  }

-  if ((*(int *)(this + 0x90) == 0) || (*(ulonglong *)(this + 0x58) < 0x100000000)) {

-    uVar6 = 0;

+    lVar5 = -0x7fff0001;

   }

   else {

-    uVar6 = local_40._4_4_;

-  }

-  iVar5 = (**(code **)(*plVar1 + 0x20))

-                    (plVar1,*(undefined4 *)(this + 0x8c),*(undefined4 *)(this + 0x40),

-                     *(undefined4 *)(this + 0x74),local_res10,uVar2 & 0xffffffff,uVar6,param_2,

-                     local_res20);

-  if (iVar5 < 0) {

-    lVar7 = CProxyStreamManager::ReleaseProxyStream

-                      (*(CProxyStreamManager **)(this + 0x38),*(long *)(this + 0x40));

-    if (lVar7 < 0) {

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

-        return iVar5;

+    lVar5 = CProxyStream::FillReceiveBuffer(local_res8,param_2,param_3,param_4);

+    bVar2 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1894756665>::__private_IsEnabled

+                      ((FeatureImpl<__WilFeatureTraits_Feature_1894756665> *)

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

+                        ::__l2::impl);

+    if (bVar2) {

+      if (-1 < lVar5) {

+LAB_0:

+        (**(code **)(**(longlong **)(pCVar1 + 0x20) + 0x10))();

+        iVar3 = SmartArray<CProxyStream,long>::AddAt(this_00,param_1,(CProxyStream *)0x0);

+        if (((iVar3 == 0) && ((undefined **)WPP_GLOBAL_Control != &WPP_GLOBAL_Control)) &&

+           (((WPP_GLOBAL_Control[0x1c] & 1) != 0 && (1 < (byte)WPP_GLOBAL_Control[0x19])))) {

+          uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+          WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1f,

+                    &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+        }

+        LeaveCriticalSection(lpCriticalSection);

+        return 0;

       }

-      if (((WPP_GLOBAL_Control[0x1c] & 1) != 0) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

-        uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-        WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2f,

-                  &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-      }

-    }

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

-      return iVar5;

-    }

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

-      return iVar5;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return iVar5;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x30;

-    pcVar9 = "SendFileContentsRequest failed!";

-    goto LAB_1;

-  }

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

-      ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

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

-             &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-  }

-  DVar8 = WaitForMultipleObjects(local_res8[0],local_48,0,0xffffffff);

-  if (DVar8 == 0) {

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

-        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

-      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-      WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x35,

-                  &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-    }

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

-      return 0;

-    }

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

-      return -0x7fffbffb;

-    }

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

-      return -0x7fffbffb;

-    }

-    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

-      return -0x7fffbffb;

-    }

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x36,

-                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-    return -0x7fffbffb;

-  }

-  if (DVar8 < local_res8[0]) {

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

-        ((WPP_GLOBAL_Control[0x1c] & 1) == 0)) || ((byte)WPP_GLOBAL_Control[0x19] < 2))

-    goto LAB_2;

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x32;

-  }

-  else {

-    if (DVar8 == 0x102) {

       if ((((undefined **)WPP_GLOBAL_Control != &WPP_GLOBAL_Control) &&

           ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

         uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

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

-                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+        WPP_SF_DDD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1c,

+                   &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

       }

-      goto LAB_2;

+      iVar3 = SmartArray<CProxyStream,long>::AddAt(this_00,param_1,(CProxyStream *)0x0);

+      if ((((iVar3 == 0) && ((undefined **)WPP_GLOBAL_Control != &WPP_GLOBAL_Control)) &&

+          ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1d,

+                  &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+      }

+      (**(code **)(**(longlong **)(pCVar1 + 0x20) + 0x10))();

     }

-    if (((DVar8 == 0xffffffff) || ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control)) ||

-       (((WPP_GLOBAL_Control[0x1c] & 1) == 0 || ((byte)WPP_GLOBAL_Control[0x19] < 2))))

-    goto LAB_2;

-    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

-    uVar10 = 0x34;

+    else {

+      if (-1 < lVar5) goto LAB_0;

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

+          ((WPP_GLOBAL_Control[0x1c] & 8) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_DsD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x1e,

+                   &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4,

+                   "FillReceiveBuffer failed!");

+      }

+    }

   }

-  WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

-            &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

-LAB_2:

-  bVar3 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1894756665>::__private_IsEnabled

-                    ((FeatureImpl<__WilFeatureTraits_Feature_1894756665> *)

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

-                      ::__l2::impl);

-  if ((bVar3) && (*(CProxyStreamManager **)(this + 0x38) != (CProxyStreamManager *)0x0)) {

-    CProxyStreamManager::ReleaseProxyStream

-              (*(CProxyStreamManager **)(this + 0x38),*(long *)(this + 0x40));

-  }

-  (**(code **)(*plVar1 + 0x28))(plVar1,local_res20[0],7,0xc);

-  return -0x7fffbffb;

+  LeaveCriticalSection(lpCriticalSection);

+  return lVar5;

 }
```

## `CProxyStream::Read`  (modified)

```diff
--- CProxyStream::Read
+++ CProxyStream::Read
@@ -1,2 +1,110 @@
-Failed to decompile rdpcorets.dll - .ProgramDB CProxyStream::Read : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: virtual long __cdecl CProxyStream::Read(void * __ptr64,unsigned long,unsigned long *

+   __ptr64) __ptr64 */

+

+long __thiscall CProxyStream::Read(CProxyStream *this,void *param_1,ulong param_2,ulong *param_3)

+

+{

+  bool bVar1;

+  uint uVar2;

+  long lVar3;

+  char *pcVar4;

+  undefined2 uVar5;

+  tagSTATSTG local_78;

+  

+  lVar3 = 1;

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

+      ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+    uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+    WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x39,

+                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar2);

+  }

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

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

+        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+      WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3a,

+               &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar2);

+    }

+    lVar3 = -0x7ffcfff7;

+    goto LAB_0;

+  }

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

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

+    Stat(this,&local_78,1);

+    *(undefined4 *)(this + 0x18) = 1;

+  }

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

+    if ((*(int *)(this + 0x60) == 0) && (*(int *)(this + 0x24) != 0)) {

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

+          ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3b,

+                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar2);

+      }

+      lVar3 = -0x7fffbffb;

+      goto LAB_0;

+    }

+    if (*(ulonglong *)(this + 0x20) <= *(ulonglong *)(this + 0x28)) {

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

+          ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3c,

+                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar2);

+      }

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

+        *param_3 = 0;

+      }

+      goto LAB_0;

+    }

+  }

+  if (param_2 < 0x10000) {

+    lVar3 = ServiceReadFromCache(this + -0x30,param_1,param_2,param_3);

+    if ((((-1 < lVar3) || ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control)) ||

+        ((WPP_GLOBAL_Control[0x1c] & 8) == 0)) || ((byte)WPP_GLOBAL_Control[0x19] < 2))

+    goto LAB_0;

+    uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar5 = 0x3d;

+    pcVar4 = "ServiceReadFromCache failed!";

+  }

+  else {

+    *(undefined4 *)(this + 0x14) = 0;

+    *(undefined4 *)(this + 0x30) = 0;

+    *(void **)(this + 0x38) = param_1;

+    *(ulong *)(this + 0x40) = param_2;

+    lVar3 = SendFileContentsRequest(this + -0x30,2,param_2);

+    if (-1 < lVar3) {

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

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

+      }

+      lVar3 = 0;

+      *(ulonglong *)(this + 0x28) = *(longlong *)(this + 0x28) + (ulonglong)*(uint *)(this + 0x30);

+      *(undefined4 *)(this + 0x14) = 0;

+      *(undefined4 *)(this + 0x30) = 0;

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

+      *(undefined4 *)(this + 0x40) = 0;

+      goto LAB_0;

+    }

+    if ((((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+        ((WPP_GLOBAL_Control[0x1c] & 8) == 0)) || ((byte)WPP_GLOBAL_Control[0x19] < 2))

+    goto LAB_0;

+    uVar2 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar5 = 0x3e;

+    pcVar4 = "SendFileContentsRequest failed!";

+  }

+  WPP_SF_DsD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar5,

+             &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar2,pcVar4);

+LAB_0:

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

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1894756665> *)

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

+                      ::__l2::impl);

+  if ((bVar1) && (lVar3 < 0)) {

+    *(undefined4 *)(this + 0x14) = 0;

+    *(undefined4 *)(this + 0x30) = 0;

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

+    *(undefined4 *)(this + 0x40) = 0;

+  }

+  return lVar3;

+}

+
```

## `CProxyStream::SendFileContentsRequest`  (modified)

```diff
--- CProxyStream::SendFileContentsRequest
+++ CProxyStream::SendFileContentsRequest
@@ -1,2 +1,244 @@
-Failed to decompile rdpcorets.dll - .ProgramDB CProxyStream::SendFileContentsRequest : 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 CProxyStream::SendFileContentsRequest(unsigned long,unsigned long) __ptr64

+    */

+

+long __thiscall

+CProxyStream::SendFileContentsRequest(CProxyStream *this,ulong param_1,ulong param_2)

+

+{

+  longlong *plVar1;

+  ulonglong uVar2;

+  bool bVar3;

+  uint uVar4;

+  int iVar5;

+  undefined4 uVar6;

+  long lVar7;

+  DWORD DVar8;

+  char *pcVar9;

+  undefined2 uVar10;

+  HANDLE **pppvVar11;

+  DWORD *pDVar12;

+  DWORD local_res8 [2];

+  ulong local_res10;

+  undefined4 local_res20 [2];

+  HANDLE *local_48;

+  undefined8 local_40;

+  

+  local_48 = (HANDLE *)0x0;

+  local_res8[0] = 0;

+  local_res20[0] = 0;

+  local_res10 = param_1;

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

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

+      return -0x7fff0001;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 1) == 0) {

+      return -0x7fff0001;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return -0x7fff0001;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x27;

+LAB_0:

+    WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

+             &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+    return -0x7fff0001;

+  }

+  if (*(longlong *)(*(longlong *)(this + 0x38) + 0x68) == 0) {

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

+      return -0x7fff0001;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 1) == 0) {

+      return -0x7fff0001;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return -0x7fff0001;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x28;

+    goto LAB_0;

+  }

+  if (*(int *)(this + 0x74) < 0) {

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

+      return -0x7fff0001;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 1) == 0) {

+      return -0x7fff0001;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return -0x7fff0001;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x29;

+    goto LAB_0;

+  }

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

+      ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2a,

+                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+  }

+  pDVar12 = local_res8;

+  pppvVar11 = &local_48;

+  plVar1 = *(longlong **)(*(longlong *)(this + 0x38) + 0x68);

+  iVar5 = (**(code **)(*plVar1 + 0x18))(plVar1);

+  if (iVar5 < 0) {

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

+      return iVar5;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 8) == 0) {

+      return iVar5;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return iVar5;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x2b;

+    pcVar9 = "GetStreamDataEvents failed!";

+LAB_1:

+    WPP_SF_DsD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

+               &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4,pcVar9);

+    return iVar5;

+  }

+  if ((undefined **)WPP_GLOBAL_Control != &WPP_GLOBAL_Control) {

+    if (((WPP_GLOBAL_Control[0x1c] & 1) != 0) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+      pppvVar11 = (HANDLE **)0x2c;

+      pDVar12 = (DWORD *)&WPP_a8127e6349d334906d559d27be98d1da_Traceguids;

+      WPP_SF_DDD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2c,

+                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+    }

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

+        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+      WPP_SF_DdI(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),pppvVar11,pDVar12,uVar4);

+    }

+  }

+  uVar2 = *(ulonglong *)(this + 0x58);

+  local_40 = uVar2;

+  iVar5 = CProxyStreamManager::AcquireProxyStream

+                    (*(CProxyStreamManager **)(this + 0x38),this,*(long *)(this + 0x40));

+  if (iVar5 < 0) {

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

+      return iVar5;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 8) == 0) {

+      return iVar5;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return iVar5;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x2e;

+    pcVar9 = "AcquireProxyStream failed.";

+    goto LAB_1;

+  }

+  if ((*(int *)(this + 0x90) == 0) || (*(ulonglong *)(this + 0x58) < 0x100000000)) {

+    uVar6 = 0;

+  }

+  else {

+    uVar6 = local_40._4_4_;

+  }

+  iVar5 = (**(code **)(*plVar1 + 0x20))

+                    (plVar1,*(undefined4 *)(this + 0x8c),*(undefined4 *)(this + 0x40),

+                     *(undefined4 *)(this + 0x74),local_res10,uVar2 & 0xffffffff,uVar6,param_2,

+                     local_res20);

+  if (iVar5 < 0) {

+    lVar7 = CProxyStreamManager::ReleaseProxyStream

+                      (*(CProxyStreamManager **)(this + 0x38),*(long *)(this + 0x40));

+    if (lVar7 < 0) {

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

+        return iVar5;

+      }

+      if (((WPP_GLOBAL_Control[0x1c] & 1) != 0) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x2f,

+                  &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+      }

+    }

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

+      return iVar5;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 8) == 0) {

+      return iVar5;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return iVar5;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x30;

+    pcVar9 = "SendFileContentsRequest failed!";

+    goto LAB_1;

+  }

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

+      ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x31,

+             &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+  }

+  DVar8 = WaitForMultipleObjects(local_res8[0],local_48,0,0xffffffff);

+  if (DVar8 == 0) {

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

+        ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (4 < (byte)WPP_GLOBAL_Control[0x19])) {

+      uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+      WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x35,

+                  &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+    }

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

+      return 0;

+    }

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

+      return -0x7fffbffb;

+    }

+    if ((WPP_GLOBAL_Control[0x1c] & 1) == 0) {

+      return -0x7fffbffb;

+    }

+    if ((byte)WPP_GLOBAL_Control[0x19] < 2) {

+      return -0x7fffbffb;

+    }

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    WPP_SF_Dddd(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x36,

+                &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+    return -0x7fffbffb;

+  }

+  if (DVar8 < local_res8[0]) {

+    if ((((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) ||

+        ((WPP_GLOBAL_Control[0x1c] & 1) == 0)) || ((byte)WPP_GLOBAL_Control[0x19] < 2))

+    goto LAB_2;

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x32;

+  }

+  else {

+    if (DVar8 == 0x102) {

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

+          ((WPP_GLOBAL_Control[0x1c] & 1) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x19])) {

+        uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+        WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x33,

+                 &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+      }

+      goto LAB_2;

+    }

+    if (((DVar8 == 0xffffffff) || ((undefined **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control)) ||

+       (((WPP_GLOBAL_Control[0x1c] & 1) == 0 || ((byte)WPP_GLOBAL_Control[0x19] < 2))))

+    goto LAB_2;

+    uVar4 = RdpWppGetCurrentThreadActivityIdPrefix();

+    uVar10 = 0x34;

+  }

+  WPP_SF_DD(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

+            &WPP_a8127e6349d334906d559d27be98d1da_Traceguids,uVar4);

+LAB_2:

+  bVar3 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_1894756665>::__private_IsEnabled

+                    ((FeatureImpl<__WilFeatureTraits_Feature_1894756665> *)

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

+                      ::__l2::impl);

+  if ((bVar3) && (*(CProxyStreamManager **)(this + 0x38) != (CProxyStreamManager *)0x0)) {

+    CProxyStreamManager::ReleaseProxyStream

+              (*(CProxyStreamManager **)(this + 0x38),*(long *)(this + 0x40));

+  }

+  (**(code **)(*plVar1 + 0x28))(plVar1,local_res20[0],7,0xc);

+  return -0x7fffbffb;

+}

+
```

## `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
@@ -14,0 +15 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_1894756665>::GetCachedFeatureEnabledState
@@ -17 +17,0 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_26_02_NonSec>::GetCachedFeatureEnabledState
@@ -21 +20,0 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_TestLoc1Perf>::GetCachedFeatureEnabledState
```
