# CVE-2023-35641 — ipnathlp.dll patch diff

`ipnathlp.dll` 10.0.22621.2506 -> 10.0.22621.2861 (ghidriff).

## `V2DhcpExtractOptionsFromMessage`  (modified)

```diff
--- V2DhcpExtractOptionsFromMessage
+++ V2DhcpExtractOptionsFromMessage
@@ -1,11 +1,321 @@
 

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

+/* unsigned long __cdecl V2DhcpExtractOptionsFromMessage(struct _DHCP_HEADER * __ptr64,unsigned

+   long,struct _DHCP_OPTION __unaligned * __ptr64 * __ptr64 const) */

 

 ulong __cdecl

 V2DhcpExtractOptionsFromMessage(_DHCP_HEADER *param_1,ulong param_2,_DHCP_OPTION **param_3)

 

 {

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

-  halt_baddata();

+  _DHCP_HEADER *p_Var1;

+  _DHCP_HEADER _Var2;

+  bool bVar3;

+  ulong uVar4;

+  undefined2 uVar5;

+  _DHCP_HEADER *p_Var6;

+  undefined4 in_stack_ffffffffffffffcc;

+  

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

+      ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+     (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+    WPP_SF_d(WPP_GLOBAL_Control[2],0x27,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,param_2);

+  }

+  memset(param_3,0,0x40);

+  if (param_2 < 0xec) {

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

+      if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+        WPP_SF_dD(WPP_GLOBAL_Control[2],0x28,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                  param_2);

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x29;

+        goto LAB_0;

+      }

+    }

+    goto LAB_1;

+  }

+  if ((param_2 < 0xf0) || (*(int *)(param_1 + 0xec) != 0x63538263)) {

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

+      if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

+         (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        WPP_SF_(WPP_GLOBAL_Control[2],0x2a,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x2b;

+LAB_2:

+        WPP_SF_D(WPP_GLOBAL_Control[2],uVar5,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,0);

+      }

+    }

+LAB_3:

+    uVar4 = 0;

+  }

+  else {

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

+        ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+       (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+      WPP_SF_(WPP_GLOBAL_Control[2],0x2c,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+    }

+    p_Var1 = param_1 + param_2;

+    p_Var6 = param_1 + 0xf0;

+    while ((p_Var6 < p_Var1 && (*p_Var6 != (_DHCP_HEADER)0xff))) {

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

+                        ((FeatureImpl<__WilFeatureTraits_Feature_2606204221> *)

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

+                          ::__l2::impl);

+      _Var2 = *p_Var6;

+      if (bVar3) {

+        if ((_Var2 != (_DHCP_HEADER)0x0) &&

+           ((p_Var1 < p_Var6 + 2 || (p_Var1 < p_Var6 + (ulonglong)(byte)p_Var6[1] + 2)))) {

+          if ((undefined8 **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) goto LAB_1;

+          if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+            WPP_SF_dD(WPP_GLOBAL_Control[2],0x2d,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                      param_2);

+          }

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0)) ||

+             (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6)) goto LAB_1;

+          uVar5 = 0x2e;

+          goto LAB_0;

+        }

+      }

+      else if (((_Var2 != (_DHCP_HEADER)0x0) && (p_Var1 < p_Var6 + 2)) &&

+              (p_Var1 < p_Var6 + (ulonglong)(byte)p_Var6[1] + 2)) {

+        if ((undefined8 **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) goto LAB_1;

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x2f,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0)) ||

+           (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6)) goto LAB_1;

+        uVar5 = 0x30;

+        goto LAB_0;

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        WPP_SF_dds(WPP_GLOBAL_Control[2],0x31,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                   (uint)(byte)_Var2,CONCAT44(in_stack_ffffffffffffffcc,(uint)(byte)p_Var6[1]),

+                   (char *)(p_Var6 + 2));

+      }

+      _Var2 = *p_Var6;

+      if (_Var2 == (_DHCP_HEADER)0x0) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x32;

+          goto LAB_4;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0xc) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x3e,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x3f;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[6] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x32) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x36,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if ((byte)p_Var6[1] < 4) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x37;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[2] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x35) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x34,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x35;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[1] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x37) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x38,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x39;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[3] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x38) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x3a,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x3b;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[4] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x3d) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x33,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        *param_3 = (_DHCP_OPTION *)p_Var6;

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x51) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x3c,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x3d;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[5] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0xfc) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x40,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x41;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[7] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

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

+               ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+              (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x42;

+LAB_4:

+        WPP_SF_(WPP_GLOBAL_Control[2],uVar5,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+      }

+      if (*p_Var6 == (_DHCP_HEADER)0x0) {

+        p_Var6 = p_Var6 + 1;

+      }

+      else {

+        p_Var6 = p_Var6 + (ulonglong)(byte)p_Var6[1] + 2;

+      }

+    }

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

+        ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+       (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+      WPP_SF_(WPP_GLOBAL_Control[2],0x43,&WPP_5f567eab1655378973d2730ec640837d_Traceguids);

+    }

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

+                      ((FeatureImpl<__WilFeatureTraits_Feature_661620029> *)

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

+                        ::__l2::impl);

+    if (bVar3) {

+      if ((p_Var6 < p_Var1) && (*p_Var6 == (_DHCP_HEADER)0xff)) {

+LAB_5:

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

+           (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0 &&

+            (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))))) {

+          uVar5 = 0x48;

+          goto LAB_2;

+        }

+        goto LAB_3;

+      }

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

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x44,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x45;

+LAB_0:

+          WPP_SF_D(WPP_GLOBAL_Control[2],uVar5,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,0xd)

+          ;

+        }

+      }

+    }

+    else {

+      if (*p_Var6 == (_DHCP_HEADER)0xff) goto LAB_5;

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

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x46,&WPP_5f567eab1655378973d2730ec640837d_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x47;

+          goto LAB_0;

+        }

+      }

+    }

+LAB_1:

+    uVar4 = 0xd;

+  }

+  return uVar4;

 }
```

