# CVE-2026-95923 — http.sys patch diff

`http.sys` 10.0.26100.9818 -> 10.0.26100.9974 (ghidriff).

## `UxStartEnvironmentModule`  (modified)

```diff
--- UxStartEnvironmentModule
+++ UxStartEnvironmentModule
@@ -1,10 +1,227 @@
 

-/* WARNING: Control flow encountered bad instruction data */

-

-void UxStartEnvironmentModule(void)

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

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

+

+int UxStartEnvironmentModule(void)

 

 {

-                    /* WARNING: Bad instruction - Truncating control flow here */

-  halt_baddata();

+  byte bVar1;

+  short sVar2;

+  int iVar3;

+  longlong lVar4;

+  longlong lVar5;

+  undefined1 auStack_1e8 [32];

+  undefined4 local_1c8;

+  undefined4 local_1c0;

+  uint *local_1b8;

+  char local_1a8 [8];

+  longlong local_1a0;

+  uint local_198 [2];

+  longlong local_190 [2];

+  wchar_t *local_180;

+  undefined8 local_178;

+  undefined8 uStack_170;

+  longlong *local_168;

+  undefined8 uStack_160;

+  undefined8 local_158;

+  undefined8 uStack_150;

+  undefined4 local_148 [70];

+  char local_2e;

+  ulonglong local_28;

+  

+  local_28 = __security_cookie ^ (ulonglong)auStack_1e8;

+  memset(local_148,0,0x11c);

+  local_190[1] = 0x880086;

+  local_1a0 = 0;

+  local_198[0] = 0;

+  local_180 = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Http\\Parameters";

+  lVar4 = 0;

+  local_190[0] = 0;

+  local_158 = 0;

+  uStack_150 = (ulonglong)uStack_150._4_4_ << 0x20;

+  local_178 = 0;

+  uStack_170 = 0;

+  local_1a8[0] = '\0';

+  local_168 = (longlong *)0x0;

+  uStack_160 = 0;

+  iVar3 = wil_InitializeFeatureStaging();

+  lVar5 = 0;

+  if (-1 < iVar3) {

+    UxFeatureStagingInitialized = 1;

+    iVar3 = Feature_HttpQueryTcpTtlRedux__private_IsEnabledDeviceUsageNoInline();

+    UxKirBrHttpQuerySocketTtl = iVar3 != 0;

+    iVar3 = Feature_DtHttpIsbLimitHttp2__private_IsEnabledDeviceUsageNoInline();

+    UxKirDtHttp2IsbLimit = iVar3 != 0;

+    iVar3 = Feature_RefactorIoctls__private_IsEnabledDeviceUsageNoInline();

+    UxKirRefactorIoctls = iVar3 != 0;

+    iVar3 = Feature_MsQuic_2_5__private_IsEnabledDeviceUsageNoInline();

+    UxKirMsQuic_2_5 = iVar3 != 0;

+    iVar3 = Feature_HttpBugFix26Q1__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpBugFix26Q1 = iVar3 != 0;

+    iVar3 = Feature_HttpsysHKERangeRequestH2StatusCode__private_IsEnabledDeviceUsageNoInline();

+    UxKirHKERangeRequestH2StatusCode = iVar3 != 0;

+    iVar3 = Feature_HttpTlsHandshakePerfCounter__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpTlsHandshakePerfCounter = iVar3 != 0;

+    iVar3 = Feature_NewUMAHttpSys__private_IsEnabledDeviceUsageNoInline();

+    UxKirNewUma = iVar3 != 0;

+    iVar3 = Feature_HttpBugFix26Q2__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpBugFix26Q2 = iVar3 != 0;

+    iVar3 = Feature_1164959034__private_IsEnabledDeviceUsageNoInline();

+    UxKirQuicParseLengthCheck = iVar3 != 0;

+    iVar3 = Feature_HttpBugFix2605__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpBugFix2605 = iVar3 != 0;

+    iVar3 = Feature_1508879674__private_IsEnabledDeviceUsageNoInline();

+    UxKirRefBufferOverflowCheck = iVar3 != 0;

+    iVar3 = Feature_3168260408__private_IsEnabledDeviceUsageNoInline();

+    UxKirQuicConnectionCreationRace = iVar3 != 0;

+    iVar3 = Feature_2739649850__private_IsEnabledDeviceUsageNoInline();

+    UxKirQuicCredentialCreationRace = iVar3 != 0;

+    iVar3 = Feature_310367544__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpFixConnRemoteAddrSize = iVar3 != 0;

+    iVar3 = Feature_2589446456__private_IsEnabledDeviceUsageNoInline();

+    UxKirHttpFixConnLocalAddrSize = iVar3 != 0;

+    iVar3 = Feature_3936850235__private_IsEnabledDeviceUsageNoInline();

+    UxKirMaxHeadersCountLimit = iVar3 != 0;

+    if ((UxKirDtHttp2IsbLimit != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,10,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirBrHttpQuerySocketTtl != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0xb,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirRefactorIoctls != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0xc,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirMsQuic_2_5 != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0xd,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHKERangeRequestH2StatusCode != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0xe,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpBugFix26Q1 != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0xf,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpTlsHandshakePerfCounter != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x10,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirNewUma != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x11,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpBugFix26Q2 != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x12,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirQuicParseLengthCheck != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x13,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpBugFix2605 != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x14,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirRefBufferOverflowCheck != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x15,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirMaxHeadersCountLimit != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x16,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirQuicConnectionCreationRace != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x17,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirQuicCredentialCreationRace != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x18,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpFixConnRemoteAddrSize != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x19,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    if ((UxKirHttpFixConnLocalAddrSize != '\0') && ((DAT_0 & 2) != 0)) {

+      WPP_SF_(0x419,0x1a,&WPP_c36f553b7c9b3285a6bf5c7fc8c47b84_Traceguids);

+    }

+    UxNumberOfProcessors = 0;

+    UxMaximumNumberOfProcessors = KeQueryMaximumProcessorCountEx(0xffff);

+    sVar2 = KeQueryHighestNodeNumber();

+    UxNumberOfNodes = sVar2 + 1;

+    iVar3 = UxGetPhysicalMemorySize(&UxTotalPhysicalMemMB);

+    lVar5 = lVar4;

+    if ((((-1 < iVar3) &&

+         (iVar3 = UxOpenNamedEvent(L"\\KernelObjects\\LowNonPagedPoolCondition",

+                                   &UxLowNonPagedPoolEvent), -1 < iVar3)) &&

+        (iVar3 = UxOpenNamedEvent(L"\\KernelObjects\\HighNonPagedPoolCondition",

+                                  &UxHighNonPagedPoolEvent), -1 < iVar3)) &&

+       (iVar3 = UxOpenNamedEvent(L"\\KernelObjects\\LowMemoryCondition",&UxLowMemoryEvent),

+       -1 < iVar3)) {

+      local_148[0] = 0x11c;

+      iVar3 = RtlGetVersion(local_148);

+      if (-1 < iVar3) {

+        UxServerSystem = (byte)(local_2e - 2U) < 2;

+        UxSystemProcess = IoGetCurrentProcess();

+        HttpCmnInitializeStaticHttpCharsTable();

+        local_168 = local_190 + 1;

+        local_178 = CONCAT44(local_178._4_4_,0x30);

+        uStack_170 = 0;

+        uStack_160 = CONCAT44(uStack_160._4_4_,0x240);

+        local_158 = 0;

+        uStack_150 = 0;

+        iVar3 = ZwOpenKey(&local_1a0,0x20019,&local_178);

+        if (iVar3 < 0) {

+          local_1a0 = 0;

+          iVar3 = 0;

+        }

+        UxReadBooleanSetting(local_1a0,L"CompactMode",0,&UxCompactMode);

+        UxReadBooleanSetting(local_1a0,L"EnableIrqlEnforcement",0,&UxEnableIrqlEnforcement);

+        UxReadBooleanSetting(local_1a0,L"SendEndpointInfoToAsc",0,&UxSendEndpointInfoToASC);

+        UxReadBooleanSetting(local_1a0,L"TlsUseStaticServerHello",0,&UxTlsUseStaticServerHello);

+        local_1b8 = &UxAscThrottleLimit;

+        local_1c0 = 0;

+        local_1c8 = 0x7fffffff;

+        UxReadBoundedULongSetting(local_1a0,L"AscThrottleLimit",0,0);

+        UxReadBooleanSetting(local_1a0,L"EnableSslLargeBuffer",1,&UxSslLargeBufferEnabled);

+        local_1b8 = &UxRssEnabledCheckControl;

+        local_1c0 = 0;

+        local_1c8 = 2;

+        UxReadBoundedULongSetting(local_1a0,L"RssStatusCheckControl",1,0);

+        UxReadBooleanSetting(local_1a0,L"EnableHttp3",0,&UxHttp3ServerEnabled);

+        UxReadBooleanSetting(local_1a0,L"EnableHttp3Push",0,&UxHttp3PushEnabled);

+        UxReadBooleanSetting(local_1a0,L"EnableExtendedEvents",0,&UxExtendedEventsEnabled);

+        local_1b8 = local_198;

+        local_1c0 = 0;

+        local_1c8 = 0x7fffffff;

+        UxReadBoundedULongSetting(local_1a0,L"ExtendedEventsFrequency",0xe10,0xf);

+        UxExtendedEventsFrequency = (ulonglong)local_198[0] * 10000000;

+        UxReadBooleanSetting(local_1a0,L"EnableAltSvc",0,&UxAltSvcEnabled);

+        if (UxTelAssertInitialized == '\0') {

+          UxTelAssertsEnabled = 0;

+        }

+        else {

+          UxReadBooleanSetting(local_1a0,L"EnableTelAsserts",0,&UxTelAssertsEnabled);

+        }

+        UlReadGenericParameter(local_1a0,L"Http3Alpn",local_190);

+        lVar5 = local_190[0];

+        if ((local_190[0] != 0) && (*(int *)(local_190[0] + 4) == 7)) {

+          UxHttp3AlpnRegValue = local_190[0];

+          lVar5 = 0;

+        }

+        UxReadBooleanSetting

+                  (local_1a0,L"AllowNonprivilegedCaptureCred",0,&UxAllowNonprivilegedCaptureCred);

+        bVar1 = UlReadLongLongParameter(local_1a0,L"DebugFlags",0);

+        local_190[0] = 0;

+        UxDebugCheckRefcount = bVar1 & 1;

+        UxDebugDisableLookaside = bVar1 >> 1 & 1;

+        KeQueryPerformanceCounter(local_190);

+        UxPerformanceCounterPeriod = local_190[0];

+        UxReadBooleanSetting(local_1a0,L"DisableMultipleLanes",0,local_1a8);

+        if (local_1a8[0] != '\0') {

+          UxNumberOfNodes = 1;

+        }

+      }

+    }

+  }

+  if (local_1a0 != 0) {

+    ZwClose();

+    local_1a0 = 0;

+  }

+  if (lVar5 != 0) {

+    ExFreePoolWithTag(lVar5,0);

+  }

+  if (iVar3 < 0) {

+    UxStopEnvironmentModule();

+  }

+  return iVar3;

 }
```

