# CVE-2026-62782 — mrxsmb.sys patch diff

`mrxsmb.sys` 10.0.26100.8875 -> 10.0.26100.9168 (ghidriff).

## `SmbNegotiate_Continue`  (modified)

```diff
--- SmbNegotiate_Continue
+++ SmbNegotiate_Continue
@@ -1,13 +1,342 @@
-

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

 

 ulonglong SmbNegotiate_Continue(ulonglong param_1)

 

 {

-  longlong in_RAX;

+  uint *puVar1;

+  short sVar2;

+  uint uVar3;

+  longlong lVar4;

+  int iVar5;

+  undefined8 uVar6;

+  NTSTATUS NVar7;

+  undefined *puVar8;

+  ulonglong uVar9;

+  longlong lVar10;

+  undefined *puVar11;

+  longlong *plVar12;

+  longlong *plVar13;

+  ulonglong uVar14;

+  ushort uVar15;

+  ushort uVar16;

+  ushort uVar17;

+  uint uVar18;

+  ulonglong uVar19;

+  undefined4 *puVar20;

+  undefined8 uVar21;

+  undefined2 *puVar22;

+  longlong *plVar23;

+  int iVar24;

+  undefined2 *puVar25;

+  short *_Src;

+  uint local_res8;

+  uint local_res10 [2];

+  longlong local_res18;

+  longlong local_res20;

+  ushort *local_58;

+  short *psStack_50;

   

-  *(char *)(in_RAX + -0x77) = *(char *)(in_RAX + -0x77) + (char)param_1;

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

-  halt_baddata();

+  puVar8 = MRxSmbGetCompressionConfigBlock();

+  lVar10 = *(longlong *)(param_1 + 0x48);

+  local_58 = *(ushort **)(lVar10 + 0x80);

+  psStack_50 = *(short **)(lVar10 + 0x88);

+  local_res20 = *(longlong *)(lVar10 + 0x18);

+  lVar4 = *(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188);

+  local_res18 = lVar10;

+  uVar9 = Feature_Servicing_AlternativePort_Dcr__private_IsEnabledDeviceUsageNoInline();

+  if ((int)uVar9 == 0) {

+    puVar1 = (uint *)(lVar10 + 0x50);

+    local_res8 = *puVar1;

+    local_58 = *(ushort **)puVar1;

+    psStack_50 = *(short **)(lVar10 + 0x58);

+    _Src = psStack_50;

+    if ((2 < *(ushort *)puVar1) && (*psStack_50 == 0x5c)) {

+      local_res8 = (uint)(ushort)(*(ushort *)puVar1 - 2);

+      _Src = psStack_50 + 1;

+    }

+  }

+  else {

+    local_res8 = (uint)(ushort)local_58;

+    _Src = psStack_50;

+  }

+  memset((void *)(param_1 + 0x580),0,0x147);

+  *(undefined4 *)(param_1 + 0x580) = 0x424d53fe;

+  *(undefined4 *)(param_1 + 0x5a0) = 0xfeff;

+  *(undefined2 *)(param_1 + 0x584) = 0x40;

+  *(undefined8 *)(param_1 + 0x598) =

+       *(undefined8 *)

+        (*(longlong *)(*(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188) + 0x210) + 0x48);

+  *(undefined2 *)(param_1 + 0x5c0) = 0x24;

+  local_res10[0] = *(uint *)(param_1 + 0x40c);

+  *(undefined1 *)(param_1 + 0x5c6) =

+       *(undefined1 *)(*(longlong *)(*(longlong *)(param_1 + 0x48) + 0x18) + 0x520);

+  *(undefined1 *)(param_1 + 0x5c7) = 0;

+  uVar9 = SubRdrBuildDialectRevisionNegotiateList

+                    (*(longlong *)(*(longlong *)(param_1 + 0x48) + 0x18),param_1 + 0x5e4,

+                     (int *)local_res10);

+  uVar18 = local_res10[0];

+  uVar14 = uVar9 & 0xffffffff;

+  if ((int)uVar9 < 0) {

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

+      return uVar14;

+    }

+    if ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0) {

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

+        WPP_SF_qL(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xc,

+                  &WPP_a1844900ef6138922d2c4a1af9e487cc_Traceguids,param_1);

+        return uVar14;

+      }

+      return uVar14;

+    }

+    return uVar14;

+  }

+  uVar9 = (ulonglong)local_res10[0];

+  uVar21 = 0x734d6d53;

+  lVar10 = ExAllocatePool2(0x42);

+  *(longlong *)(lVar4 + 0x278) = lVar10;

+  if (lVar10 == 0) {

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

+      return 0xc000009a;

+    }

+    if ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0) {

+      if (3 < (byte)WPP_GLOBAL_Control[0x29]) {

+        WPP_SF_P(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xd,

+                 &WPP_a1844900ef6138922d2c4a1af9e487cc_Traceguids,param_1);

+        return 0xc000009a;

+      }

+      return 0xc000009a;

+    }

+    return 0xc000009a;

+  }

+  if (uVar18 != 0) {

+    lVar10 = 0;

+    do {

+      *(undefined2 *)(lVar10 + *(longlong *)(lVar4 + 0x278)) =

+           *(undefined2 *)(param_1 + 0x5e4 + lVar10);

+      uVar9 = uVar9 - 1;

+      lVar10 = lVar10 + 2;

+    } while (uVar9 != 0);

+  }

+  *(uint *)(lVar4 + 0x280) = uVar18;

+  *(short *)(param_1 + 0x5c2) = (short)uVar18;

+  iVar24 = 0;

+  *(ushort *)(param_1 + 0x5c4) = (*(char *)(lVar4 + 0x26f) != '\0') + 1;

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

+      ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) && (3 < (byte)WPP_GLOBAL_Control[0x29])) {

+    WPP_SF_Dl(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),local_res20,uVar21,

+              (uint)*(byte *)(local_res20 + 0x520));

+  }

+  lVar10 = local_res18;

+  uVar16 = 0;

+  uVar9 = 0;

+  uVar21 = *(undefined8 *)(local_res18 + 0x2ac);

+  uVar6 = *(undefined8 *)(local_res18 + 0x2b4);

+  *(undefined4 *)(param_1 + 0x5c8) = 0xff;

+  *(undefined8 *)(param_1 + 0x5cc) = uVar21;

+  *(undefined8 *)(param_1 + 0x5d4) = uVar6;

+  uVar17 = *(ushort *)(*(longlong *)(param_1 + 0x400) + 0x28);

+  if (uVar17 != 0) {

+    do {

+      if (*(int *)(*(longlong *)(param_1 + 0x400) + 0x18 + uVar9 * 4) == 1) goto LAB_0;

+      uVar15 = (short)uVar9 + 1;

+      uVar9 = (ulonglong)uVar15;

+    } while (uVar15 < uVar17);

+  }

+  puVar11 = MRxSmbGetConfigurationBlock();

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

+    *(undefined4 *)(param_1 + 0x5c8) = 0xbf;

+  }

+LAB_0:

+  *(undefined4 *)(lVar10 + 0x2a8) = *(undefined4 *)(param_1 + 0x5c8);

+  puVar11 = MRxSmbGetConfigurationBlock();

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

+    *(uint *)(param_1 + 0x5c8) = *(uint *)(param_1 + 0x5c8) & 0xffffff7f;

+  }

+  iVar5 = (uint)*(ushort *)(param_1 + 0x5c2) * 2;

+  uVar18 = iVar5 + 100;

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

+    uVar3 = iVar5 + 0x6b;

+    if (uVar3 < uVar18) {

+      return 0xc00000e5;

+    }

+    uVar18 = uVar3 & 0xfffffff8;

+  }

+  puVar20 = (undefined4 *)((ulonglong)uVar18 + 0x580 + param_1);

+  puVar20[2] = 0x200001;

+  *(undefined2 *)(puVar20 + 3) = 1;

+  NVar7 = BCryptGenRandom((BCRYPT_ALG_HANDLE)0x0,(PUCHAR)((longlong)puVar20 + 0xe),0x20,2);

+  if (NVar7 < 0) {

+    return 0xc00000e5;

+  }

+  *puVar20 = 0x260001;

+  *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+  *(uint *)(param_1 + 0x5dc) = uVar18;

+  uVar18 = *(ushort *)((longlong)puVar20 + 2) + 8 + uVar18;

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

+    if (uVar18 + 7 < uVar18) {

+      return 0xc00000e5;

+    }

+    uVar18 = uVar18 + 7 & 0xfffffff8;

+  }

+  puVar25 = (undefined2 *)((ulonglong)uVar18 + 0x580 + param_1);

+  sVar2 = *(short *)(*(longlong *)(param_1 + 0x400) + 0x28);

+  puVar25[4] = sVar2;

+  if (sVar2 != 0) {

+    lVar10 = 0x18;

+    puVar22 = puVar25 + 5;

+    do {

+      iVar24 = iVar24 + 1;

+      *puVar22 = *(undefined2 *)(lVar10 + *(longlong *)(param_1 + 0x400));

+      lVar10 = lVar10 + 4;

+      puVar22 = puVar22 + 1;

+    } while (iVar24 < (int)(uint)(ushort)puVar25[4]);

+  }

+  *puVar25 = 2;

+  puVar25[1] = (puVar25[4] + 1) * 2;

+  *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+  uVar18 = (ushort)puVar25[1] + 8 + uVar18;

+  if ((puVar8[0x1a] & 2) == 0) {

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

+      if (uVar18 + 7 < uVar18) {

+        return 0xc00000e5;

+      }

+      uVar18 = uVar18 + 7 & 0xfffffff8;

+    }

+    sVar2 = *(short *)(puVar8 + 0x18);

+    puVar25 = (undefined2 *)((ulonglong)uVar18 + 0x580 + param_1);

+    *(undefined4 *)(puVar25 + 6) = 1;

+    puVar25[4] = sVar2;

+    puVar25[5] = 0;

+    if (sVar2 != 0) {

+      do {

+        uVar9 = (ulonglong)uVar16;

+        uVar16 = uVar16 + 1;

+        puVar25[uVar9 + 8] = *(undefined2 *)(puVar8 + uVar9 * 4);

+      } while (uVar16 < (ushort)puVar25[4]);

+    }

+    *puVar25 = 3;

+    puVar25[1] = (puVar25[4] + 4) * 2;

+    *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+    uVar18 = uVar18 + (ushort)puVar25[1] + 8;

+    *(undefined1 *)(*(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188) + 0x26d) = 1;

+  }

+  else {

+    *(undefined1 *)(*(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188) + 0x26d) = 0;

+  }

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

+    if (uVar18 + 7 < uVar18) {

+      return 0xc00000e5;

+    }

+    uVar18 = uVar18 + 7 & 0xfffffff8;

+  }

+  puVar25 = (undefined2 *)((ulonglong)uVar18 + 0x580 + param_1);

+  puVar8 = MRxSmbGetConfigurationBlock();

+  uVar17 = 0;

+  sVar2 = *(short *)(puVar8 + 0x170);

+  puVar25[4] = sVar2;

+  if (sVar2 != 0) {

+    puVar8 = MRxSmbGetConfigurationBlock();

+    uVar16 = uVar17;

+    do {

+      uVar9 = (ulonglong)uVar16;

+      uVar16 = uVar16 + 1;

+      puVar25[uVar9 + 5] = *(undefined2 *)(puVar8 + uVar9 * 4 + 0x164);

+    } while (uVar16 < (ushort)puVar25[4]);

+  }

+  *puVar25 = 8;

+  puVar25[1] = (puVar25[4] + 1) * 2;

+  *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+  uVar18 = (ushort)puVar25[1] + 8 + uVar18;

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

+    if (uVar18 + 7 < uVar18) {

+      return 0xc00000e5;

+    }

+    uVar18 = uVar18 + 7 & 0xfffffff8;

+  }

+  lVar10 = uVar18 + param_1;

+  memmove((void *)(lVar10 + 0x588),_Src,(ulonglong)(local_res8 & 0xffff));

+  *(short *)(lVar10 + 0x582) = (short)local_res8;

+  *(undefined2 *)(lVar10 + 0x580) = 5;

+  *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+  uVar18 = uVar18 + 8 + (uint)*(ushort *)(lVar10 + 0x582);

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

+    if (uVar18 + 7 < uVar18) {

+      return 0xc00000e5;

+    }

+    uVar18 = uVar18 + 7 & 0xfffffff8;

+  }

+  puVar25 = (undefined2 *)((ulonglong)uVar18 + 0x580 + param_1);

+  *(undefined4 *)(*(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188) + 0x274) = 0;

+  puVar8 = MRxSmbGetConfigurationBlock();

+  sVar2 = *(short *)(puVar8 + 0x17c);

+  puVar25[4] = sVar2;

+  if (sVar2 != 0) {

+    puVar8 = MRxSmbGetConfigurationBlock();

+    do {

+      uVar9 = (ulonglong)uVar17;

+      puVar25[uVar9 + 8] = *(undefined2 *)(puVar8 + uVar9 * 4 + 0x174);

+      lVar10 = *(longlong *)(*(longlong *)(param_1 + 0x60) + 0x188);

+      uVar3 = *(uint *)(lVar10 + 0x274);

+      if ((uVar3 & *(ushort *)(puVar8 + uVar9 * 4 + 0x174)) == 0) {

+        *(uint *)(lVar10 + 0x274) =

+             1 << ((char)*(ushort *)(puVar8 + uVar9 * 4 + 0x174) - 1U & 0x1f) | uVar3;

+      }

+      uVar17 = uVar17 + 1;

+    } while (uVar17 < (ushort)puVar25[4]);

+  }

+  *puVar25 = 7;

+  puVar25[1] = (puVar25[4] + 4) * 2;

+  *(short *)(param_1 + 0x5e0) = *(short *)(param_1 + 0x5e0) + 1;

+  uVar17 = puVar25[1];

+  plVar12 = (longlong *)IoAllocateMdl(param_1 + 0x580,uVar17 + uVar18 + 8,0,0,0);

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

+    return 0xc000009a;

+  }

+  plVar13 = (longlong *)ExAllocatePool2(0x42,0x3a8,0x66426d53);

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

+    uVar19 = 0xc000009a;

+  }

+  else {

+    uVar9 = param_1;

+    plVar23 = plVar12;

+    uVar14 = SmbCseInitializeBufferContextWithMemoryRegistration

+                       ((undefined2 *)plVar13,param_1,plVar12,uVar17 + uVar18 + 8,(undefined8 *)0x0,

+                        0,0,0,0,4);

+    uVar19 = uVar14 & 0xffffffff;

+    if ((int)uVar14 == 0) {

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

+          ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) && (1 < (byte)WPP_GLOBAL_Control[0x29])

+         ) {

+        plVar23 = *(longlong **)(param_1 + 0x60);

+        local_58 = (ushort *)(plVar23[0x31] + 0x1bc);

+        if (*local_58 < 0x23) {

+          uVar17 = (ushort)(byte)(&sockaddr_size)[(uint)*local_58];

+        }

+        else {

+          uVar17 = 0;

+        }

+        psStack_50 = (short *)(ulonglong)uVar17;

+        uVar9 = 0xf;

+        WPP_SF_d_SOCKADDR_DDDDqqqqqLqLqq

+                  (*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xf,plVar23,

+                   (uint)*(byte *)(*(longlong *)(*(longlong *)(param_1 + 0x48) + 0x18) + 0x520),

+                   &local_58);

+      }

+      uVar18 = SmbCseSubmitBufferContext((undefined2 *)plVar13,uVar9,plVar23);

+      uVar19 = (ulonglong)uVar18;

+      plVar12 = (longlong *)0x0;

+      plVar13 = (longlong *)0x0;

+    }

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

+      return uVar19;

+    }

+    if (plVar12 == (longlong *)0x0) goto LAB_1;

+  }

+  IoFreeMdl(plVar12);

+LAB_1:

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

+    ExFreePoolWithTag(plVar13,0);

+    return uVar19;

+  }

+  return uVar19;

 }
```