## `DhcpExtractOptionsFromMessage`  (modified)

```diff
--- DhcpExtractOptionsFromMessage
+++ DhcpExtractOptionsFromMessage
@@ -1,137 +1,321 @@
 

-/* WARNING: Function: _guard_xfg_dispatch_icall_nop replaced with injection: guard_dispatch_icall */

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

-/* WARNING: Exceeded maximum restarts with more pending */

+/* unsigned long __cdecl DhcpExtractOptionsFromMessage(struct _DHCP_HEADER * __ptr64,unsigned

+   long,struct _DHCP_OPTION __unaligned * __ptr64 * __ptr64 const) */

 

 ulong __cdecl

 DhcpExtractOptionsFromMessage(_DHCP_HEADER *param_1,ulong param_2,_DHCP_OPTION **param_3)

 

 {

-  _func_char_ptr *p_Var1;

-  byte bVar2;

-  uint uVar3;

+  _DHCP_HEADER *p_Var1;

+  _DHCP_HEADER _Var2;

+  bool bVar3;

   ulong uVar4;

-  undefined8 uVar5;

-  longlong lVar6;

-  longlong extraout_RAX;

-  uint uVar7;

-  longlong unaff_RBP;

-  undefined8 unaff_RDI;

-  undefined8 unaff_R14;

-  char cVar8;

-  undefined8 unaff_R15;

-  long lStack0000000000000028;

-  undefined4 uStack000000000000002c;

-  int iStack0000000000000030;

-  DWORD DStack0000000000000040;

-  char *pcStack0000000000000058;

-  ulong uStack0000000000000060;

-  int iStack0000000000000064;

-  undefined8 uStack0000000000000068;

-  undefined8 uStack0000000000000070;

-  undefined8 uStack0000000000000078;

-  undefined8 uStack0000000000000080;

+  undefined2 uVar5;

+  _DHCP_HEADER *p_Var6;

+  undefined4 in_stack_ffffffffffffffcc;

   

-  *(short *)(unaff_RBP + 0x3c0) = (short)unaff_R15;

-  cVar8 = (char)unaff_R15;

-  *(char *)(unaff_RBP + -0x40) = cVar8;

-  lStack0000000000000028 = *(long *)param_3;

-  uStack000000000000002c = *(undefined4 *)((longlong)param_3 + 4);

-  iStack0000000000000064 = wil::details::RecordReturn(lStack0000000000000028);

-  uVar3 = (uint)unaff_R15;

-  uVar7 = uVar3;

-  if (*(char *)(param_3 + 1) != cVar8) {

-    uVar7 = uVar3 + 8;

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

+      ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+     (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+    WPP_SF_d(WPP_GLOBAL_Control[2],0x21,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,param_2);

   }

-  LOCK();

-  UNLOCK();

-  iStack0000000000000030 =

-       `void___cdecl_wil::details::LogFailure(void*___ptr64,unsigned_int,char_const*___ptr64,char_const*___ptr64,char_const*___ptr64,void*___ptr64,wil::FailureType,wil::details::ResultStatus_const&___ptr64,unsigned_short_const*___ptr64,bool,unsigned_short*___ptr64,unsigned___int64,char*___ptr64,unsigned___int64,wil::FailureInfo*___ptr64)'

-       ::__l2::s_failureId + 1;

-  `void___cdecl_wil::details::LogFailure(void*___ptr64,unsigned_int,char_const*___ptr64,char_const*___ptr64,char_const*___ptr64,void*___ptr64,wil::FailureType,wil::details::ResultStatus_const&___ptr64,unsigned_short_const*___ptr64,bool,unsigned_short*___ptr64,unsigned___int64,char*___ptr64,unsigned___int64,wil::FailureInfo*___ptr64)'

-  ::__l2::s_failureId =

-       `void___cdecl_wil::details::LogFailure(void*___ptr64,unsigned_int,char_const*___ptr64,char_const*___ptr64,char_const*___ptr64,void*___ptr64,wil::FailureType,wil::details::ResultStatus_const&___ptr64,unsigned_short_const*___ptr64,bool,unsigned_short*___ptr64,unsigned___int64,char*___ptr64,unsigned___int64,wil::FailureInfo*___ptr64)'

-       ::__l2::s_failureId + uVar3 + 1;

-  DStack0000000000000040 = GetCurrentThreadId();

-  pcStack0000000000000058 = "wil";

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

-  p_Var1 = wil::details::g_pfnGetModuleName;

-  *(undefined8 *)(unaff_RBP + -0x58) = unaff_RDI;

-  *(undefined8 *)(unaff_RBP + -0x50) = unaff_R14;

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

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

-  uStack0000000000000068 = 0;

-  uStack0000000000000070 = 0;

-  uStack0000000000000078 = 0;

-  uStack0000000000000080 = 0;

-  uStack0000000000000060 = param_2;

-  if (p_Var1 == (_func_char_ptr *)0x0) {

-    *(undefined8 *)(unaff_RBP + -0x60) = unaff_R15;

+  memset(param_3,0,0x40);

+  if (param_2 < 0xec) {

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

+      if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+        WPP_SF_dD(WPP_GLOBAL_Control[2],0x22,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                  param_2);

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x23;

+        goto LAB_0;

+      }

+    }