## `UcAllocateConnection`  (modified)

```diff
--- UcAllocateConnection
+++ UcAllocateConnection
@@ -1,17 +1,98 @@
 

-void UcAllocateConnection(longlong param_1)

+int UcAllocateConnection(int *param_1,int *param_2,undefined8 *param_3)

 

 {

-  char *pcVar1;

-  undefined4 in_EAX;

-  longlong unaff_RBP;

-  undefined4 *unaff_RDI;

+  int *piVar1;

+  int iVar2;

+  int iVar3;

+  undefined4 *puVar4;

+  undefined4 *puVar5;

+  bool bVar6;

   

-  *(int *)(param_1 + -0x47) = *(int *)(param_1 + -0x47) + 1;

-  pcVar1 = (char *)(unaff_RBP + 5 + param_1 * 4);

-  *pcVar1 = *pcVar1 + (char)param_1;

-  *unaff_RDI = in_EAX;

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

+    WPP_SF_qII(0x41d,0x11,&WPP_56ea08d8ed6e31464be6682b63f20434_Traceguids,param_1,param_2,param_3);

+  }

+  *param_3 = 0;

+  puVar4 = (undefined4 *)ExAllocatePool3(0x40,0x88,0x43436355,&UxLowPriorityPool,1);

+  if (puVar4 == (undefined4 *)0x0) {

+    iVar2 = -0x3fffff66;

+  }

+  else {

+    piVar1 = puVar4 + 1;

+    *puVar4 = 0x43436355;

+    puVar5 = puVar4 + 0x18;

+    *piVar1 = 1;

+    bVar6 = UxKirQuicConnectionCreationRace == '\0';

+    *(undefined4 **)(puVar4 + 0x1a) = puVar5;

+    *(undefined4 **)puVar5 = puVar5;

+    puVar5 = puVar4 + 0x14;

+    *(undefined4 **)(puVar4 + 0x16) = puVar5;

+    *(undefined4 **)puVar5 = puVar5;

+    puVar5 = puVar4 + 0x10;

+    *(undefined4 **)(puVar4 + 0x12) = puVar5;

+    *(undefined4 **)puVar5 = puVar5;

+    if (bVar6) {

+      *(int **)(puVar4 + 10) = param_2;

+      LOCK();

+      iVar2 = *param_2;

+      *param_2 = *param_2 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

                     /* WARNING: Subroutine does not return */

-  UlBugCheckEx();

+        UlBugCheckEx(3,param_2,0xf,(longlong)(iVar2 + 1));

+      }

+    }

+    iVar2 = UxAllocateOpaqueId(puVar4 + 6,7,puVar4);

+    puVar5 = (undefined4 *)0x0;

+    if (-1 < iVar2) {

+      *(int **)(puVar4 + 4) = param_1;

+      puVar4[8] = 1;

+      LOCK();

+      iVar2 = *param_1;

+      *param_1 = *param_1 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,param_1,10,(longlong)(iVar2 + 1));

+      }

+      *(undefined8 *)(puVar4 + 0x20) = 0;

+      LOCK();

+      iVar2 = *piVar1;

+      *piVar1 = *piVar1 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,piVar1,0x27,(longlong)(iVar2 + 1));

+      }

+      iVar2 = UcLinkConnectionToSessionContext(param_2,puVar4);

+      puVar5 = puVar4;

+      if (-1 < iVar2) {

+        *(undefined1 *)((longlong)puVar4 + 0xb) = 1;

+        *param_3 = puVar4;

+        goto LAB_1;

+      }

+    }

+    UcCloseConnection(puVar4,0);

+    if (puVar5 != (undefined4 *)0x0) {

+      piVar1 = puVar5 + 1;

+      LOCK();

+      iVar3 = *piVar1;

+      *piVar1 = *piVar1 + -1;

+      UNLOCK();

+      iVar3 = iVar3 + -1;

+      if ((UxDebugCheckRefcount != '\0') && (iVar3 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,piVar1,0x27,(longlong)iVar3);

+      }

+      if (iVar3 == 0) {

+        UcFreeConnection(puVar5);

+      }

+    }

+  }

+LAB_1:

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

+    WPP_SF_D(0x41d,0x12,&WPP_56ea08d8ed6e31464be6682b63f20434_Traceguids,iVar2);

+  }

+  return iVar2;

 }
```

