# CVE-2026-88232 — monitor.sys patch diff

`monitor.sys` 10.0.26100.9278 -> 10.0.26100.9818 (ghidriff).

## `FUN_14001195c`  (modified)

```diff
--- FUN_14001195c
+++ wil_details_RegisterFeatureUsageProvider
@@ -1,27 +1,27 @@
 

-void FUN_14001195c(void)

+void wil_details_RegisterFeatureUsageProvider(void)

 

 {

   int iVar1;

   longlong *local_28;

   undefined *local_20;

   undefined8 local_18;

-  undefined4 uStack_10;

-  undefined4 uStack_c;

+  undefined4 local_10;

+  undefined4 local_c;

   

-  uStack_c = 0;

+  local_c = 0;

   g_wil_details_recordFeatureUsage = wil_details_RecordFeatureUsageReporting;

   local_28 = wil_details_FeatureDescriptors_SkipPadding

                        ((longlong *)&Feature_HdrBrightnessPolicy__private_descriptor);

   local_18 = 0;

-  uStack_10 = 1;

+  local_10 = 1;

   local_20 = &wil_details_featureDescriptors_z;

   iVar1 = RtlRegisterFeatureUsageProvider

                     (wil_details_OnFeatureUsageProviderFlushNotification,&local_28,

                      &g_wil_details_featureUsageProvider);

   if (iVar1 != 0) {

     g_wil_details_featureUsageProvider = 0;

   }

   return;

 }
```

## `FUN_1400149d8`  (modified)

```diff
--- FUN_1400149d8
+++ SetNitsBrightness
@@ -1,20 +1,71 @@
 

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

+/* WARNING: Function: _guard_dispatch_icall replaced with injection: guard_dispatch_icall */

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

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

 

-int FUN_1400149d8(undefined8 param_1,int *param_2,int param_3,int *param_4)

+int SetNitsBrightness(undefined8 param_1,int *param_2,int param_3,int *param_4)

 

 {

-  byte *pbVar1;

-  char in_AL;

-  undefined7 in_register_00000001;

-  undefined1 *unaff_RSI;

+  int iVar1;

+  longlong lVar2;

+  ulonglong uVar3;

+  undefined8 uVar4;

+  undefined1 auStack_68 [32];

+  int local_48 [6];

+  ulonglong local_30;

   

-  *(char *)CONCAT71(in_register_00000001,in_AL) =

-       *(char *)CONCAT71(in_register_00000001,in_AL) + in_AL;

-  pbVar1 = (byte *)(CONCAT71(in_register_00000001,in_AL) + -0x75);

-  *pbVar1 = *pbVar1 >> 5 | *pbVar1 << 3;

-  out(*unaff_RSI,(short)param_2);

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

-  halt_baddata();

+  local_30 = __security_cookie ^ (ulonglong)auStack_68;

+  lVar2 = (**(code **)(WdfFunctions_01015 + 0x650))

+                    (WdfDriverGlobals,param_1,PTR__WDF_DEVICE_CONTEXT_TYPE_INFO_14000b018);

+  uVar3 = Feature_HdrBrightnessPolicy__private_IsEnabledDeviceUsageNoInline();

+  if (((int)uVar3 != 0) && (*(char *)(lVar2 + 0x498) != '\0')) {

+    local_48[0] = param_2[1];

+    local_48[1] = 0;

+    local_48[2] = 0;

+    local_48[3] = 0;

+    local_48[4] = 0;

+    iVar1 = IoctlSetSdrWhiteLevel(param_1,local_48);

+    if (iVar1 < 0) {

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

+        return iVar1;

+      }

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

+        return iVar1;

+      }

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

+        return iVar1;

+      }

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

+               &WPP_3be744b3e28337bbfff108c578b0dd01_Traceguids,iVar1);

+      return iVar1;

+    }

+    param_2[1] = 80000;

+  }

+  *param_4 = param_2[1];

+  param_4[3] = 1;

+  param_4[2] = 1;

+  if (param_3 == 0) {

+    uVar4 = *(undefined8 *)(param_2 + 2);

+    *(undefined8 *)(lVar2 + 0x430) = *(undefined8 *)param_2;

+    *(undefined8 *)(lVar2 + 0x438) = uVar4;

+    uVar4 = *(undefined8 *)(param_2 + 6);

+    *(undefined8 *)(lVar2 + 0x440) = *(undefined8 *)(param_2 + 4);

+    *(undefined8 *)(lVar2 + 0x448) = uVar4;

+  }

+  uVar4 = EnforceThermalThrottle(param_1,param_2);

+  param_4[4] = (int)uVar4;

+  param_4[1] = param_2[1];

+  iVar1 = IoctlSetBrightness(param_1,param_2);

+  param_4[5] = iVar1;

+  if (-1 < iVar1) {

+    uVar4 = *(undefined8 *)(param_2 + 2);

+    *(undefined8 *)(lVar2 + 0x408) = *(undefined8 *)param_2;

+    *(undefined8 *)(lVar2 + 0x410) = uVar4;

+    uVar4 = *(undefined8 *)(param_2 + 6);

+    *(undefined8 *)(lVar2 + 0x418) = *(undefined8 *)(param_2 + 4);

+    *(undefined8 *)(lVar2 + 0x420) = uVar4;

+    *(undefined8 *)(lVar2 + 0x428) = _DAT_0;

+  }

+  return iVar1;

 }
```