+    goto LAB_1;

+  }

+  if ((param_2 < 0xf0) || (*(int *)(param_1 + 0xec) != 0x63538263)) {

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

+      if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

+         (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        WPP_SF_(WPP_GLOBAL_Control[2],0x24,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x25;

+LAB_2:

+        WPP_SF_D(WPP_GLOBAL_Control[2],uVar5,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,0);

+      }

+    }

+LAB_3:

+    uVar4 = 0;

   }

   else {

-    uVar5 = (*p_Var1)();

-    *(undefined8 *)(unaff_RBP + -0x60) = uVar5;

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

+        ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+       (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+      WPP_SF_(WPP_GLOBAL_Control[2],0x26,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+    }

+    p_Var1 = param_1 + param_2;

+    p_Var6 = param_1 + 0xf0;

+    while ((p_Var6 < p_Var1 && (*p_Var6 != (_DHCP_HEADER)0xff))) {

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

+                        ((FeatureImpl<__WilFeatureTraits_Feature_2606204221> *)

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

+                          ::__l2::impl);

+      _Var2 = *p_Var6;

+      if (bVar3) {

+        if ((_Var2 != (_DHCP_HEADER)0x0) &&

+           ((p_Var1 < p_Var6 + 2 || (p_Var1 < p_Var6 + (ulonglong)(byte)p_Var6[1] + 2)))) {

+          if ((undefined8 **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) goto LAB_1;

+          if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+            WPP_SF_dD(WPP_GLOBAL_Control[2],0x27,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                      param_2);

+          }

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0)) ||

+             (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6)) goto LAB_1;

+          uVar5 = 0x28;

+          goto LAB_0;

+        }

+      }

+      else if (((_Var2 != (_DHCP_HEADER)0x0) && (p_Var1 < p_Var6 + 2)) &&

+              (p_Var1 < p_Var6 + (ulonglong)(byte)p_Var6[1] + 2)) {

+        if ((undefined8 **)WPP_GLOBAL_Control == &WPP_GLOBAL_Control) goto LAB_1;

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x29,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0)) ||

+           (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6)) goto LAB_1;

+        uVar5 = 0x2a;

+        goto LAB_0;

+      }

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

+          ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+         (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        WPP_SF_dds(WPP_GLOBAL_Control[2],0x2b,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                   (uint)(byte)_Var2,CONCAT44(in_stack_ffffffffffffffcc,(uint)(byte)p_Var6[1]),

+                   (char *)(p_Var6 + 2));

+      }

+      _Var2 = *p_Var6;

+      if (_Var2 == (_DHCP_HEADER)0x0) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x2c;

+          goto LAB_4;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0xc) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x38,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x39;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[6] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x32) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x30,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if ((byte)p_Var6[1] < 4) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x31;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[2] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x35) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x2e,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x2f;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[1] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x37) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x32,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x33;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[3] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x38) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x34,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x35;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[4] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x3d) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x2d,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        *param_3 = (_DHCP_OPTION *)p_Var6;

+      }

+      else if (_Var2 == (_DHCP_HEADER)0x51) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x36,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x37;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[5] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

+      else if (_Var2 == (_DHCP_HEADER)0xfc) {

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x3a,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+        }

+        if (p_Var6[1] == (_DHCP_HEADER)0x0) {

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

+              ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

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

+            uVar5 = 0x3b;

+            goto LAB_4;

+          }

+        }

+        else {

+          param_3[7] = (_DHCP_OPTION *)p_Var6;

+        }

+      }

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

+               ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+              (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+        uVar5 = 0x3c;

+LAB_4:

+        WPP_SF_(WPP_GLOBAL_Control[2],uVar5,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+      }

+      if (*p_Var6 == (_DHCP_HEADER)0x0) {

+        p_Var6 = p_Var6 + 1;

+      }

+      else {

+        p_Var6 = p_Var6 + (ulonglong)(byte)p_Var6[1] + 2;

+      }

+    }

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

+        ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+       (4 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+      WPP_SF_(WPP_GLOBAL_Control[2],0x3d,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+    }

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

+                      ((FeatureImpl<__WilFeatureTraits_Feature_661620029> *)

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

+                        ::__l2::impl);

+    if (bVar3) {

+      if ((p_Var6 < p_Var1) && (*p_Var6 == (_DHCP_HEADER)0xff)) {

+LAB_5:

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

+           (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0 &&

+            (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))))) {

+          uVar5 = 0x42;

+          goto LAB_2;

+        }

+        goto LAB_3;

+      }

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

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x3e,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x3f;

+LAB_0:

+          WPP_SF_D(WPP_GLOBAL_Control[2],uVar5,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,0xd)

+          ;

+        }

+      }

+    }

+    else {

+      if (*p_Var6 == (_DHCP_HEADER)0xff) goto LAB_5;

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

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

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

+          WPP_SF_dD(WPP_GLOBAL_Control[2],0x40,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,

+                    param_2);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          uVar5 = 0x41;

+          goto LAB_0;

+        }

+      }

+    }

+LAB_1:

+    uVar4 = 0xd;

   }

-  if (wil::details::g_pfnNotifyFailure != (_func_void_FailureInfo_ptr *)0x0) {

-    (*wil::details::g_pfnNotifyFailure)((FailureInfo *)&stack0x00000020);

-  }