## `HowToUseWskAndQuic`  (modified)

```diff
--- HowToUseWskAndQuic
+++ HowToUseWskAndQuic
@@ -1,175 +1,240 @@
 

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

 

-int HowToUseWskAndQuic(longlong param_1)

+short HowToUseWskAndQuic(longlong param_1)

 

 {

   code *pcVar1;

-  int unaff_1000012b;

   bool bVar2;

   char cVar3;

   int iVar4;

-  wchar_t *pwVar5;

-  ulonglong uVar6;

-  longlong lVar7;

+  ulonglong uVar5;

+  wchar_t *pwVar6;

+  ulonglong uVar7;

   longlong lVar8;

-  wchar_t wVar9;

+  longlong lVar9;

   ushort uVar10;

   short sVar11;

-  int iVar12;

-  wchar_t *unaff_RBP;

-  undefined *unaff_RSI;

-  wchar_t wVar13;

-  int unaff_EDI;

-  char unaff_R14B;

-  longlong unaff_R15;

-  bool in_SF;

-  undefined1 auStackX_8 [24];

-  short sStack0000000000000040;

+  undefined1 *puVar12;

+  undefined1 *puVar13;

+  short sVar14;

+  short sVar15;

+  undefined1 auStack_2c8 [8];

+  undefined1 auStack_2c0 [24];

+  wchar_t *local_2a8;

+  undefined4 local_2a0;

+  int *local_298;

+  int local_288 [2];

+  int local_280 [14];

+  wchar_t local_248 [264];

+  ulonglong local_38;

   

-  wVar13 = (wchar_t)unaff_EDI;

-  if (in_SF) {

-    if (((WPP_GLOBAL_Control == unaff_RSI) || ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) == 0)) ||

-       (WPP_GLOBAL_Control[0x29] == '\0')) goto LAB_0;

-    WPP_SF_Z(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),10,

-             &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids,unaff_RBP);

-    RfsServerNameCleanup((int *)&stack0x00000048);

+  puVar12 = auStack_2c8;

+  puVar13 = auStack_2c8;

+  local_38 = __security_cookie ^ (ulonglong)auStack_2c8;

+  sVar11 = 0;

+  sVar14 = 0;

+  pwVar6 = (wchar_t *)(param_1 + 0x30);

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

+    if ((pwVar6 == (wchar_t *)0x0) || (*(longlong *)(param_1 + 0x38) == 0)) {

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

+        if (((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0) &&

+           (3 < (byte)WPP_GLOBAL_Control[0x29])) {

+          WPP_SF_(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xc,

+                  &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids);

+        }

+        goto LAB_1;

+      }

+    }

+    else {

+      local_280[0] = 0;

+      local_280[1] = 0;

+      local_280[2] = 0;

+      local_280[3] = 0;

+      local_280[8] = 0;

+      local_280[9] = 0;

+      bVar2 = false;

+      local_280[4] = 0;

+      local_280[5] = 0;

+      local_280[6] = 0;

+      local_280[7] = 0;

+      uVar7 = RfsServerNameInitialize(pwVar6,local_280);

+      if ((int)uVar7 < 0) {

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

+            ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0)) && (WPP_GLOBAL_Control[0x29] != '\0')

+           ) {

+          WPP_SF_Z(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),10,

+                   &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids,pwVar6);

+          RfsServerNameCleanup(local_280);

+          goto LAB_1;

+        }

+      }

+      else {

+        ExAcquirePushLockSharedEx(&DAT_2,0);

+        uVar7 = 0;

+        bVar2 = false;

+        if (DAT_3 != 0) {

+          do {

+            uVar5 = RfsServerNameEqual(local_280,(int *)(DAT_4 + uVar7 * 0x28));

+            if ((char)uVar5 != '\0') {

+              bVar2 = true;

+              break;

+            }

+            uVar10 = (short)uVar7 + 1;

+            uVar7 = (ulonglong)uVar10;

+          } while (uVar10 < DAT_3);

+        }

+        ExReleasePushLockSharedEx(&DAT_2,0);

+      }

+      RfsServerNameCleanup(local_280);

+      if (bVar2) {

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

+            ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) == 0)) ||

+           ((byte)WPP_GLOBAL_Control[0x29] < 4)) goto LAB_5;

+        WPP_SF_Z(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xd,

+                 &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids,pwVar6);

+        bVar2 = false;

+        goto LAB_6;

+      }

 LAB_1:

-    if (((WPP_GLOBAL_Control != unaff_RSI) && ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) &&

-       (3 < (byte)WPP_GLOBAL_Control[0x29])) {

-      WPP_SF_(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xe,

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

+          ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) && (3 < (byte)WPP_GLOBAL_Control[0x29])

+         ) {

+        WPP_SF_(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xe,

+                &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids);

+      }

+    }

+    bVar2 = true;

+  }

+  else {

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

+        ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) && (3 < (byte)WPP_GLOBAL_Control[0x29]))

+    {

+      WPP_SF_(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xb,

               &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids);

     }

-    bVar2 = true;

-  }

-  else {

-    ExAcquirePushLockSharedEx(&DAT_2,0);

-    wVar9 = wVar13;

-    if ((ushort)wVar13 < (ushort)DAT_3) {

+LAB_5:

+    bVar2 = false;

+  }

+LAB_6:

+  if ((*(int **)(param_1 + 0x110) == (int *)0x0) ||

+     (iVar4 = **(int **)(param_1 + 0x110), iVar4 == 0)) {

+    iVar4 = 0;

+    local_288[0] = 0;

+    cVar3 = RtlIsStateSeparationEnabled();

+    sVar15 = sVar14;

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

+      lVar8 = 0x104;

+      pwVar6 = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\MRxSmb\\Parameters";

+      lVar9 = 0x7fff;

       do {

-        uVar6 = RfsServerNameEqual((int *)&stack0x00000048,

-                                   (int *)(DAT_4 + (ulonglong)(ushort)wVar9 * 0x28));

-        if ((char)uVar6 != '\0') {

-          unaff_R14B = '\x01';

+        if (lVar9 == 0) goto LAB_7;

+        if (*pwVar6 == L'\0') {

+          if (lVar8 != 0) goto LAB_7;

           break;

         }

-        wVar9 = wVar9 + L'\x01';

-      } while ((ushort)wVar9 < (ushort)DAT_3);

-    }

-    ExReleasePushLockSharedEx(&DAT_2,0);

-LAB_0:

-    RfsServerNameCleanup((int *)&stack0x00000048);

-    if (unaff_R14B == '\0') goto LAB_1;

-    if (((WPP_GLOBAL_Control == unaff_RSI) || ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) == 0)) ||

-       ((byte)WPP_GLOBAL_Control[0x29] < 4)) {

-      bVar2 = false;

-    }

-    else {

-      WPP_SF_Z(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0xd,

-               &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids,unaff_RBP);

-      bVar2 = false;

-    }

-  }

-  if ((*(int **)(unaff_R15 + 0x110) == (int *)0x0) ||

-     (iVar4 = **(int **)(unaff_R15 + 0x110), iVar4 == 0)) {

-    _sStack0000000000000040 = unaff_EDI;

-    cVar3 = RtlIsStateSeparationEnabled();

-    if (cVar3 == '\0') {

-      lVar7 = 0x104;

-      pwVar5 = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\MRxSmb\\Parameters";

-      lVar8 = 0x7fff;

-      iVar4 = unaff_EDI;

-      do {

-        sVar11 = (short)iVar4;

-        iVar12 = unaff_EDI;

-        if (lVar8 == 0) goto LAB_5;

-        if (*pwVar5 == L'\0') {

-          if (lVar7 != 0) goto LAB_5;

-          break;

-        }

-        *(wchar_t *)(&stack0xfffffffebff9a3e0 + (longlong)pwVar5) = *pwVar5;

+        *(wchar_t *)(&stack0xfffffffebff9a118 + (longlong)pwVar6) = *pwVar6;

+        lVar9 = lVar9 + -1;

+        pwVar6 = pwVar6 + 1;

+        sVar11 = sVar11 + 1;

         lVar8 = lVar8 + -1;

-        pwVar5 = pwVar5 + 1;

-        iVar4 = iVar4 + 1;

-        sVar11 = (short)iVar4;

-        lVar7 = lVar7 + -1;

-      } while (lVar7 != 0);

-      if ((lVar8 != 0) && (*pwVar5 != wVar13)) {

-        iVar12 = -0x7ffffffb;

-      }

-LAB_5:

+      } while (lVar8 != 0);

+      if ((lVar9 != 0) && (*pwVar6 != L'\0')) {

+        iVar4 = -0x7ffffffb;

+      }

+LAB_7:

       uVar10 = sVar11 * 2;

-      if (iVar12 < 0) {

-        if (((WPP_GLOBAL_Control != unaff_RSI) && ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0))

-           && (WPP_GLOBAL_Control[0x29] != '\0')) {

+      if (iVar4 < 0) {

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

+            ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0)) && (WPP_GLOBAL_Control[0x29] != '\0')

+           ) {

                     /* WARNING: Subroutine does not return */

           WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0x23,

-                   &WPP_65a06fd3d0d9398a3ebfdc502299cd24_Traceguids,iVar12);

-        }

-        if (iVar12 < 0) goto LAB_6;

+                   &WPP_65a06fd3d0d9398a3ebfdc502299cd24_Traceguids,iVar4);

+        }

+        if (iVar4 < 0) goto LAB_8;

       }

     }

     else {

+      local_298 = local_288;

+      local_2a8 = local_248;

+      local_2a0 = 0x208;

       iVar4 = RtlGetPersistedStateLocation

                         (L"MRxSmbParameters",0,

                          L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\MRxSmb\\Parameters"

-                         ,0,&stack0x00000080);

+                         ,0);

       if (iVar4 < 0) {

-        if (((WPP_GLOBAL_Control != unaff_RSI) && ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0))

-           && (WPP_GLOBAL_Control[0x29] != '\0')) {

+        puVar13 = auStack_2c8;

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

+            (puVar13 = auStack_2c8, (*(uint *)(WPP_GLOBAL_Control + 0x2c) & 1) != 0)) &&

+           (puVar13 = auStack_2c8, WPP_GLOBAL_Control[0x29] != '\0')) {

                     /* WARNING: Subroutine does not return */

           WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0x22,

                    &WPP_65a06fd3d0d9398a3ebfdc502299cd24_Traceguids,iVar4);

         }

-        goto LAB_6;

-      }

-      uVar10 = sStack0000000000000040 - 2;

-    }

+        goto LAB_8;

+      }

+      uVar10 = (short)local_288[0] - 2;

+    }

+    puVar13 = auStack_2c8;

+    sVar15 = 0;

     if ((ulonglong)uVar10 + 2 < 0x209) {

-      *(wchar_t *)(&stack0x00000080 + uVar10) = wVar13;

-      _sStack0000000000000040 = unaff_1000012b;

-      uVar6 = RfsRegGetDWord(&stack0x00000080,L"HowToUseWskAndQuic",(undefined4 *)&stack0x00000040);

-      if ((-1 < (int)uVar6) && (unaff_EDI = 1, _sStack0000000000000040 != 1)) {

-        if (_sStack0000000000000040 == 2) {

-          unaff_EDI = 2;

+      *(undefined2 *)((longlong)local_248 + (ulonglong)uVar10) = 0;

+      local_288[0] = 0;

+      uVar7 = RfsRegGetDWord(local_248,L"HowToUseWskAndQuic",local_288);

+      puVar13 = auStack_2c8;

+      sVar15 = sVar14;

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

+        if (local_288[0] == 1) {

+          puVar13 = auStack_2c8;

+          sVar15 = 1;

+        }

+        else if (local_288[0] == 2) {

+          puVar13 = auStack_2c8;

+          sVar15 = 2;

         }

         else {

-          unaff_EDI = unaff_1000012b;

-          if (_sStack0000000000000040 == 3) {

-            unaff_EDI = 3;

+          puVar13 = auStack_2c8;

+          sVar15 = 0;

+          if (local_288[0] == 3) {

+            puVar13 = auStack_2c8;

+            sVar15 = 3;

           }

         }

       }

     }

   }

   else {

-    if (((WPP_GLOBAL_Control != unaff_RSI) && ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) &&

-       (3 < (byte)WPP_GLOBAL_Control[0x29])) {

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

+        ((*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) && (3 < (byte)WPP_GLOBAL_Control[0x29]))

+    {

                     /* WARNING: Subroutine does not return */

       WPP_SF_D(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),0x19,

                &WPP_9f06a7aeb4a833c8a494b8c57fb5c1a0_Traceguids,iVar4);

     }

     if (iVar4 == 2) {

-      unaff_EDI = 2;

+      puVar13 = auStack_2c8;

+      sVar15 = 2;

     }

     else {

       if (iVar4 != 1) {

         pcVar1 = (code *)swi(0x2c);

         (*pcVar1)();

-        register0x00000020 = (BADSPACEBASE *)auStackX_8;

-      }

-      unaff_EDI = 1;

-    }

-  }

-LAB_6:

-  iVar4 = unaff_EDI;

+        puVar12 = auStack_2c0;

+      }

+      puVar13 = puVar12;

+      sVar15 = 1;

+    }

+  }

+LAB_8:

+  sVar11 = sVar15;

   if (bVar2) {

-    iVar4 = 1;

-    if (unaff_EDI == 2) {

-      iVar4 = 4;

-    }

-  }

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

-  return iVar4;

+    sVar11 = 1;

+    if (sVar15 == 2) {

+      sVar11 = 4;

+    }

+  }

+  *(undefined8 *)(puVar13 + -8) = 0x14003cc48;

+  return sVar11;

 }
```