## `UcAllocateCredential`  (modified)

```diff
--- UcAllocateCredential
+++ UcAllocateCredential
@@ -1,15 +1,101 @@
 

-void UcAllocateCredential(undefined4 param_1,undefined8 param_2,undefined8 param_3)

+int UcAllocateCredential(int *param_1,int *param_2,undefined8 *param_3)

 

 {

-  undefined1 *unaff_RDI;

-  undefined1 in_R10B;

+  int *piVar1;

+  int iVar2;

+  int iVar3;

+  int *piVar4;

+  int *piVar5;

+  bool bVar6;

   

-  UlThreadPoolEnqueueWorkItem(0,param_2,param_3,in_R10B,param_1);

-  *unaff_RDI = 0;

   if ((DAT_0 & 0x20) != 0) {

-    WPP_SF_I(0x41d,0x5a,&WPP_56575c1994d736914fbc76cb9eeef0ce_Traceguids);

+    WPP_SF_qII(0x41d,0x10,&WPP_4124afb6b4373692ef197f96cd4643ed_Traceguids,param_1,param_2,param_3);

   }

-  return;

+  *param_3 = 0;

+  piVar4 = (int *)ExAllocatePool3(0x40,0x58,0x43446355,&UxLowPriorityPool,1);

+  if (piVar4 == (int *)0x0) {

+    iVar2 = -0x3fffff66;

+  }

+  else {

+    piVar1 = piVar4 + 1;

+    *piVar4 = 0x43446355;

+    piVar5 = piVar4 + 0x12;

+    *piVar1 = 1;

+    bVar6 = UxKirQuicCredentialCreationRace == '\0';

+    *(int **)(piVar4 + 0x14) = piVar5;

+    *(int **)piVar5 = piVar5;

+    piVar5 = piVar4 + 0xe;

+    *(int **)(piVar4 + 0x10) = piVar5;

+    *(int **)piVar5 = piVar5;

+    if (bVar6) {

+      *(int **)(piVar4 + 8) = param_2;

+      LOCK();

+      iVar2 = *param_2;

+      *param_2 = *param_2 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,param_2,0xf,(longlong)(iVar2 + 1));

+      }

+    }

+    iVar2 = UxAllocateOpaqueId(piVar4 + 6,9,piVar4);

+    piVar5 = (int *)0x0;

+    if (-1 < iVar2) {

+      *(int **)(piVar4 + 4) = param_1;

+      LOCK();

+      iVar2 = *param_1;

+      *param_1 = *param_1 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,param_1,10,(longlong)(iVar2 + 1));

+      }

+      piVar5 = param_1 + 5;

+      if ((*(ulonglong *)(param_1 + 0x2c) & 1) != 0) {

+        piVar5 = (int *)0x0;

+      }

+      iVar2 = UcpCreateClientConfiguration(*(ulonglong *)(param_1 + 0x2c),piVar5,piVar4 + 10);

+      piVar5 = (int *)0x0;

+      if (-1 < iVar2) {

+        LOCK();

+        iVar2 = *piVar1;

+        *piVar1 = *piVar1 + 1;

+        UNLOCK();

+        if ((UxDebugCheckRefcount != '\0') && (iVar2 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+          UlBugCheckEx(3,piVar1,0x27,(longlong)(iVar2 + 1));

+        }

+        iVar2 = UcLinkCredentialToSessionContext(param_2,piVar4);

+        piVar5 = piVar4;

+        if (-1 < iVar2) {

+          *(undefined1 *)((longlong)piVar4 + 9) = 1;

+          *param_3 = piVar4;

+          goto LAB_1;

+        }

+      }

+    }

+    UcCloseCredential(piVar4,0);

+    if (piVar5 != (int *)0x0) {

+      piVar4 = piVar5 + 1;

+      LOCK();

+      iVar3 = *piVar4;

+      *piVar4 = *piVar4 + -1;

+      UNLOCK();

+      iVar3 = iVar3 + -1;

+      if ((UxDebugCheckRefcount != '\0') && (iVar3 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,piVar4,0x27,(longlong)iVar3);

+      }

+      if (iVar3 == 0) {

+        UcFreeCredential(piVar5);

+      }

+    }

+  }

+LAB_1:

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

+    WPP_SF_D(0x41d,0x11,&WPP_4124afb6b4373692ef197f96cd4643ed_Traceguids,iVar2);

+  }

+  return iVar2;

 }
```