-  if (wil::details::g_pfnGetContextAndNotifyFailure !=

-      (_func_void_FailureInfo_ptr_char_ptr___uint64 *)0x0) {

-    (*wil::details::g_pfnGetContextAndNotifyFailure)

-              ((FailureInfo *)&stack0x00000020,(char *)(unaff_RBP + -0x40),0x400);

-  }

-  if (wil::details::g_pfnLoggingCallback != (_func_void_FailureInfo_ptr *)0x0) {

-    (*wil::details::g_pfnLoggingCallback)((FailureInfo *)&stack0x00000020);

-  }

-  if ((wil::details::g_pfnOriginateCallback != (_func_void_FailureInfo_ptr *)0x0) &&

-     ((uVar7 & 2) == 0)) {

-    (*wil::details::g_pfnOriginateCallback)((FailureInfo *)&stack0x00000020);

-  }

-  if ((int)uVar3 <= lStack0000000000000028) {

-                    /* WARNING: Subroutine does not return */

-    wil::details::in1diag3::_FailFastImmediate_Unexpected();

-  }

-  if (wil::g_fIsDebuggerPresent == (bool)cVar8) {

-    if (wil::g_pfnIsDebuggerPresent == (_func_bool *)0x0) {

-      uVar3 = IsDebuggerPresent();

-    }

-    else {

-      bVar2 = (*wil::g_pfnIsDebuggerPresent)();

-      uVar3 = (uint)bVar2;

-    }

-    if (uVar3 != 0) goto LAB_0;

-  }

-  else {

-LAB_0:

-    if ((uVar7 & 2) == 0) {

-      if ((g_pfnResultLoggingCallback != 0) &&

-         (wil::details::g_resultMessageCallbackSet == (bool)cVar8)) {

-        (*(code *)g_pfnResultLoggingCallback)(&stack0x00000020,unaff_RBP + 0x3c0,0x800);

-      }

-      if (*(short *)(unaff_RBP + 0x3c0) == (short)unaff_R15) {

-        wil::GetFailureLogString

-                  ((ushort *)(unaff_RBP + 0x3c0),0x800,(FailureInfo *)&stack0x00000020);

-      }

-      OutputDebugStringW((LPCWSTR)(unaff_RBP + 0x3c0));

-      lVar6 = extraout_RAX;

-      goto LAB_1;

-    }

-  }

-  lVar6 = g_pfnResultLoggingCallback;

-  if ((g_pfnResultLoggingCallback != 0) && (wil::details::g_resultMessageCallbackSet == (bool)cVar8)

-     ) {

-    lVar6 = (*(code *)g_pfnResultLoggingCallback)(&stack0x00000020,0,0);

-  }

-LAB_1:

-  uVar4 = (ulong)lVar6;

-  if ((((uVar7 & 4) != 0) || (wil::g_fBreakOnFailure != (bool)cVar8)) &&

-     (uVar4 = 0, wil::details::g_pfnDebugBreak != (_func_void *)0x0)) {

-    uVar4 = (*wil::details::g_pfnDebugBreak)();

-  }

-  if ((uVar7 & 1) == 0) {

-    return uVar4;

-  }

-                    /* WARNING: Subroutine does not return */

-  wil::details::WilFailFast((FailureInfo *)&stack0x00000020);

+  return uVar4;

 }
```

## `StringCchPrintfW`  (modified)

```diff
--- StringCchPrintfW
+++ StringCchPrintfW
@@ -1,13 +1,26 @@
 

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

+/* long __cdecl StringCchPrintfW(unsigned short * __ptr64,unsigned __int64,unsigned short const *

+   __ptr64,...) */

 

 long __cdecl StringCchPrintfW(ushort *param_1,__uint64 param_2,ushort *param_3,...)

 

 {

-  char *unaff_RDI;

+  HRESULT HVar1;

+  undefined8 in_R9;

+  undefined8 local_res20;

   

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

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

-  halt_baddata();

+  local_res20 = in_R9;

+  HVar1 = StringValidateDestW((STRSAFE_PCNZWCH)param_1,param_2,(size_t)param_3);

+  if (HVar1 < 0) {

+    if (param_2 != 0) {

+      *param_1 = L'\0';

+    }

+  }

+  else {

+    HVar1 = StringVPrintfWorkerW

+                      ((STRSAFE_LPWSTR)param_1,param_2,(size_t *)param_3,(STRSAFE_LPCWSTR)param_3,

+                       (va_list)&local_res20);

+  }

+  return HVar1;

 }
```

## `AppendDomainName`  (modified)

```diff
--- AppendDomainName
+++ AppendDomainName
@@ -1,22 +1,53 @@
 

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