## `IsQuicDisabledForServer`  (modified)

```diff
--- IsQuicDisabledForServer
+++ RfsServerNameEqual
@@ -1,16 +1,23 @@
 

-undefined8 IsQuicDisabledForServer(wchar_t *param_1)

+ulonglong RfsServerNameEqual(int *param_1,int *param_2)

 

 {

-  char in_AL;

-  undefined8 uVar1;

-  undefined8 in_RDX;

-  longlong unaff_RBP;

-  undefined *in_R8;

-  uint in_stack_00000080;

+  int iVar1;

+  ulonglong uVar2;

   

-  *(char *)(unaff_RBP + 0x480d75c0) = *(char *)(unaff_RBP + 0x480d75c0) + in_AL;

-  uVar1 = RxCeInitiateConnection((int *)(ulonglong)in_stack_00000080,in_RDX,in_R8);

-  return uVar1;

+  iVar1 = *param_1;

+  uVar2 = 0;

+  if (iVar1 == *param_2) {

+    if (iVar1 == 0) {

+      uVar2 = 1;

+    }

+    else if (iVar1 == 1) {

+      uVar2 = RfspServerNameEqualDnsName((longlong)param_1,(longlong)param_2);

+    }

+    else if (iVar1 == 2) {

+      uVar2 = RfspServerNameEqualSockaddr((longlong)param_1,(longlong)param_2);

+    }

+  }

+  return uVar2;

 }
```