## `UxQuicConnectionGetPeerIssuerListClient`  (modified)

```diff
--- UxQuicConnectionGetPeerIssuerListClient
+++ UxQuicConnectionGetPeerIssuerListClient
@@ -1,37 +1,77 @@
 

-/* WARNING: Instruction at (ram,0x0001400ecbee) overlaps instruction at (ram,0x0001400ecbec)

-    */

-

-void UxQuicConnectionGetPeerIssuerListClient(longlong param_1,longlong param_2)

+undefined4

+UxQuicConnectionGetPeerIssuerListClient

+          (longlong param_1,char param_2,longlong *param_3,uint param_4,uint *param_5)

 

 {

-  code *pcVar1;

-  undefined8 uVar2;

-  bool in_OF;

+  longlong *plVar1;

+  longlong *plVar2;

+  undefined4 uVar3;

+  uint uVar4;

+  longlong *plVar5;

+  ulonglong uVar6;

+  longlong local_30 [3];

   

-  if (!in_OF) {

-    pcVar1 = (code *)swi(3);

-    (*pcVar1)();

-    return;

+  local_30[0] = 0;

+  local_30[1] = 0;

+  *param_5 = 0;

+  KeEnterCriticalRegion();

+  ExAcquirePushLockSharedEx(param_1 + 0x28,0);

+  if (*(int *)(param_1 + 0xb0) == -0x3fdbfe8c) {

+    plVar5 = local_30;

+    if (*(longlong **)(param_1 + 0x690) != (longlong *)0x0) {

+      plVar5 = *(longlong **)(param_1 + 0x690);

+    }

+    if (param_2 == '\0') {

+      uVar4 = (*(uint *)(plVar5 + 1) + 1) * 0x10;

+      for (uVar6 = 0; (uint)uVar6 < *(uint *)(plVar5 + 1); uVar6 = (ulonglong)((uint)uVar6 + 1)) {

+        uVar4 = uVar4 + *(int *)(*plVar5 + uVar6 * 0x10);

+      }

+      *param_5 = uVar4;

+      if (param_4 < uVar4) {

+        uVar3 = 0x80000005;

+      }

+      else {

+        uVar3 = 0;

+        plVar1 = param_3 + 2;

+        if (UxKirNewUma == '\0') {

+          *param_3 = (longlong)plVar1;

+          *(int *)(param_3 + 1) = (int)plVar5[1];

+        }

+        else {

+          RtlWriteULong64ToUser(param_3,plVar1);

+          RtlWriteULongToUser(param_3 + 1,(int)plVar5[1]);

+        }

+        param_3 = param_3 + ((ulonglong)*(uint *)(plVar5 + 1) + 1) * 2;

+        for (uVar4 = 0; uVar4 < *(uint *)(plVar5 + 1); uVar4 = uVar4 + 1) {

+          uVar6 = (ulonglong)uVar4;

+          plVar2 = plVar1 + uVar6 * 2;

+          if (UxKirNewUma == '\0') {

+            plVar2[1] = (longlong)param_3;

+            *(undefined4 *)plVar2 = *(undefined4 *)(*plVar5 + uVar6 * 0x10);

+            memmove(param_3,*(void **)(*plVar5 + 8 + uVar6 * 0x10),

+                    (ulonglong)*(uint *)(*plVar5 + uVar6 * 0x10));

+          }

+          else {

+            RtlWriteULong64ToUser(plVar2 + 1,param_3);

+            RtlWriteULongToUser(plVar2,*(undefined4 *)(*plVar5 + uVar6 * 0x10));

+            RtlCopyToUser(param_3,*(undefined8 *)(*plVar5 + 8 + uVar6 * 0x10),

+                          *(undefined4 *)(*plVar5 + uVar6 * 0x10));

+          }

+          param_3 = (longlong *)

+                    ((longlong)param_3 + (ulonglong)*(uint *)(*plVar5 + (ulonglong)uVar4 * 0x10));

+        }

+      }

+    }

+    else {

+      uVar3 = UxpQuicConnectionCopyIssuerList32(plVar5,param_3,param_4,param_5);

+    }

   }

-  uVar2 = *(undefined8 *)(param_1 + 0x68);

-  *(undefined8 *)(param_2 + 0x20) = *(undefined8 *)(param_1 + 0x60);

-  *(undefined8 *)(param_2 + 0x28) = uVar2;

-  uVar2 = *(undefined8 *)(param_1 + 0x78);

-  *(undefined8 *)(param_2 + 0x30) = *(undefined8 *)(param_1 + 0x70);

-  *(undefined8 *)(param_2 + 0x38) = uVar2;

-  uVar2 = *(undefined8 *)(param_1 + 0x88);

-  *(undefined8 *)(param_2 + 0x40) = *(undefined8 *)(param_1 + 0x80);

-  *(undefined8 *)(param_2 + 0x48) = uVar2;

-  uVar2 = *(undefined8 *)(param_1 + 0x98);

-  *(undefined8 *)(param_2 + 0x50) = *(undefined8 *)(param_1 + 0x90);

-  *(undefined8 *)(param_2 + 0x58) = uVar2;

-  uVar2 = *(undefined8 *)(param_1 + 0xa8);

-  *(undefined8 *)(param_2 + 0x60) = *(undefined8 *)(param_1 + 0xa0);

-  *(undefined8 *)(param_2 + 0x68) = uVar2;

-  uVar2 = *(undefined8 *)(param_1 + 0xb8);

-  *(undefined8 *)(param_2 + 0x70) = *(undefined8 *)(param_1 + 0xb0);

-  *(undefined8 *)(param_2 + 0x78) = uVar2;

-  return;

+  else {

+    uVar3 = 0xc0000225;

+  }

+  ExReleasePushLockSharedEx(param_1 + 0x28,0);

+  KeLeaveCriticalRegion();

+  return uVar3;

 }
```

## `UcLinkCredentialToSessionContext`  (modified)