+/* unsigned short __cdecl AppendDomainName(unsigned char * __ptr64,char * __ptr64) */

 

 ushort __cdecl AppendDomainName(uchar *param_1,char *param_2)

 

 {

-  char *in_RAX;

-  longlong unaff_RSI;

-  undefined4 unaff_EDI;

-  char in_R8B;

-  longlong unaff_R15;

+  int iVar1;

+  int iVar2;

+  LPCSTR lpString;

+  ushort uVar3;

+  undefined1 auStack_168 [32];

+  char *local_148 [2];

+  char local_138 [256];

+  ulonglong local_38;

   

-  *in_RAX = *in_RAX + in_R8B;

-  *(undefined8 *)(unaff_RSI + 0x40) = 0;

-  if (((WPP_GLOBAL_Control != unaff_R15) && ((*(byte *)(WPP_GLOBAL_Control + 0x1c) & 0x80) != 0)) &&

-     (5 < *(byte *)(WPP_GLOBAL_Control + 0x19))) {

-    WPP_SF_d(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0xb,

-             &WPP_161e6c7a05fe3e104e24abdf1aa31f24_Traceguids,unaff_EDI);

+  local_38 = __security_cookie ^ (ulonglong)auStack_168;

+  memset(local_138,0,0xff);

+  iVar1 = lstrlenA(param_2);

+  local_148[0] = (char *)0x0;

+  uVar3 = 0;

+  if (iVar1 < 0xff) {

+    StringCchCopyA(local_138,(longlong)(iVar1 + 1),param_2);

   }

-  return (ushort)unaff_EDI;

+  else {

+    StringCchCopyNA(local_138,0xff,param_2,0xfe);

+  }

+  lpString = strtok_s(local_138,".",local_148);

+  wil::details::FeatureImpl<__WilFeatureTraits_Feature_3217980732>::__private_IsEnabled

+            ((FeatureImpl<__WilFeatureTraits_Feature_3217980732> *)

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

+              ::__l2::impl);

+  do {

+    if (lpString == (LPCSTR)0x0) goto LAB_0;

+    iVar1 = lstrlenA(lpString);

+    *param_1 = (uchar)iVar1;

+    iVar1 = lstrlenA(lpString);

+    memcpy(param_1 + 1,lpString,(longlong)iVar1);

+    iVar2 = lstrlenA(lpString);

+    uVar3 = uVar3 + (short)iVar2 + 1;

+    param_1 = param_1 + 1 + iVar1;

+    lpString = strtok_s((char *)0x0,".",local_148);

+  } while (uVar3 < 0xff);

+  uVar3 = 0xfe;

+LAB_0:

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

+      ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0)) &&

+     (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+    WPP_SF_(WPP_GLOBAL_Control[2],0x16,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+  }

+  return uVar3 + 1;

 }
```

## `Dhcpv6AppendInformOptions`  (modified)

```diff
--- Dhcpv6AppendInformOptions
+++ Dhcpv6AppendInformOptions
@@ -1,11 +1,256 @@
 

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

+/* int __cdecl Dhcpv6AppendInformOptions(struct _DHCPv6_OPTION * __ptr64,struct _DHCPv6_OPTION *

+   __ptr64 * __ptr64,unsigned long) */

 

 int __cdecl

 Dhcpv6AppendInformOptions(_DHCPv6_OPTION *param_1,_DHCPv6_OPTION **param_2,ulong param_3)

 

 {

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

-  halt_baddata();

+  _DHCPv6_OPTION *p_Var1;

+  undefined4 uVar2;

+  undefined4 uVar3;

+  undefined4 uVar4;

+  LPVOID pvVar5;

+  bool bVar6;

+  u_short uVar7;

+  ushort hostshort;

+  int iVar8;

+  size_t sVar9;

+  HANDLE pvVar10;

+  char *pcVar11;

+  LPVOID lpMem;

+  undefined8 uVar12;

+  undefined2 uVar13;

+  longlong lVar14;

+  uint uVar15;

+  int iVar16;

+  uint local_res18 [2];

+  

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

+      ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0)) &&

+     (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+    local_res18[0] = param_3;

+    WPP_SF_(WPP_GLOBAL_Control[2],0x17,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+  }

+  p_Var1 = *param_2;

+  lpMem = (LPVOID)0x0;

+  local_res18[0] = 0;

+  iVar16 = 0;

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

+    uVar7 = ntohs(*(u_short *)(p_Var1 + 2));

+    if (0x5d8 < (ulonglong)uVar7 + 4) {

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

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+          WPP_SF_(WPP_GLOBAL_Control[2],0x18,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+        }

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0)) &&

+           (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_(WPP_GLOBAL_Control[2],0x19,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+        }

+      }

+      return 0;

+    }

+    *(undefined2 *)param_1 = *(undefined2 *)p_Var1;

+    *(undefined2 *)(param_1 + 2) = *(undefined2 *)(p_Var1 + 2);

+    memcpy(param_1 + 4,p_Var1 + 4,(ulonglong)uVar7);

+    iVar16 = uVar7 + 4;

+    param_1 = param_1 + (ulonglong)uVar7 + 4;

+  }

+  if ((DnsGlobalInfo == (_IP_DNS_PROXY_GLOBAL_INFO *)0x0) || (DnsICSDomainSuffix == (ushort *)0x0))

+  {

+    pcVar11 = NatQuerySharedConnectionDomainName();

+  }

+  else {

+    EnterCriticalSection(&DnsGlobalInfoLock);

+    sVar9 = wcstombs((char *)0x0,(wchar_t *)DnsICSDomainSuffix,0);

+    uVar15 = (int)sVar9 + 1;

+    pvVar10 = GetProcessHeap();

+    pcVar11 = HeapAlloc(pvVar10,8,(ulonglong)uVar15);

+    if (pcVar11 != (char *)0x0) {

+      wcstombs(pcVar11,(wchar_t *)DnsICSDomainSuffix,(ulonglong)uVar15);

+    }

+    LeaveCriticalSection(&DnsGlobalInfoLock);

+  }

+  if (pcVar11 != (char *)0x0) {

+    bVar6 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_3217980732>::__private_IsEnabled

+                      ((FeatureImpl<__WilFeatureTraits_Feature_3217980732> *)

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

+                        ::__l2::impl);

+    if (bVar6) {

+      iVar8 = lstrlenA(pcVar11);

+      if (0x5d8 < (longlong)(iVar8 + 2 + iVar16) + 4U) {

+        pvVar10 = GetProcessHeap();

+        HeapFree(pvVar10,0,pcVar11);

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

+          return iVar16;

+        }

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+          WPP_SF_(WPP_GLOBAL_Control[2],0x1a,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+        }

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

+          return iVar16;

+        }

+        if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) == 0) {

+          return iVar16;

+        }