## `FUN_140011aac`  (modified)

```diff
--- FUN_140011aac
+++ HandleBrightnessIoctlRedirection
@@ -1,13 +1,161 @@
 

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

+/* WARNING: Function: _guard_dispatch_icall replaced with injection: guard_dispatch_icall */

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

 

-uint FUN_140011aac(undefined8 param_1,undefined8 param_2,int param_3,longlong param_4)

+uint HandleBrightnessIoctlRedirection

+               (undefined8 param_1,undefined8 param_2,int param_3,longlong param_4)

 

 {

-  longlong in_RAX;

+  uint uVar1;

+  longlong lVar2;

+  undefined4 *puVar3;

+  undefined8 uVar4;

+  undefined8 uVar6;

+  undefined1 auStack_d8 [32];

+  ulonglong *local_b8;

+  undefined8 *local_a8;

+  ulonglong local_a0;

+  uint local_98 [7];

+  undefined4 uStack_7c;

+  undefined8 uStack_78;

+  undefined8 local_70;

+  undefined8 uStack_68;

+  undefined4 local_60;

+  undefined4 uStack_5c;

+  undefined4 uStack_58;

+  undefined4 uStack_54;

+  undefined4 uStack_50;

+  ulonglong local_48;

+  undefined8 uVar5;

   

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

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

-  halt_baddata();

+  local_48 = __security_cookie ^ (ulonglong)auStack_d8;

+  local_98[4] = 0;

+  local_98[5] = 0;

+  uVar5 = 0;

+  uVar4 = 0;

+  local_a0 = 0;

+  uVar1 = 0xc0000022;

+  local_98[0] = 0;

+  local_98[1] = 0;

+  local_98[2] = 0;

+  local_98[3] = 0;

+  lVar2 = (**(code **)(WdfFunctions_01015 + 0x650))

+                    (WdfDriverGlobals,param_1,PTR__WDF_DEVICE_CONTEXT_TYPE_INFO_14000b018);

+  if (*(char *)(lVar2 + 0x1c0) == '\0') {

+    SetBrightnessTelemetry(local_98,param_4,1,0xc00000bb);

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

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

+    {

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

+              &WPP_6b517b657f953afc40ed43c7ea99af82_Traceguids);

+    }

+    (**(code **)(WdfFunctions_01015 + 0x838))(WdfDriverGlobals,param_2,0xc00000bb);

+    return 0xc00000bb;

+  }

+  if (*(int *)(param_4 + 0x29c) != 3) {

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

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

+    {

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

+              &WPP_6b517b657f953afc40ed43c7ea99af82_Traceguids);

+    }

+LAB_0:

+    uVar1 = ForwardRequestToNextDriver(param_1,param_2);

+    return uVar1;

+  }

+  if (param_3 == 0x230c04) {

+    UpdateReferenceModeBrightnessCache(param_1);

+  }

+  if (*(char *)(param_4 + 0x498) == '\0') goto LAB_0;

+  if (param_3 == 0x230c04) {

+    local_b8 = &local_a0;

+    local_a8 = (undefined8 *)0x0;

+    uVar1 = (**(code **)(WdfFunctions_01015 + 0x870))(WdfDriverGlobals,param_2,0xd0,&local_a8);

+    uVar5 = uVar4;

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

+      if (local_a0 < 0xd0) {

+        uVar1 = 0xc0000023;

+      }

+      else {

+        *(undefined4 *)local_a8 = 3;

+        *(undefined4 *)((longlong)local_a8 + 4) = 1;

+        *(undefined4 *)(local_a8 + 1) = 1;

+        *(undefined4 *)((longlong)local_a8 + 0xc) = 240000;

+        *(undefined4 *)(local_a8 + 2) = 80000;

+        *(undefined4 *)((longlong)local_a8 + 0x14) = 480000;

+        *(undefined4 *)(local_a8 + 3) = 8000;

+        uVar5 = 0xd0;

+      }

+    }

+    goto LAB_1;

+  }

+  if (param_3 == 0x230c08) {

+    local_60 = 0;

+    uStack_5c = 0;

+    uStack_58 = 0;

+    uStack_54 = 0;

+    uStack_50 = 0;

+    uVar1 = IoctlGetSdrWhiteLevel(param_1,&local_60);

+    uVar5 = uVar4;

+    if ((int)uVar1 < 0) goto LAB_1;

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

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

+    {

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

+               &WPP_6b517b657f953afc40ed43c7ea99af82_Traceguids,local_60);

+    }

+    local_a8 = (undefined8 *)0x0;

+    local_b8 = (ulonglong *)0x0;

+    uVar1 = (**(code **)(WdfFunctions_01015 + 0x870))(WdfDriverGlobals,param_2,0xc,&local_a8);

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

+      *(undefined4 *)((longlong)local_a8 + 4) = local_60;

+      *(undefined4 *)(local_a8 + 1) = local_60;

+      uVar5 = 0xc;

+      goto LAB_1;

+    }

+  }

+  else {

+    if (param_3 != 0x230c0c) goto LAB_1;

+    uVar6 = 0x20;

+    local_a8 = (undefined8 *)0x0;

+    uStack_5c = 0;

+    uStack_58 = 0;

+    uStack_54 = 0;

+    uStack_50 = 0;

+    local_b8 = (ulonglong *)0x0;

+    uVar1 = (**(code **)(WdfFunctions_01015 + 0x868))(WdfDriverGlobals,param_2,0x20,&local_a8);

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

+      puVar3 = &local_60;

+      local_60 = *(undefined4 *)((longlong)local_a8 + 4);

+      uVar1 = IoctlSetSdrWhiteLevel(param_1,puVar3);

+      if ((int)uVar1 < 0) {

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

+            (uVar5 = uVar4, (*(uint *)(WPP_GLOBAL_Control + 0x2c) & 4) != 0)) &&

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

+          local_b8 = (ulonglong *)CONCAT44(local_b8._4_4_,uVar1);

+          WPP_SF_dD(*(undefined8 *)(WPP_GLOBAL_Control + 0x18),puVar3,uVar6,local_60);

+        }

+      }

+      else {

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

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

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

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

+                   &WPP_6b517b657f953afc40ed43c7ea99af82_Traceguids,local_60);

+        }

+        uStack_78 = local_a8[1];

+        local_70 = local_a8[2];

+        uStack_68 = local_a8[3];

+        stack0xffffffffffffff80 = CONCAT44(80000,(uint)*local_a8);

+        uVar1 = IoctlSetBrightness(param_1,(int *)(local_98 + 6));

+      }

+      goto LAB_1;

+    }

+  }

+  SetBrightnessTelemetry(local_98,param_4,2,uVar1);

+  uVar5 = uVar4;

+LAB_1:

+  (**(code **)(WdfFunctions_01015 + 0x848))(WdfDriverGlobals,param_2,uVar1,uVar5);

+  return uVar1;

 }
```