```diff
--- UcLinkCredentialToSessionContext
+++ UcLinkCredentialToSessionContext
@@ -1,17 +1,41 @@
 

-undefined4 UcLinkCredentialToSessionContext(void)

+undefined8 UcLinkCredentialToSessionContext(int *param_1,longlong param_2)

 

 {

-  undefined4 unaff_EBX;

-  longlong unaff_RSI;

+  int iVar1;

+  longlong lVar2;

+  undefined8 uVar3;

+  undefined8 uVar4;

   

-  *(int *)(unaff_RSI + 0x62) = *(int *)(unaff_RSI + 0x62) + 1;

-  UcpAddConnectionToSessionContext();

-  ExReleaseCacheAwarePushLockSharedEx();

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

+    WPP_SF_qI(0x41d,0x3b,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,param_1,param_2);

+  }

+  lVar2 = *(longlong *)(param_1 + 2);

+  KeEnterCriticalRegion();

+  uVar3 = ExAcquireCacheAwarePushLockSharedEx(*(undefined8 *)(lVar2 + 0x40),0);

+  uVar4 = 0;

+  if ((char)param_1[1] == '\0') {

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

+      *(int **)(param_2 + 0x20) = param_1;

+      LOCK();

+      iVar1 = *param_1;

+      *param_1 = *param_1 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar1 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,param_1,0xf,(longlong)(iVar1 + 1));

+      }

+    }

+    UcpAddCredentialToSessionContext(param_1,param_2);

+  }

+  else {

+    uVar4 = 0xc0000008;

+  }

+  ExReleaseCacheAwarePushLockSharedEx(uVar3,0);

   KeLeaveCriticalRegion();

   if ((DAT_0 & 0x20) != 0) {

-    WPP_SF_D(0x41d,0x32,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,unaff_EBX);

+    WPP_SF_D(0x41d,0x3c,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,uVar4);

   }

-  return unaff_EBX;

+  return uVar4;

 }
```

## `UxQuicConnectionCopyBindings32`  (modified)

```diff
--- UxQuicConnectionCopyBindings32
+++ UxQuicConnectionCopyBindings32
@@ -1,40 +1,34 @@
 

-undefined4 UxQuicConnectionCopyBindings32(void)

+undefined8 UxQuicConnectionCopyBindings32(uint *param_1,uint *param_2,uint param_3,uint *param_4)

 

 {

-  uint in_EAX;

-  undefined4 uVar1;

-  undefined4 *unaff_RSI;

-  longlong unaff_RDI;

-  uint unaff_R12D;

-  void *unaff_R14;

-  undefined4 uStack0000000000000030;

-  undefined8 in_stack_00000080;

+  uint *_Dst;

+  uint uVar1;

+  undefined8 uVar2;

   

-  if (unaff_R12D < in_EAX) {

-    uVar1 = 0x80000005;

-    uStack0000000000000030 = 0x80000005;

+  uVar1 = *param_1;

+  _Dst = param_2 + 2;

+  *param_4 = uVar1 + 8;

+  if (param_3 < uVar1 + 8) {

+    uVar2 = 0x80000005;

   }

   else {

-    uVar1 = 0;

-    uStack0000000000000030 = 0;

+    uVar2 = 0;

     if (UxKirNewUma == '\0') {

-      *unaff_RSI = *(undefined4 *)(unaff_RDI + 8);

+      *param_2 = *param_1;

     }

     else {

-      RtlWriteULongToUser();

+      RtlWriteULongToUser(param_2);

     }

     if (UxKirNewUma == '\0') {

-      *(void **)(unaff_RSI + 2) = unaff_R14;

-      memmove(unaff_R14,*(void **)(unaff_RDI + 0x10),(ulonglong)*(uint *)(unaff_RDI + 8));

+      param_2[1] = (uint)_Dst;

+      memmove(_Dst,*(void **)(param_1 + 2),(ulonglong)*param_1);

     }

     else {

-      RtlWriteULong64ToUser();

-      RtlCopyToUser();

+      RtlWriteULongToUser(param_2 + 1,(ulonglong)_Dst & 0xffffffff);

+      RtlCopyToUser(_Dst,*(undefined8 *)(param_1 + 2),*param_1);

     }

   }

-  ExReleasePushLockExclusiveEx(in_stack_00000080,0);

-  KeLeaveCriticalRegion();

-  return uVar1;

+  return uVar2;

 }
```

## `UcQueryClientConnectionProperty`  (modified)