+        if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+          return iVar16;

+        }

+        uVar13 = 0x1b;

+        goto LAB_0;

+      }

+    }

+    else {

+      iVar8 = lstrlenA(pcVar11);

+      if (0x5d8 < (longlong)(iVar8 + iVar16) + 4U) {

+        pvVar10 = GetProcessHeap();

+        HeapFree(pvVar10,0,pcVar11);

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

+          return iVar16;

+        }

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+          WPP_SF_(WPP_GLOBAL_Control[2],0x1c,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+        }

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

+          return iVar16;

+        }

+        if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) == 0) {

+          return iVar16;

+        }

+        if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+          return iVar16;

+        }

+        uVar13 = 0x1d;

+        goto LAB_0;

+      }

+    }

+    uVar7 = htons(0x18);

+    *(u_short *)param_1 = uVar7;

+    hostshort = AppendDomainName((uchar *)(param_1 + 4),pcVar11);

+    uVar7 = htons(hostshort);

+    *(u_short *)(param_1 + 2) = uVar7;

+    iVar16 = iVar16 + hostshort + 4;

+    param_1 = param_1 + (ulonglong)hostshort + 4;

+    pvVar10 = GetProcessHeap();

+    HeapFree(pvVar10,0,pcVar11);

+  }

+  iVar8 = GetAdaptersAddresses(0x17,0,0,0,local_res18);

+  uVar15 = local_res18[0];

+  if (iVar8 == 0x6f) {

+    pvVar10 = GetProcessHeap();

+    lpMem = HeapAlloc(pvVar10,8,(ulonglong)uVar15);

+    if (lpMem == (LPVOID)0x0) {

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

+        return iVar16;

+      }

+      if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+        WPP_SF_(WPP_GLOBAL_Control[2],0x1e,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+      }

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

+        return iVar16;

+      }

+      if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) == 0) {

+        return iVar16;

+      }

+      if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+        return iVar16;

+      }

+      uVar13 = 0x1f;

+      goto LAB_0;

+    }

+  }

+  iVar8 = GetAdaptersAddresses(0x17,0,0,lpMem,local_res18);

+  pvVar5 = lpMem;

+  if (iVar8 == 0) {

+    for (; pvVar5 != (LPVOID)0x0; pvVar5 = *(LPVOID *)((longlong)pvVar5 + 8)) {

+      if (*(ulong *)((longlong)pvVar5 + 0x6c) == NhpSharedPrivateLanIndex) {

+        if (iVar16 + 0x14U < 0x5d9) {

+          uVar7 = htons(0x17);

+          *(u_short *)param_1 = uVar7;

+          lVar14 = *(longlong *)((longlong)pvVar5 + 0x18);

+          goto LAB_1;

+        }

+        pvVar10 = GetProcessHeap();

+        HeapFree(pvVar10,0,lpMem);

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

+          return iVar16;

+        }

+        if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+          WPP_SF_(WPP_GLOBAL_Control[2],0x20,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+        }

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

+          return iVar16;

+        }

+        if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) == 0) {

+          return iVar16;

+        }

+        if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+          return iVar16;

+        }

+        uVar13 = 0x21;

+        goto LAB_0;

+      }

+    }

+  }

+LAB_2:

+  pvVar10 = GetProcessHeap();

+  HeapFree(pvVar10,0,lpMem);

+  if ((DAT_3 & 0xffff) + 4 + iVar16 < 0x5d9) {

+    uVar7 = htons(2);

+    *(u_short *)param_1 = uVar7;

+    uVar15 = DAT_3 & 0xffff;

+    uVar7 = htons((u_short)DAT_3);

+    *(u_short *)(param_1 + 2) = uVar7;

+    memcpy(param_1 + 4,DAT_4,(ulonglong)DAT_1800a0098);

+    iVar16 = iVar16 + uVar15 + 4;

+  }

+  else {

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

+      return iVar16;

+    }

+    if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) != 0) &&

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

+      WPP_SF_(WPP_GLOBAL_Control[2],0x22,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+    }

+  }

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

+    return iVar16;

+  }

+  if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 4) == 0) {

+    return iVar16;

+  }

+  if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+    return iVar16;

+  }

+  uVar13 = 0x23;

+LAB_0:

+  WPP_SF_(WPP_GLOBAL_Control[2],uVar13,&WPP_5692087a4b9f32f83332983da9f270da_Traceguids);

+  return iVar16;

+LAB_1:

+  if (lVar14 == 0) goto LAB_2;

+  pcVar11 = (char *)(*(longlong *)(lVar14 + 0x10) + 8);

+  uVar12 = IN6_IS_ADDR_LINKLOCAL(pcVar11);

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

+    uVar2 = *(undefined4 *)(pcVar11 + 4);

+    uVar3 = *(undefined4 *)(pcVar11 + 8);

+    uVar4 = *(undefined4 *)(pcVar11 + 0xc);

+    *(undefined4 *)(param_1 + 4) = *(undefined4 *)pcVar11;

+    *(undefined4 *)(param_1 + 8) = uVar2;

+    *(undefined4 *)(param_1 + 0xc) = uVar3;

+    *(undefined4 *)(param_1 + 0x10) = uVar4;