```diff
--- UcQueryClientConnectionProperty
+++ UcQueryClientConnectionProperty
@@ -1,17 +1,265 @@
 

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

-

-undefined1 UcQueryClientConnectionProperty(void)

+int UcQueryClientConnectionProperty

+              (undefined8 *param_1,undefined8 param_2,ulonglong param_3,undefined8 *param_4,

+              uint param_5,undefined4 *param_6)

 

 {

-  undefined1 in_AL;

-  undefined7 in_register_00000001;

-  longlong unaff_RDI;

+  longlong *plVar1;

+  int iVar2;

+  longlong lVar3;

+  undefined4 uVar4;

+  undefined4 uVar5;

+  undefined8 *puVar6;

+  char cVar7;

+  uint uVar8;

+  int iVar9;

+  longlong lVar10;

+  undefined8 *puVar11;

+  longlong lVar12;

+  int *piVar13;

+  undefined8 *puVar14;

+  undefined4 uVar15;

+  undefined8 local_res8;

+  undefined4 uVar18;

+  undefined8 uVar16;

+  undefined4 *puVar17;

+  undefined8 local_38;

+  undefined8 uStack_30;

   

-  *(ulonglong *)(unaff_RDI + 8) = CONCAT71(in_register_00000001,in_AL);

+  local_res8 = 0;

   if ((DAT_0 & 0x20) != 0) {

-    WPP_SF_qL(0x41d,0xa8,&WPP_2477d2e7f3a4309990265c2d436d7eb1_Traceguids);

-  }

-  return 1;

+    WPP_SF_qqlqLq(param_1,0x9e,param_3,param_1,param_2,(uint)param_3 & 0xff,param_4,param_5,param_6)

+    ;

+  }

+  *param_6 = 0;

+  lVar10 = UxGetObjectFromOpaqueId

+                     (*param_1,7,UcReferenceClientConnectionFromId,UcValidateClientConnectionFromId,

+                      param_2);

+  uVar18 = (undefined4)((ulonglong)param_2 >> 0x20);

+  if (lVar10 == 0) {

+    iVar9 = -0x3ffffdc6;

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

+      WPP_SF_D(0x31d,0x9f,&WPP_2477d2e7f3a4309990265c2d436d7eb1_Traceguids,0xc000023a);

+    }

+    goto LAB_2;

+  }

+  KeEnterCriticalRegion();

+  lVar12 = lVar10 + 0x80;

+  ExAcquirePushLockExclusiveEx(lVar12,0);

+  if (*(char *)(lVar10 + 9) == '\0') {

+    if (*(longlong *)(lVar10 + 0x30) == 0) {

+      iVar9 = -0x3ffffdc6;

+      goto LAB_3;

+    }

+    piVar13 = (int *)(*(longlong *)(lVar10 + 0x30) + 4);

+    LOCK();

+    iVar9 = *piVar13;

+    *piVar13 = *piVar13 + 1;

+    UNLOCK();

+    if ((UxDebugCheckRefcount != '\0') && (0x7fffffff < iVar9 + 1U)) {

+                    /* WARNING: Subroutine does not return */

+      UlBugCheckEx(3,piVar13,0x27,(longlong)(int)(iVar9 + 1U));

+    }

+    lVar3 = *(longlong *)(lVar10 + 0x30);

+    ExReleasePushLockExclusiveEx(lVar12,0);

+    KeLeaveCriticalRegion();

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

+      uVar16 = *(undefined8 *)(lVar10 + 0x18);

+      WPP_SF_qqL(0x41d,0xa0,&WPP_2477d2e7f3a4309990265c2d436d7eb1_Traceguids,lVar10,uVar16,

+                 *(undefined4 *)(param_1 + 1));

+      uVar18 = (undefined4)((ulonglong)uVar16 >> 0x20);

+    }

+    iVar9 = *(int *)(param_1 + 1);

+    if (iVar9 < 7) {

+      if (iVar9 == 6) {

+        uVar15 = 0x80;

+        if (param_5 < 0x80) goto LAB_4;

+        UxQuicConnectionGetLocalAddress(lVar3,param_4);

+LAB_5:

+        iVar9 = 0;

+        *param_6 = uVar15;

+      }

+      else if (iVar9 == 0) {

+        puVar17 = param_6;

+        iVar9 = UxQuicConnectionGetPeerCertificatesClient

+                          (lVar3,param_3 & 0xff,param_4,param_5,param_6);

+        uVar18 = (undefined4)((ulonglong)puVar17 >> 0x20);

+      }

+      else if (iVar9 == 1) {

+        if (param_5 < 0x1c) goto LAB_4;

+        uVar15 = *(undefined4 *)(lVar3 + 0x350);

+        uVar4 = *(undefined4 *)(lVar3 + 0x354);

+        uVar5 = *(undefined4 *)(lVar3 + 0x358);

+        iVar9 = 0;

+        *(undefined4 *)param_4 = *(undefined4 *)(lVar3 + 0x34c);

+        *(undefined4 *)((longlong)param_4 + 4) = uVar15;

+        *(undefined4 *)(param_4 + 1) = uVar4;

+        *(undefined4 *)((longlong)param_4 + 0xc) = uVar5;

+        param_4[2] = *(undefined8 *)(lVar3 + 0x35c);

+        *(undefined4 *)(param_4 + 3) = *(undefined4 *)(lVar3 + 0x364);

+        *param_6 = 0x1c;

+      }

+      else if (iVar9 == 2) {

+        if (param_5 < 0x2a8) goto LAB_4;

+        iVar9 = 0;

+        lVar12 = 5;

+        puVar6 = (undefined8 *)(lVar3 + 0x368);

+        do {

+          puVar14 = param_4;

+          puVar11 = puVar6;

+          uVar16 = puVar11[1];

+          *puVar14 = *puVar11;

+          puVar14[1] = uVar16;

+          uVar16 = puVar11[3];

+          puVar14[2] = puVar11[2];

+          puVar14[3] = uVar16;

+          uVar16 = puVar11[5];

+          puVar14[4] = puVar11[4];

+          puVar14[5] = uVar16;

+          uVar16 = puVar11[7];

+          puVar14[6] = puVar11[6];

+          puVar14[7] = uVar16;

+          uVar16 = puVar11[9];

+          puVar14[8] = puVar11[8];

+          puVar14[9] = uVar16;

+          uVar16 = puVar11[0xb];

+          puVar14[10] = puVar11[10];

+          puVar14[0xb] = uVar16;

+          uVar16 = puVar11[0xd];

+          puVar14[0xc] = puVar11[0xc];

+          puVar14[0xd] = uVar16;

+          uVar16 = puVar11[0xf];

+          puVar14[0xe] = puVar11[0xe];

+          puVar14[0xf] = uVar16;

+          lVar12 = lVar12 + -1;

+          puVar6 = puVar11 + 0x10;

+          param_4 = puVar14 + 0x10;

+        } while (lVar12 != 0);

+        uVar15 = *(undefined4 *)((longlong)puVar11 + 0x84);

+        uVar4 = *(undefined4 *)(puVar11 + 0x11);

+        uVar5 = *(undefined4 *)((longlong)puVar11 + 0x8c);

+        *(undefined4 *)(puVar14 + 0x10) = *(undefined4 *)(puVar11 + 0x10);

+        *(undefined4 *)((longlong)puVar14 + 0x84) = uVar15;

+        *(undefined4 *)(puVar14 + 0x11) = uVar4;

+        *(undefined4 *)((longlong)puVar14 + 0x8c) = uVar5;

+        uVar16 = puVar11[0x13];

+        puVar14[0x12] = puVar11[0x12];

+        puVar14[0x13] = uVar16;

+        puVar14[0x14] = puVar11[0x14];

+        *param_6 = 0x2a8;

+      }

+      else if (iVar9 == 3) {

+        puVar17 = param_6;

+        iVar9 = UxQuicConnectionCopyBindings(lVar3,param_3 & 0xff,param_4,param_5,param_6);

+        uVar18 = (undefined4)((ulonglong)puVar17 >> 0x20);

+      }

+      else {

+        if ((iVar9 != 5) || (param_5 < 200)) goto LAB_4;

+        iVar9 = UxQuicConnectionGetStatsV1(lVar3,&local_res8,param_4);

+        if (-1 < iVar9) {

+          *param_6 = 200;

+        }

+      }

+      goto LAB_6;

+    }

+    if (iVar9 == 7) {

+      uVar15 = 0x80;

+      if (0x7f < param_5) {

+        UxQuicConnectionGetRemoteAddress(lVar3,param_4);

+        goto LAB_5;

+      }

+LAB_4:

+      iVar9 = -0x3ffffff3;

+    }

+    else if (iVar9 == 8) {

+      if (param_5 < 0x10) goto LAB_4;

+      iVar9 = 0;

+      UxQuicConnectionGetIdleState

+                (lVar3,*(longlong **)(lVar10 + 0x50) == (longlong *)(lVar10 + 0x50),param_4);

+      *param_6 = 0x10;

+    }

+    else if (iVar9 == 9) {

+      puVar17 = param_6;

+      iVar9 = UxQuicConnectionGetPeerIssuerListClient(lVar3,param_3 & 0xff,param_4,param_5,param_6);

+      uVar18 = (undefined4)((ulonglong)puVar17 >> 0x20);

+    }

+    else if (iVar9 == 10) {

+      if (param_5 < 0xd0) goto LAB_4;

+      iVar9 = UxQuicConnectionGetStatsV2(lVar3,&local_res8,param_4,param_6);

+    }

+    else {

+      if ((iVar9 != 0xb) || (param_5 < 4)) goto LAB_4;

+      iVar9 = 0;

+      *(undefined4 *)param_4 = *(undefined4 *)(lVar3 + 0x698);

+      *param_6 = 4;

+    }

+LAB_6:

+    if (lVar3 != 0) {

+      piVar13 = (int *)(lVar3 + 4);

+      LOCK();

+      iVar2 = *piVar13;

+      *piVar13 = *piVar13 + -1;

+      UNLOCK();

+      uVar8 = iVar2 - 1;

+      if ((UxDebugCheckRefcount != '\0') && (0x7fffffff < uVar8)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,piVar13,0x27,(longlong)(int)uVar8);

+      }

+      if (uVar8 == 0) {

+        lVar12 = IoGetCurrentProcess();

+        plVar1 = (longlong *)(lVar3 + 0x720);

+        uVar16 = *(undefined8 *)(lVar3 + 0xa10);

+        if (UxSystemProcess == lVar12) {

+          local_38 = 0;

+          uStack_30 = 0;

+          if (((*plVar1 != 0) || (*(longlong *)(lVar3 + 0x730) != 0)) ||

+             (*(longlong *)(lVar3 + 0x740) != 0)) {

+                    /* WARNING: Subroutine does not return */

+            UlBugCheckEx(1,plVar1,"minio\\http\\sys\\quicconn.h",0x44e);

+          }

+          cVar7 = KeGetCurrentIrql();

+          if (cVar7 == '\0') {

+            UxPodAttachThread(uVar16,&local_38);

+            UxQuicFreeConnection(plVar1);

+            UxPodDetachThread(&local_38);

+            goto LAB_7;

+          }

+        }

+        else if (((*plVar1 != 0) || (*(longlong *)(lVar3 + 0x730) != 0)) ||

+                (*(longlong *)(lVar3 + 0x740) != 0)) {

+                    /* WARNING: Subroutine does not return */

+          UlBugCheckEx(1,plVar1,"minio\\http\\sys\\quicconn.h",0x447);

+        }

+        UlThreadPoolEnqueueWorkItem(0,plVar1,UxQuicFreeConnection,1,uVar16,0xffffffff);

+        uVar18 = (undefined4)((ulonglong)uVar16 >> 0x20);

+      }

+    }

+  }

+  else {

+    iVar9 = -0x3ffffee0;

+LAB_3:

+    ExReleasePushLockExclusiveEx(lVar12,0);

+    KeLeaveCriticalRegion();

+  }

+LAB_7:

+  piVar13 = (int *)(lVar10 + 4);

+  LOCK();

+  iVar2 = *piVar13;

+  *piVar13 = *piVar13 + -1;

+  UNLOCK();

+  uVar8 = iVar2 - 1;

+  if ((UxDebugCheckRefcount != '\0') && (0x7fffffff < uVar8)) {

+                    /* WARNING: Subroutine does not return */

+    UlBugCheckEx(3,piVar13,0xb,(longlong)(int)uVar8);

+  }

+  if (uVar8 == 0) {

+    UcFreeConnection(lVar10);

+  }

+LAB_2:

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

+    WPP_SF_dD(0x41d,0xa1,&WPP_2477d2e7f3a4309990265c2d436d7eb1_Traceguids,iVar9,

+              CONCAT44(uVar18,*param_6));

+  }

+  return iVar9;

 }
```

## `UxQuicConnectionCopyBindings`  (modified)

```diff
--- UxQuicConnectionCopyBindings
+++ UxQuicConnectionCopyBindings
@@ -1,55 +1,51 @@
 

-ulonglong UxQuicConnectionCopyBindings(undefined8 param_1,undefined2 param_2)

+undefined4

+UxQuicConnectionCopyBindings

+          (longlong param_1,char param_2,undefined4 *param_3,uint param_4,uint *param_5)

 

 {

-  longlong *plVar1;

-  code *pcVar2;

-  undefined4 in_EAX;

-  undefined8 *puVar3;

-  longlong unaff_RBX;

-  ulonglong unaff_RDI;

-  longlong *unaff_R14;

-  undefined4 *unaff_R15;

-  undefined1 local_res8 [32];

+  undefined4 *_Dst;

+  longlong lVar1;

+  undefined4 uVar2;

+  uint uVar3;

   

-  out(param_2,in_EAX);

-  if (*(char *)(unaff_RBX + 0xa0) == (char)unaff_RDI) {

-    if ((*(ulonglong *)(unaff_RBX + 0x90) == unaff_RDI) &&

-       (*(char *)(unaff_RBX + 0x6f7) != (char)unaff_RDI)) {

-      if (DAT_0._3_1_ < '\0') {

-        WPP_SF_I(0x21f,0x6f,&WPP_9a319cb0e45a3f2d2aa1f6e4c9e9b07e_Traceguids);

-      }

-      unaff_RDI = 0xc0000044;

+  _Dst = param_3 + 4;

+  *param_5 = 0;

+  KeEnterCriticalRegion();

+  ExAcquirePushLockExclusiveEx(param_1 + 0x28,0);

+  lVar1 = *(longlong *)(param_1 + 0x6b0);

+  if (lVar1 == 0) {

+    uVar2 = 0xc0000184;

+  }

+  else if (param_2 == '\0') {

+    uVar3 = *(int *)(lVar1 + 8) + 0x10;

+    *param_5 = uVar3;

+    if (param_4 < uVar3) {

+      uVar2 = 0x80000005;

     }

     else {

-      plVar1 = (longlong *)(unaff_RBX + 0x310);

-      if ((longlong *)*plVar1 == plVar1) {

-        UxpQuicConnectionStopTimer();

+      uVar2 = 0;

+      if (UxKirNewUma == '\0') {

+        *param_3 = *(undefined4 *)(lVar1 + 8);

       }

-      puVar3 = *(undefined8 **)(unaff_RBX + 0x318);

-      if ((longlong *)*puVar3 != plVar1) {

-        pcVar2 = (code *)swi(0x29);

-        puVar3 = (undefined8 *)(*pcVar2)(3);

-        register0x00000020 = (BADSPACEBASE *)local_res8;

+      else {

+        RtlWriteULongToUser(param_3);

       }

-      *unaff_R14 = (longlong)plVar1;

-      unaff_R14[1] = (longlong)puVar3;

-      *puVar3 = unaff_R14;

-      *(longlong **)(unaff_RBX + 0x318) = unaff_R14;

-      *unaff_R15 = *(undefined4 *)(unaff_RBX + 0x328);

-      *(int *)(unaff_RBX + 0x328) = *(int *)(unaff_RBX + 0x328) + 1;

+      if (UxKirNewUma == '\0') {

+        *(undefined4 **)(param_3 + 2) = _Dst;

+        memmove(_Dst,*(void **)(lVar1 + 0x10),(ulonglong)*(uint *)(lVar1 + 8));

+      }

+      else {

+        RtlWriteULong64ToUser(param_3 + 2,_Dst);

+        RtlCopyToUser(_Dst,*(undefined8 *)(lVar1 + 0x10),*(undefined4 *)(lVar1 + 8));

+      }

     }

   }

   else {

-    if (DAT_0._3_1_ < '\0') {

-      WPP_SF_I(0x21f,(int)unaff_RDI + 0x6e,&WPP_9a319cb0e45a3f2d2aa1f6e4c9e9b07e_Traceguids);

-    }

-    unaff_RDI = 0xc0000184;

+    uVar2 = UxQuicConnectionCopyBindings32(lVar1 + 8,param_3,param_4,param_5);

   }

-  *(undefined8 *)((longlong)register0x00000020 + -8) = 0x1400ebde7;

-  ExReleasePushLockExclusiveEx(unaff_RBX + 0x28,0);

-  *(undefined8 *)((longlong)register0x00000020 + -8) = 0x1400ebdf3;

+  ExReleasePushLockExclusiveEx(param_1 + 0x28,0);

   KeLeaveCriticalRegion();

-  return unaff_RDI & 0xffffffff;

+  return uVar2;

 }
```