+    uVar7 = htons(0x10);

+    iVar16 = iVar16 + 0x14;

+    *(u_short *)(param_1 + 2) = uVar7;

+    param_1 = param_1 + 0x14;

+    goto LAB_2;

+  }

+  lVar14 = *(longlong *)(lVar14 + 8);

+  goto LAB_1;

 }
```

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

```diff
--- <lambda_5035b992506f4af81a770c5842624510>::<lambda_invoker_cdecl>
+++ DhcpProcessInformMessage
@@ -1,33 +1,186 @@
 

-/* private: static __cdecl <lambda_5035b992506f4af81a770c5842624510>::<lambda_invoker_cdecl>(struct

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

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

+/* void __cdecl DhcpProcessInformMessage(struct _DHCP_INTERFACE * __ptr64,struct _NH_BUFFER *

+   __ptr64,struct _DHCP_OPTION __unaligned * __ptr64 * __ptr64 const) */

 

 void __cdecl

-<lambda_5035b992506f4af81a770c5842624510>::<lambda_invoker_cdecl>

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

+DhcpProcessInformMessage(_DHCP_INTERFACE *param_1,_NH_BUFFER *param_2,_DHCP_OPTION **param_3)

 

 {

-  PSRWLOCK SRWLock;

-  heap_vector<wil_details_FeatureUsageSRUM> *phVar1;

-  PSRWLOCK local_res10 [3];

+  sockaddr_storage *psVar1;

+  _DHCP_INTERFACE *p_Var2;

+  int iVar3;

+  uint uVar4;

+  undefined8 uVar5;

+  HANDLE hHeap;

+  _NH_BUFFER *_Dst;

+  undefined2 uVar6;

+  ulong uVar7;

+  undefined1 auStackY_78 [32];

+  int local_38 [2];

+  _NH_BUFFER *local_30;

+  ulonglong local_28;

   

-  if (*(char *)param_2 != '\0') {

-    SRWLock = (PSRWLOCK)((longlong)param_2 + 0x28);

-    AcquireSRWLockExclusive(SRWLock);

-    phVar1 = (heap_vector<wil_details_FeatureUsageSRUM> *)((longlong)param_2 + 0xe8);

-    local_res10[0] = SRWLock;

-    if (0xb < (ulonglong)(*(longlong *)((longlong)param_2 + 0xf0) - *(longlong *)phVar1)) {

-      wil_details_WriteSRUMWnfUsageBuffer(phVar1);

-      *(undefined8 *)((longlong)param_2 + 0xf0) = *(undefined8 *)phVar1;

+  local_28 = __security_cookie ^ (ulonglong)auStackY_78;

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

+      ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+     (5 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+    WPP_SF_(WPP_GLOBAL_Control[2],0x5f,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+  }

+  hHeap = GetProcessHeap();

+  _Dst = HeapAlloc(hHeap,8,0x6c0);

+  if (_Dst == (_NH_BUFFER *)0x0) {

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

+      return;

     }

-    *(undefined1 *)((longlong)param_2 + 0x40) = 0;

-    wil::details::

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

-    ::

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

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

-                *)local_res10);

+    if (((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0) &&

+       (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+      WPP_SF_(WPP_GLOBAL_Control[2],0x60,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

+    }

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

+      return;

+    }

+    if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0) {

+      return;

+    }

+    if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+      return;

+    }

+    uVar6 = 0x61;

   }

+  else {

+    memset(_Dst,0,0x6c0);

+    *(undefined4 *)(_Dst + 0xe0) = 0x5dc;

+    psVar1 = (sockaddr_storage *)(_Dst + 0x58);

+    *(undefined8 *)(_Dst + 0x10) = *(undefined8 *)(param_2 + 0x10);

+    uVar4 = 0x60;

+    if (*(short *)(param_2 + 0x58) != 0x17) {

+      uVar4 = 0x5c;

+    }

+    INETADDR_SETSOCKADDR

+              (*(short *)(param_2 + 0x58),(undefined2 *)psVar1,(undefined8 *)(param_2 + uVar4),0,

+               *(undefined2 *)(param_2 + 0x5a));

+    *(undefined8 *)(_Dst + 0x20) = *(undefined8 *)(param_2 + 0x20);

+    *(undefined8 *)(_Dst + 0x28) = *(undefined8 *)(param_2 + 0x28);

+    uVar5 = *(undefined8 *)(param_2 + 0xec);

+    *(undefined8 *)(_Dst + 0xe4) = *(undefined8 *)(param_2 + 0xe4);

+    *(undefined8 *)(_Dst + 0xec) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0xfc);

+    *(undefined8 *)(_Dst + 0xf4) = *(undefined8 *)(param_2 + 0xf4);

+    *(undefined8 *)(_Dst + 0xfc) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x10c);

+    *(undefined8 *)(_Dst + 0x104) = *(undefined8 *)(param_2 + 0x104);

+    *(undefined8 *)(_Dst + 0x10c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x11c);

+    *(undefined8 *)(_Dst + 0x114) = *(undefined8 *)(param_2 + 0x114);

+    *(undefined8 *)(_Dst + 0x11c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 300);

+    *(undefined8 *)(_Dst + 0x124) = *(undefined8 *)(param_2 + 0x124);

+    *(undefined8 *)(_Dst + 300) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x13c);

+    *(undefined8 *)(_Dst + 0x134) = *(undefined8 *)(param_2 + 0x134);

+    *(undefined8 *)(_Dst + 0x13c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x14c);

+    *(undefined8 *)(_Dst + 0x144) = *(undefined8 *)(param_2 + 0x144);

+    *(undefined8 *)(_Dst + 0x14c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x15c);

+    *(undefined8 *)(_Dst + 0x154) = *(undefined8 *)(param_2 + 0x154);

+    *(undefined8 *)(_Dst + 0x15c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x16c);

+    *(undefined8 *)(_Dst + 0x164) = *(undefined8 *)(param_2 + 0x164);

+    *(undefined8 *)(_Dst + 0x16c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x17c);

+    *(undefined8 *)(_Dst + 0x174) = *(undefined8 *)(param_2 + 0x174);

+    *(undefined8 *)(_Dst + 0x17c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x18c);

+    *(undefined8 *)(_Dst + 0x184) = *(undefined8 *)(param_2 + 0x184);

+    *(undefined8 *)(_Dst + 0x18c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x19c);

+    *(undefined8 *)(_Dst + 0x194) = *(undefined8 *)(param_2 + 0x194);

+    *(undefined8 *)(_Dst + 0x19c) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x1ac);

+    *(undefined8 *)(_Dst + 0x1a4) = *(undefined8 *)(param_2 + 0x1a4);

+    *(undefined8 *)(_Dst + 0x1ac) = uVar5;

+    uVar5 = *(undefined8 *)(param_2 + 0x1bc);

+    *(undefined8 *)(_Dst + 0x1b4) = *(undefined8 *)(param_2 + 0x1b4);

+    *(undefined8 *)(_Dst + 0x1bc) = uVar5;

+    *(undefined8 *)(_Dst + 0x1c4) = *(undefined8 *)(param_2 + 0x1c4);

+    *(undefined4 *)(_Dst + 0x1cc) = *(undefined4 *)(param_2 + 0x1cc);

+    if ((_Dst[0xe5] == (_NH_BUFFER)0x18) && (_Dst[0xe6] == (_NH_BUFFER)0x0)) {

+      *(undefined8 *)(_Dst + 0x100) = 0;

+      *(undefined8 *)(_Dst + 0x108) = 0;

+    }

+    _Dst[0xe4] = (_NH_BUFFER)0x2;

+    local_30 = _Dst + 0x1d4;

+    *(undefined4 *)(_Dst + 0xf4) = 0;

+    _Dst[0x110] = (_NH_BUFFER)0x0;

+    _Dst[0x150] = (_NH_BUFFER)0x0;

+    *(undefined2 *)(_Dst + 0xec) = 0;

+    *(undefined4 *)(_Dst + 0x1d0) = 0x63538263;

+    DhcpBuildReplyMessage

+              (param_1,_Dst,(_DHCP_OPTION **)&local_30,'\x05',param_3[5] != (_DHCP_OPTION *)0x0,

+               param_3);

+    EnterCriticalSection(&DhcpInterfaceLock);

+    if (*(int *)(param_1 + 0x4c) < 0) {

+      LeaveCriticalSection(&DhcpInterfaceLock);

+      NhReleaseBuffer(_Dst);

+    }

+    else {

+      LOCK();

+      *(int *)(param_1 + 0x38) = *(int *)(param_1 + 0x38) + 1;

+      UNLOCK();

+      LeaveCriticalSection(&DhcpInterfaceLock);

+      iVar3 = *(int *)(param_2 + 0xfc);

+      local_38[0] = -1;

+      if (iVar3 != 0) {

+        local_38[0] = iVar3;

+      }

+      uVar7 = ((int)local_30 - (int)_Dst) - 0xe4;

+      if (uVar7 < 300) {

+        uVar7 = 300;

+      }

+      INETADDR_SETSOCKADDR

+                (2,(undefined2 *)psVar1,(undefined8 *)local_38,0,

+                 (-(ushort)(iVar3 != 0) & 0xff00) + 0x4400);

+      uVar7 = NhWriteDatagramSocket

+                        (&DhcpComponentReference,*(_NH_RCSOCKET **)(param_2 + 0x10),psVar1,_Dst,

+                         uVar7,DhcpWriteCompletionRoutine,param_1,*(void **)(param_2 + 0x28));

+      if (uVar7 == 0) {

+        LOCK();

+        DAT_0 = DAT_0 + 1;

+        UNLOCK();

+      }

+      else {

+        LOCK();

+        p_Var2 = param_1 + 0x38;

+        iVar3 = *(int *)p_Var2;

+        *(int *)p_Var2 = *(int *)p_Var2 + -1;

+        UNLOCK();

+        if (iVar3 == 1) {

+          DhcpCleanupInterface(param_1);

+        }

+        NhReleaseBuffer(_Dst);

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

+            ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) != 0)) &&

+           (3 < *(byte *)((longlong)WPP_GLOBAL_Control + 0x19))) {

+          WPP_SF_D(WPP_GLOBAL_Control[2],0x62,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids,uVar7

+                  );

+        }

+        NhQueryAddressSocket(*(_NH_RCSOCKET **)(param_2 + 0x10));

+      }

+    }

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

+      return;

+    }

+    if ((*(byte *)((longlong)WPP_GLOBAL_Control + 0x1c) & 2) == 0) {

+      return;

+    }

+    if (*(byte *)((longlong)WPP_GLOBAL_Control + 0x19) < 6) {

+      return;

+    }

+    uVar6 = 99;

+  }

+  WPP_SF_(WPP_GLOBAL_Control[2],uVar6,&WPP_0278211238c3353294d2c9422d0c8165_Traceguids);

   return;

 }
```