## `UcLinkConnectionToSessionContext`  (modified)

```diff
--- UcLinkConnectionToSessionContext
+++ UcLinkConnectionToSessionContext
@@ -1,22 +1,41 @@
 

-/* WARNING: Control flow encountered bad instruction data */

-

-undefined4 UcLinkConnectionToSessionContext(char param_1)

+undefined8 UcLinkConnectionToSessionContext(int *param_1,longlong param_2)

 

 {

-  undefined4 unaff_EBX;

-  char *unaff_RDI;

-  bool in_SF;

+  int iVar1;

+  longlong lVar2;

+  undefined8 uVar3;

+  undefined8 uVar4;

   

-  if (!in_SF) {

-    *unaff_RDI = *unaff_RDI + param_1;

-                    /* WARNING: Bad instruction - Truncating control flow here */

-    halt_baddata();

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

+    WPP_SF_qI(0x41d,0x31,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,param_1,param_2);

   }

+  lVar2 = *(longlong *)(param_1 + 2);

+  KeEnterCriticalRegion();

+  uVar3 = ExAcquireCacheAwarePushLockSharedEx(*(undefined8 *)(lVar2 + 0x40),0);

+  uVar4 = 0;

+  if ((char)param_1[1] == '\0') {

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

+      *(int **)(param_2 + 0x28) = param_1;

+      LOCK();

+      iVar1 = *param_1;

+      *param_1 = *param_1 + 1;

+      UNLOCK();

+      if ((UxDebugCheckRefcount != '\0') && (iVar1 + 1 < 0)) {

+                    /* WARNING: Subroutine does not return */

+        UlBugCheckEx(3,param_1,0xf,(longlong)(iVar1 + 1));

+      }

+    }

+    UcpAddConnectionToSessionContext(param_1,param_2);

+  }

+  else {

+    uVar4 = 0xc0000008;

+  }

+  ExReleaseCacheAwarePushLockSharedEx(uVar3,0);

   KeLeaveCriticalRegion();

   if ((DAT_0 & 0x20) != 0) {

-    WPP_SF_D(0x41d,0x1f,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,unaff_EBX);

+    WPP_SF_D(0x41d,0x32,&WPP_ccde5e89b1cd3fffdab2f9747747473e_Traceguids,uVar4);

   }

-  return unaff_EBX;

+  return uVar4;

 }
```

## `UxpQuicConnectionCopyCertBlob32`  (modified)

```diff
--- UxpQuicConnectionCopyCertBlob32
+++ UxpQuicConnectionCopyCertBlob32
@@ -1,44 +1,40 @@
 

-ulonglong UxpQuicConnectionCopyCertBlob32(uint *param_1,char param_2)

+undefined8 UxpQuicConnectionCopyCertBlob32(uint *param_1,uint *param_2,uint param_3,uint *param_4)

 

 {

-  uint uVar1;

-  ulonglong unaff_RBX;

-  void *unaff_RSI;

-  uint *unaff_RDI;

-  uint in_R10D;

-  bool in_ZF;

+  uint *_Dst;

+  uint *puVar1;

+  uint uVar2;

+  undefined8 uVar3;

   

-  if (in_ZF) {

-    unaff_RBX = 0xc000000d;

+  uVar2 = *param_1;

+  _Dst = param_2 + 2;

+  *param_4 = uVar2 + 8;

+  if (param_3 < uVar2 + 8) {

+    uVar3 = 0x80000005;

   }

-  else if (param_2 == '\0') {

-    uVar1 = *unaff_RDI;

-    *param_1 = uVar1 + 0x10;

-    if (in_R10D < uVar1 + 0x10) {

-      unaff_RBX = 0x80000005;

+  else {

+    puVar1 = param_2 + 1;

+    uVar3 = 0;

+    if (UxKirNewUma == '\0') {

+      *param_2 = *param_1;

+      *puVar1 = 0;

     }

     else {

-      if (UxKirNewUma == (char)unaff_RBX) {

-        memmove(unaff_RSI,unaff_RDI,(ulonglong)*unaff_RDI + 0x10);

+      RtlWriteULongToUser(param_2);

+      RtlSetUserMemory(puVar1,0,4);

+    }

+    if (*(longlong *)(param_1 + 2) != 0) {

+      if (UxKirNewUma == '\0') {

+        *puVar1 = (uint)_Dst;

+        memmove(_Dst,*(void **)(param_1 + 2),(ulonglong)*param_1);

       }

       else {

-        RtlCopyToUser();

-      }

-      if (*(ulonglong *)(unaff_RDI + 2) != unaff_RBX) {

-        if (UxKirNewUma == (char)unaff_RBX) {

-          *(longlong *)((longlong)unaff_RSI + 8) = (longlong)unaff_RSI + 0x10;

-        }

-        else {

-          RtlWriteULong64ToUser();

-        }

+        RtlWriteULongToUser(puVar1,(ulonglong)_Dst & 0xffffffff);

+        RtlCopyToUser(_Dst,*(undefined8 *)(param_1 + 2),*param_1);

       }

     }

   }

-  else {

-    uVar1 = func_0x0001400f4670();

-    unaff_RBX = (ulonglong)uVar1;

-  }

-  return unaff_RBX & 0xffffffff;

+  return uVar3;

 }
```
