# CVE-2026-113770 — spoolsv.exe patch diff

`spoolsv.exe` 10.0.26100.9711 -> 10.0.26100.9974 (ghidriff).

## `main`  (modified)

```diff
--- main
+++ main
@@ -1,30 +1,92 @@
 

 int __cdecl main(int _Argc,char **_Argv,char **_Env)

 

 {

-  uint unaff_EBX;

-  longlong unaff_RBP;

-  longlong unaff_RSI;

-  char unaff_DIL;

-  int unaff_R12D;

-  int unaff_R14D;

-  UsageIndexProperty *unaff_R15;

+  bool bVar1;

+  int iVar2;

+  DWORD DVar3;

+  UINT UVar4;

+  BOOL BVar5;

+  undefined8 uVar6;

+  char *pcVar7;

   

-  wil::details_abi::UsageIndexProperty::UpdateCount(unaff_R15,unaff_EBX);

-  if (unaff_R12D != 0) {

-    return unaff_R14D;

-  }

-  if (*(char *)(unaff_RBP + -0x1e) == unaff_DIL) {

-    if (*(char *)(unaff_RSI + 0x38) == unaff_DIL) goto LAB_0;

+  pcVar7 = (char *)0x0;

+  HeapSetInformation((HANDLE)0x0,HeapEnableTerminationOnCorruption,(PVOID)0x0,0);

+  iVar2 = IsWindowsProtectedPrintEnabled();

+  if (iVar2 == 0) {

+    EnableMitigationsCompat();

   }

   else {

-    wil::details_abi::UsageIndexProperty::UpdateCount

-              ((UsageIndexProperty *)(unaff_RBP + -0x20),

-               *(int *)(unaff_RBP + -0x1c) + *(int *)(unaff_RBP + 0x58));

+    uVar6 = EnableMitigationsLockedDown();

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

+      bVar1 = wil::details::

+              FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>::

+              __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>

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

+                                      ::__l2::impl);

+      if (bVar1) {

+        DVar3 = GetLastError();

+        SpoolerServiceTelemetry::WriteDbgTraceError

+                  ("EnableMitigations",(ushort *)L"Failed to enable mitigations! Error: %d",

+                   (ulonglong)DVar3);

+        ResetWindowsProtectedPrintConfigurationForError();

+                    /* WARNING: Subroutine does not return */

+        ExitProcess(0xffffffff);

+      }

+      goto LAB_0;

+    }

   }

-  unaff_DIL = '\x01';

+  UVar4 = GetErrorMode();

+  SetErrorMode(UVar4 | 4);

+  iVar2 = IsWindowsProtectedPrintEnabled();

+  g_bWindowsProtectedPrintEnabled = iVar2 != 0;

+  iVar2 = IsWindowsProtectedPrintSpoolerWorkerEnabled();

+  g_bWindowsProtectedPrintSpoolerWorkerEnabled = iVar2 != 0;

+  bVar1 = wil::details::

+          FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::

+          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>

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

+                                  ::__l2::impl);

+  if ((bVar1) && (g_bWindowsProtectedPrintEnabled == false)) {

+    CheckAndEnableWindowsProtectedPrintForWnc();

+  }

+  if (g_bWindowsProtectedPrintSpoolerWorkerEnabled == false) {

+    if ((g_bWindowsProtectedPrintEnabled != false) &&

+       (iVar2 = GrantPrintBrokerProcessAccess(), iVar2 == 0)) {

+      SpoolerServiceTelemetry::WriteDbgTraceError

+                ("main",(ushort *)

+                        L"Failed to give print broker access to the spooler process object");

+                    /* WARNING: Subroutine does not return */

+      ExitProcess(0);

+    }

+  }

+  else {

+    iVar2 = FindArgument(_Argc,(uchar **)_Argv,pcVar7);

+    if (iVar2 != -1) {

+      g_bSpoolerIsChildProcess = true;

+      SpoolerServiceTelemetry::WriteDbgTraceInfo

+                ("main",(ushort *)L"Spooler child process starting...");

+      SPOOLER_main(0,(ushort **)0x0);

+      goto LAB_0;

+    }

+    g_bSpoolerIsChildProcess = false;

+    PTR_SPOOLER_main_1400d3018 = Spooler_WindowsProtectedPrintMain;

+  }

+  BVar5 = StartServiceCtrlDispatcherW((SERVICE_TABLE_ENTRYW *)&SpoolerServiceDispatchTable);

+  if (BVar5 == 0) {

+    DVar3 = GetLastError();

+    SpoolerServiceTelemetry::WriteDbgTraceError

+              ("main",(ushort *)L"Failed to start control dispatcher. Error %d",(ulonglong)DVar3);

+  }

+  if ((g_hPowerSettingNotification != (void *)0x0) &&

+     (BVar5 = UnregisterPowerSettingNotification(g_hPowerSettingNotification), BVar5 == 0)) {

+    DVar3 = GetLastError();

+    SpoolerServiceTelemetry::WriteDbgTraceError

+              ("main",(ushort *)L"UnregisterPowerSettingNotification failed. Error %d",

+               (ulonglong)DVar3);

+  }

 LAB_0:

-  *(char *)(unaff_RSI + 0x38) = unaff_DIL;

-  return 0;

+                    /* WARNING: Subroutine does not return */

+  ExitProcess(0);

 }
```

## `PublishWppConfigurationNotification`  (modified)

```diff
--- PublishWppConfigurationNotification
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>::__private_IsEnabled
@@ -1,30 +1,19 @@
 

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

+/* public: bool __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>::__private_IsEnabled(enum

+   wil::ReportingKind) __ptr64 */

 

-void PublishWppConfigurationNotification(undefined4 param_1,undefined4 param_2)

+bool __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>::

+__private_IsEnabled(FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave1>

+                    *this,ReportingKind param_1)

 

 {

-  uint uVar1;

-  undefined1 auStack_58 [32];

-  undefined8 local_38;

-  undefined4 local_28;

-  undefined4 local_24;

-  undefined4 local_20;

-  undefined4 local_1c;

-  ulonglong local_18;

+  __uint64 in_R9;

+  undefined1 local_res18;

   

-  local_18 = __security_cookie ^ (ulonglong)auStack_58;

-  local_1c = 0;

-  local_28 = 0;

-  local_38 = 0;

-  local_24 = param_1;

-  local_20 = param_2;

-  uVar1 = RtlPublishWnfStateData(0x2881c3da3bc1075,0,&local_28,0x10);

-  if ((int)uVar1 < 0) {

-    SpoolerServiceTelemetry::WriteDbgTraceError

-              ("PublishWppConfigurationNotification",

-               (ushort *)L"RtlPublishWnfStateData failed with 0x%x",(ulonglong)uVar1);

-  }

-  return;

+  GetCachedFeatureEnabledState(this);

+  ReportUsage(this,(bool)(local_res18 & 1),0,in_R9);

+  return (bool)(local_res18 & 1);

 }
```

## `ResetWindowsProtectedPrintConfigurationForError`  (modified)

```diff
--- ResetWindowsProtectedPrintConfigurationForError
+++ ResetWindowsProtectedPrintConfigurationForError
@@ -1,11 +1,67 @@
+

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

+/* void __cdecl ResetWindowsProtectedPrintConfigurationForError(void) */

 

 void __cdecl ResetWindowsProtectedPrintConfigurationForError(void)

 

 {

-  code *pcVar1;

+  bool bVar1;

+  WindowsProtectedPrintConfigurationSource WVar2;

+  WindowsProtectedPrintConfigurationState WVar3;

+  uint uVar4;

+  undefined7 extraout_var;

+  wchar_t *pwVar5;

+  undefined1 auStackY_58 [32];

+  undefined4 local_28 [2];

+  undefined4 local_20;

+  WindowsProtectedPrintConfigurationState local_1c;

+  WindowsProtectedPrintConfigurationSource local_18;

+  undefined4 local_14;

+  ulonglong local_10;

   

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

-  (*pcVar1)();

+  local_10 = __security_cookie ^ (ulonglong)auStackY_58;

+  bVar1 = wil::details::

+          FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::

+          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>

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

+                                  ::__l2::impl);

+  if (bVar1) {

+    WVar2 = PrintCore::WindowsProtectedPrintHelpers::GetWindowsProtectedPrintConfigurationSource();

+    WVar3 = GetUpdatedConfigurationStateForSource(WVar2);

+    PublishWppConfigurationNotification(WVar3,WVar2);

+    bVar1 = IsWncEdition();

+    if ((int)CONCAT71(extraout_var,bVar1) == 0) {

+      return;

+    }

+    if (WVar3 != 0) {

+      return;

+    }

+    SpoolerServiceTelemetry::WriteDbgTraceInfo

+              ("ResetWindowsProtectedPrintConfigurationForError",

+               (ushort *)L"Setting WPP ConfigurationFailed flag on WNC after max reset attempts");

+    local_28[0] = 1;

+    uVar4 = RegSetKeyValueW((HKEY)0xffffffff80000002,

+                            L"Software\\Policies\\Microsoft\\Windows NT\\Printers\\WPP",

+                            L"ConfigurationFailed",4,local_28,4);

+    if (uVar4 == 0) {

+      return;

+    }

+    pwVar5 = L"Failed to set WPP ConfigurationFailed flag. Error %d";

+  }

+  else {

+    WVar2 = PrintCore::WindowsProtectedPrintHelpers::GetWindowsProtectedPrintConfigurationSource();

+    local_14 = 0;

+    local_20 = 0;

+    local_1c = GetUpdatedConfigurationStateForSource(WVar2);

+    local_18 = WVar2;

+    uVar4 = RtlPublishWnfStateData(0x2881c3da3bc1075,0,&local_20,0x10);

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

+      return;

+    }

+    pwVar5 = L"RtlPublishWnfStateData failed with 0x%x";

+  }

+  SpoolerServiceTelemetry::WriteDbgTraceError

+            ("ResetWindowsProtectedPrintConfigurationForError",(ushort *)pwVar5,(ulonglong)uVar4);

   return;

 }
```

## `ResetWindowsProtectedPrintConfigurationForError`  (modified)

```diff
--- ResetWindowsProtectedPrintConfigurationForError
+++ wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::__private_IsEnabled
@@ -1,67 +1,20 @@
 

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

-/* void __cdecl ResetWindowsProtectedPrintConfigurationForError(void) */

+/* public: bool __cdecl wil::details::FeatureImpl<struct

+   __WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::__private_IsEnabled(void)

+   __ptr64 */

 

-void __cdecl ResetWindowsProtectedPrintConfigurationForError(void)

+bool __thiscall

+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::

+__private_IsEnabled(FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>

+                    *this)

 

 {

-  bool bVar1;

-  WindowsProtectedPrintConfigurationSource WVar2;

-  WindowsProtectedPrintConfigurationState WVar3;

-  uint uVar4;

-  undefined7 extraout_var;

-  wchar_t *pwVar5;

-  undefined1 auStackY_58 [32];

-  undefined4 local_28 [2];

-  undefined4 local_20;

-  WindowsProtectedPrintConfigurationState local_1c;

-  WindowsProtectedPrintConfigurationSource local_18;

-  undefined4 local_14;

-  ulonglong local_10;

+  ReportingKind in_R8D;

+  __uint64 in_R9;

+  undefined1 local_res10;

   

-  local_10 = __security_cookie ^ (ulonglong)auStackY_58;

-  bVar1 = wil::details::

-          FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::

-          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>

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

-                                  ::__l2::impl);

-  if (bVar1) {

-    WVar2 = PrintCore::WindowsProtectedPrintHelpers::GetWindowsProtectedPrintConfigurationSource();

-    WVar3 = GetUpdatedConfigurationStateForSource(WVar2);

-    PublishWppConfigurationNotification(WVar3,WVar2);

-    bVar1 = IsWncEdition();

-    if ((int)CONCAT71(extraout_var,bVar1) == 0) {

-      return;

-    }

-    if (WVar3 != 0) {

-      return;

-    }

-    SpoolerServiceTelemetry::WriteDbgTraceInfo

-              ("ResetWindowsProtectedPrintConfigurationForError",

-               (ushort *)L"Setting WPP ConfigurationFailed flag on WNC after max reset attempts");

-    local_28[0] = 1;

-    uVar4 = RegSetKeyValueW((HKEY)0xffffffff80000002,

-                            L"Software\\Policies\\Microsoft\\Windows NT\\Printers\\WPP",

-                            L"ConfigurationFailed",4,local_28,4);

-    if (uVar4 == 0) {

-      return;

-    }

-    pwVar5 = L"Failed to set WPP ConfigurationFailed flag. Error %d";

-  }

-  else {

-    WVar2 = PrintCore::WindowsProtectedPrintHelpers::GetWindowsProtectedPrintConfigurationSource();

-    local_14 = 0;

-    local_20 = 0;

-    local_1c = GetUpdatedConfigurationStateForSource(WVar2);

-    local_18 = WVar2;

-    uVar4 = RtlPublishWnfStateData(0x2881c3da3bc1075,0,&local_20,0x10);

-    if (-1 < (int)uVar4) {

-      return;

-    }

-    pwVar5 = L"RtlPublishWnfStateData failed with 0x%x";

-  }

-  SpoolerServiceTelemetry::WriteDbgTraceError

-            ("ResetWindowsProtectedPrintConfigurationForError",(ushort *)pwVar5,(ulonglong)uVar4);

-  return;

+  GetCachedFeatureEnabledState(this);

+  ReportUsage(this,(bool)(local_res10 & 1),in_R8D,in_R9);

+  return (bool)(local_res10 & 1);

 }
```

## `PrvDllFreeSplStr`  (modified)

```diff
--- PrvDllFreeSplStr calling
+++ PrvDllFreeSplStr calling
@@ -9,0 +10 @@
+ResolvePrinterNameToFqdn
```

## `sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy`  (modified)

```diff
--- sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy
+++ sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy
@@ -1,2 +1,46 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: void __cdecl sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy(void)

+   __ptr64 */

+

+void __thiscall

+sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy(SandboxManagerUtil *this)

+

+{

+  LSTATUS LVar1;

+  undefined4 uVar2;

+  wchar_t *pwVar3;

+  int local_res8 [2];

+  DWORD local_res10 [2];

+  DWORD local_res18 [2];

+  HKEY local_res20;

+  

+  uVar2 = 0;

+  local_res20 = (HKEY)0x0;

+  LVar1 = RegOpenKeyExW((HKEY)0xffffffff80000002,

+                        L"Software\\Policies\\Microsoft\\Windows NT\\Printers",0,0x20019,

+                        &local_res20);

+  if (LVar1 == 0) {

+    local_res8[0] = 0;

+    local_res18[0] = 0;

+    local_res10[0] = 4;

+    LVar1 = RegQueryValueExW(local_res20,L"PrintDriverIsolationExecutionPolicy",(LPDWORD)0x0,

+                             local_res18,(LPBYTE)local_res8,local_res10);

+    if ((LVar1 != 0) || (local_res8[0] != 0)) {

+      uVar2 = 1;

+    }

+    *(undefined4 *)(this + 0x4c) = uVar2;

+    RegCloseKey(local_res20);

+  }

+  else {

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

+  }

+  pwVar3 = L"kExecuteInSandbox";

+  if (*(int *)(this + 0x4c) != 1) {

+    pwVar3 = L"kExecuteInProc";

+  }

+  SandboxTelemetry::WriteDbgTraceInfo

+            ("sandbox::SandboxManagerUtil::RefreshSpoolerPluginExecutionPolicy",

+             (ushort *)L"Plugin execution policy is %ws",pwVar3);

+  return;

+}

+
```

## `sandbox::IsV4PrinterDriver`  (modified)

```diff
--- sandbox::IsV4PrinterDriver
+++ sandbox::IsV4PrinterDriver
@@ -1,2 +1,31 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::IsV4PrinterDriver : Error: Decompile error: 
-Low-level Error: findByName unimplemented+

+/* bool __cdecl sandbox::IsV4PrinterDriver(unsigned short const * __ptr64) */

+

+bool __cdecl sandbox::IsV4PrinterDriver(ushort *param_1)

+

+{

+  LSTATUS LVar1;

+  bool bVar2;

+  HKEY local_res10;

+  HKEY local_res18 [2];

+  

+  bVar2 = false;

+  local_res10 = (HKEY)0x0;

+  LVar1 = RegOpenKeyExW((HKEY)0xffffffff80000002,

+                        L"SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows x64\\Drivers\\Version-4"

+                        ,0,0x20019,&local_res10);

+  if (LVar1 == 0) {

+    local_res18[0] = (HKEY)0x0;

+    LVar1 = RegOpenKeyExW(local_res10,(LPCWSTR)param_1,0,0x20019,local_res18);

+    bVar2 = LVar1 == 0;

+    if (bVar2) {

+      RegCloseKey(local_res18[0]);

+    }

+    RegCloseKey(local_res10);

+  }

+  SandboxTelemetry::WriteDbgTraceError

+            ("sandbox::IsV4PrinterDriver",(ushort *)L"Printer driver %ws is v4 %u",param_1,

+             (ulonglong)bVar2);

+  return bVar2;

+}

+
```

## `TConnection::Add`  (modified)

```diff
--- TConnection::Add
+++ TConnection::Add
@@ -1,2 +1,115 @@
-Failed to decompile spoolsv.exe - .ProgramDB TConnection::Add : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* public: long __cdecl TConnection::Add(enum TConnection::EConnectionType,enum

+   TConnection::EConnectionType) __ptr64 */

+

+long __thiscall TConnection::Add(TConnection *this,EConnectionType param_1,EConnectionType param_2)

+

+{

+  TString *this_00;

+  bool bVar1;

+  int iVar2;

+  long lVar3;

+  undefined8 uVar4;

+  FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+  *this_01;

+  ushort **ppuVar5;

+  ulong uVar6;

+  TString *in_R9;

+  ushort **local_res8 [2];

+  undefined4 local_res18 [2];

+  ushort **local_res20;

+  ulong local_98 [4];

+  TString local_88 [24];

+  code *local_70;

+  

+  this_00 = (TString *)(this + 0x30);

+  PrvSpoolssTelemetry::WriteDbgTraceInfo

+            ("TConnection::Add",(ushort *)L"Adding connection \'%ws\'.",*(undefined8 *)this_00);

+  local_98[0] = 0;

+  ppuVar5 = &NCoreLibrary::TString::gszNullState;

+  local_res20 = &NCoreLibrary::TString::gszNullState;

+  local_98[2] = 0;

+  local_98[3] = 0;

+  local_98[1] = 0;

+  uVar4 = 0x50;

+  memset(local_88,0,0x50);

+  local_res18[0] = 0;

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

+             ::__l2::impl;

+  bVar1 = wil::details::

+          FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>::

+          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

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

+                                  ::__l2::impl);

+  if ((bVar1) && (param_2 < 2)) {

+    iVar2 = GetDnsOnWirePolicy();

+    if (iVar2 != 0) {

+      this_01 = *(FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                  **)this_00;

+      local_res8[0] = &NCoreLibrary::TString::gszNullState;

+      lVar3 = ResolvePrinterNameToFqdn((TString *)this_01,(TString *)local_res8,uVar4,in_R9);

+      if (-1 < lVar3) {

+        this_01 = (FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                   *)this_00;

+        NCoreLibrary::TString::Update(this_00,(ushort *)local_res8[0]);

+      }

+      NCoreLibrary::TString::vFree((TString *)this_01,local_res8[0]);

+    }

+  }

+  if (param_2 == 0) {

+    uVar6 = 1;

+LAB_0:

+    if (param_1 == 0) {

+      this_01 = *(FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                  **)this_00;

+      lVar3 = NUtilityLibrary::PrintCrackName

+                        ((ushort *)this_01,(TString *)&local_res20,(TString *)0x0,in_R9);

+      ppuVar5 = local_res20;

+      if (-1 < lVar3) {

+        this_01 = *(FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                    **)this_00;

+        lVar3 = InternalAddPerMachineConnection

+                          ((ushort *)this_01,(ushort *)local_res20,(ushort *)0x0,uVar6,0);

+      }

+      goto LAB_1;

+    }

+    if (param_1 == 1) {

+      this_01 = *(FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                  **)this_00;

+      local_98[0] = uVar6;

+      lVar3 = InternalAddPrinterConnection2((ushort *)this_01,1,local_98,(TString *)(this + 0x40));

+      if (-1 < lVar3) {

+        this_01 = (FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                   *)local_88;

+        uVar4 = PrvSplInitializeWinSpoolDrv((undefined8 *)this_01);

+        if ((int)uVar4 != 0) {

+          this_01 = *(FeatureImpl<struct___WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>

+                      **)this_00;

+          (*local_70)(this_01,9,0,0,local_res18);

+        }

+      }

+      goto LAB_1;

+    }

+  }

+  else {

+    if (param_2 == 1) {

+      uVar6 = 2;

+      goto LAB_0;

+    }

+    if (param_2 == 2) {

+      uVar6 = 4;

+      goto LAB_0;

+    }

+    if (param_2 == 3) {

+      uVar6 = 0x80000000;

+      goto LAB_0;

+    }

+  }

+  lVar3 = -0x7ff8ffa9;

+LAB_1:

+  NCoreLibrary::TString::vFree((TString *)this_01,ppuVar5);

+  return lVar3;

+}

+
```

## `sandbox::RevertToProcessSelf::~RevertToProcessSelf`  (modified)

```diff
--- sandbox::RevertToProcessSelf::~RevertToProcessSelf
+++ sandbox::RevertToProcessSelf::~RevertToProcessSelf
@@ -1,2 +1,29 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::RevertToProcessSelf::~RevertToProcessSelf : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: __cdecl sandbox::RevertToProcessSelf::~RevertToProcessSelf(void) __ptr64 */

+

+void __thiscall sandbox::RevertToProcessSelf::~RevertToProcessSelf(RevertToProcessSelf *this)

+

+{

+  HANDLE Token;

+  BOOL BVar1;

+  uint uVar2;

+  

+  Token = *(HANDLE *)this;

+  if ((Token != (HANDLE)0xffffffffffffffff) && (Token != (HANDLE)0x0)) {

+    BVar1 = SetThreadToken((PHANDLE)0x0,Token);

+    if (BVar1 == 0) {

+      uVar2 = NCoreLibrary::GetLastErrorAsHResult();

+      SandboxTelemetry::WriteDbgTraceError

+                ("sandbox::RevertToProcessSelf::~RevertToProcessSelf",

+                 (ushort *)L"SetThreadToken failed. Error hr = 0x%x",(ulonglong)uVar2);

+                    /* WARNING: Subroutine does not return */

+      ExitProcess(1);

+    }

+  }

+  NCoreLibrary::

+  TGenericSP<void*___ptr64,NCoreLibrary::TAutoHandleNT,void*___ptr64,-1,void*___ptr64_const*___ptr64>

+  ::Reset((TGenericSP<void*___ptr64,NCoreLibrary::TAutoHandleNT,void*___ptr64,_1,void*___ptr64_const*___ptr64>

+           *)this);

+  return;

+}

+
```

## `sandbox::SandboxManagerUtil::GetDriverInfoHelper`  (modified)

```diff
--- sandbox::SandboxManagerUtil::GetDriverInfoHelper
+++ sandbox::SandboxManagerUtil::GetDriverInfoHelper
@@ -1,2 +1,111 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::SandboxManagerUtil::GetDriverInfoHelper : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: unsigned char * __ptr64 __cdecl

+   sandbox::SandboxManagerUtil::GetDriverInfoHelper(unsigned short const * __ptr64) __ptr64 */

+

+uchar * __thiscall

+sandbox::SandboxManagerUtil::GetDriverInfoHelper(SandboxManagerUtil *this,ushort *param_1)

+

+{

+  long lVar1;

+  int iVar2;

+  int iVar3;

+  DWORD DVar4;

+  wchar_t *pwVar5;

+  ulonglong uVar6;

+  uchar *puVar7;

+  uchar *puVar8;

+  SandboxManagerUtil *local_res8;

+  undefined4 local_res10 [2];

+  undefined4 local_res18 [2];

+  uchar *local_res20;

+  int *local_38;

+  wchar_t *local_30 [2];

+  

+  local_res8 = this;

+  pwVar5 = operator_new__(4000);

+  local_30[0] = (wchar_t *)0x0;

+  NCoreLibrary::

+  TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+  ::Reset((TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+           *)local_30);

+  local_38 = (int *)0x0;

+  puVar7 = (uchar *)0x0;

+  local_res8 = (SandboxManagerUtil *)((ulonglong)local_res8 & 0xffffffff00000000);

+  local_res20 = (uchar *)0x0;

+  local_30[0] = pwVar5;

+  if (param_1 == (ushort *)0x0) goto LAB_0;

+  puVar8 = (uchar *)0x0;

+  if (pwVar5 == (wchar_t *)0x0) goto LAB_1;

+  lVar1 = StringCchCopyW((ushort *)pwVar5,2000,param_1);

+  if (-1 < lVar1) {

+    lVar1 = StringCchCatW((ushort *)pwVar5,2000,(ushort *)L", LocalOnly");

+    if (-1 < lVar1) {

+      iVar2 = PrvOpenPrinter2W(pwVar5,&local_38,(_PRINTER_DEFAULTSW *)0x0,(uint *)0x0);

+      iVar3 = 0;

+      if (iVar2 == 0) {

+LAB_2:

+        DVar4 = GetLastError();

+        if (DVar4 != 0x7a) goto LAB_3;

+        puVar7 = operator_new__((ulonglong)local_res8 & 0xffffffff);

+        NCoreLibrary::TAutoPtrArray<unsigned_char>::operator=

+                  ((TAutoPtrArray<unsigned_char> *)&local_res20,puVar7);

+        puVar7 = local_res20;

+        if (local_res20 != (uchar *)0x0) {

+          iVar3 = 1;

+        }

+      }

+      else {

+        local_res18[0] = 0;

+        local_res10[0] = 0;

+        uVar6 = PrvGetPrinterDriverExW

+                          (local_38,(wchar_t *)0x0,8,0,0,&local_res8,0xffffffff,0xffffffff,

+                           local_res18,local_res10);

+        iVar3 = (int)uVar6;

+        if (iVar3 == 0) goto LAB_2;

+LAB_3:

+        DVar4 = GetLastError();

+        SandboxTelemetry::WriteDbgTraceError

+                  ("sandbox::SandboxManagerUtil::GetDriverInfoHelper",

+                   (ushort *)L"GetPrinterDriver on %ws failed with error code: %d!",pwVar5,

+                   (ulonglong)DVar4);

+      }

+      if (iVar3 == 0) {

+LAB_4:

+        NCoreLibrary::

+        TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+        ::Reset((TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+                 *)&local_res20);

+        puVar7 = (uchar *)0x0;

+        local_res20 = (uchar *)0x0;

+      }

+      else {

+        local_res18[0] = 0;

+        local_res10[0] = 0;

+        uVar6 = PrvGetPrinterDriverExW

+                          (local_38,(wchar_t *)0x0,8,(longlong)puVar7,(int)local_res8,&local_res8,

+                           0xffffffff,0xffffffff,local_res18,local_res10);

+        if ((int)uVar6 == 0) goto LAB_4;

+      }

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

+        InternalClosePrinter(local_38,0);

+      }

+    }

+  }

+LAB_0:

+  puVar8 = (uchar *)0x0;

+  if (puVar7 != (uchar *)0x0) {

+    local_res20 = (uchar *)0x0;

+    puVar8 = puVar7;

+  }

+LAB_1:

+  NCoreLibrary::

+  TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+  ::Reset((TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+           *)&local_res20);

+  NCoreLibrary::

+  TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+  ::Reset((TGenericSP<unsigned_char,NCoreLibrary::TAutoPtrArray<unsigned_char>,unsigned_char*___ptr64,0,unsigned_char_const*___ptr64>

+           *)local_30);

+  return puVar8;

+}

+
```

## `sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy`  (modified)

```diff
--- sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy
+++ sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy
@@ -1,2 +1,38 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: void __cdecl sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy(void) __ptr64 */

+

+void __thiscall sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy(SandboxManagerUtil *this)

+

+{

+  LSTATUS LVar1;

+  wchar_t *pwVar2;

+  DWORD local_res8 [2];

+  int local_res10 [2];

+  DWORD local_res18 [2];

+  HKEY local_res20;

+  

+  local_res20 = (HKEY)0x0;

+  LVar1 = RegOpenKeyExW((HKEY)0xffffffff80000002,

+                        L"Software\\Policies\\Microsoft\\Windows NT\\Printers",0,0x20019,

+                        &local_res20);

+  if (LVar1 == 0) {

+    local_res10[0] = 0;

+    local_res8[0] = 0;

+    local_res18[0] = 4;

+    LVar1 = RegQueryValueExW(local_res20,L"PrintDriverIsolationOverrideCompat",(LPDWORD)0x0,

+                             local_res8,(LPBYTE)local_res10,local_res18);

+    if ((LVar1 == 0) && (local_res8[0] == 4)) {

+      *(uint *)(this + 0x50) = (uint)(local_res10[0] == 1);

+    }

+    RegCloseKey(local_res20);

+  }

+  pwVar2 = L"kOverrideCompatON";

+  if (*(int *)(this + 0x50) != 1) {

+    pwVar2 = L"kOverrideCompatOFF";

+  }

+  SandboxTelemetry::WriteDbgTraceInfo

+            ("sandbox::SandboxManagerUtil::RefreshOverrideCompatPolicy",

+             (ushort *)L"Override compat policy is %ws",pwVar2);

+  return;

+}

+
```

## `NUtilityLibrary::PrintCrackName`  (modified)

```diff
--- NUtilityLibrary::PrintCrackName
+++ NUtilityLibrary::PrintCrackName
@@ -1,2 +1,71 @@
-Failed to decompile spoolsv.exe - .ProgramDB NUtilityLibrary::PrintCrackName : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* long __cdecl NUtilityLibrary::PrintCrackName(unsigned short const * __ptr64,class

+   NCoreLibrary::TString * __ptr64,class NCoreLibrary::TString * __ptr64,class NCoreLibrary::TString

+   * __ptr64) */

+

+long __cdecl

+NUtilityLibrary::PrintCrackName(ushort *param_1,TString *param_2,TString *param_3,TString *param_4)

+

+{

+  TString *pTVar1;

+  long lVar2;

+  ushort *puVar3;

+  TString *pTVar4;

+  TString *this;

+  TString *pTVar5;

+  TString *pTVar6;

+  TString *local_res20;

+  

+  this = (TString *)&local_res20;

+  local_res20 = param_4;

+  NCoreLibrary::TString::TString(this,param_1);

+  pTVar1 = local_res20;

+  if (local_res20 == (TString *)((longlong)&NCoreLibrary::TString::gszNullState + 2)) {

+    lVar2 = -0x7ff8fff2;

+    goto LAB_0;

+  }

+  pTVar5 = (TString *)0x0;

+  lVar2 = 0;

+  pTVar6 = local_res20;

+  if ((*(short *)local_res20 == 0x5c) && (*(short *)(local_res20 + 2) == 0x5c)) {

+    this = local_res20 + 4;

+    puVar3 = wcschr((ushort *)this,0x5c);

+    pTVar5 = pTVar1;

+    if (puVar3 != (ushort *)0x0) {

+      *puVar3 = 0;

+      pTVar6 = (TString *)(puVar3 + 1);

+      goto LAB_1;

+    }

+    this = pTVar1 + 4;

+    puVar3 = wcschr((ushort *)this,0x2c);

+    pTVar6 = (TString *)0x0;

+    if (puVar3 != (ushort *)0x0) {

+      lVar2 = -0x7ff8ffa9;

+      goto LAB_0;

+    }

+  }

+  else {

+LAB_1:

+    if (((pTVar6 != (TString *)0x0) && (*(short *)pTVar6 != 0)) &&

+       (this = pTVar6, pTVar4 = (TString *)wcschr((ushort *)pTVar6,0x2c), pTVar4 != (TString *)0x0))

+    {

+      if (pTVar4 == pTVar6) {

+        this = pTVar6 + 2;

+        pTVar4 = (TString *)wcschr((ushort *)this,0x2c);

+        if (pTVar4 == (TString *)0x0) goto LAB_2;

+      }

+      *(undefined2 *)pTVar4 = 0;

+    }

+  }

+LAB_2:

+  if (((param_2 == (TString *)0x0) ||

+      (lVar2 = NCoreLibrary::TString::Update(param_2,(ushort *)pTVar5), this = param_2, -1 < lVar2))

+     && (param_3 != (TString *)0x0)) {

+    lVar2 = NCoreLibrary::TString::Update(param_3,(ushort *)pTVar6);

+    this = param_3;

+  }

+LAB_0:

+  NCoreLibrary::TString::vFree(this,pTVar1);

+  return lVar2;

+}

+
```

## `sandbox::SandboxManagerUtil::RefreshSettings`  (modified)

```diff
--- sandbox::SandboxManagerUtil::RefreshSettings
+++ sandbox::SandboxManagerUtil::RefreshSettings
@@ -1,2 +1,34 @@
-Failed to decompile spoolsv.exe - .ProgramDB sandbox::SandboxManagerUtil::RefreshSettings : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* private: void __cdecl sandbox::SandboxManagerUtil::RefreshSettings(void) __ptr64 */

+

+void __thiscall sandbox::SandboxManagerUtil::RefreshSettings(SandboxManagerUtil *this)

+

+{

+  int iVar1;

+  DWORD DVar2;

+  HANDLE pvVar3;

+  

+  NCoreLibrary::TCriticalSection::Enter((TCriticalSection *)this);

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

+    pvVar3 = CreateEventW((LPSECURITY_ATTRIBUTES)0x0,1,1,(LPCWSTR)0x0);

+    *(HANDLE *)(this + 0x38) = pvVar3;

+    iVar1 = RegisterGPNotification(pvVar3,1);

+    if (iVar1 == 0) {

+      CloseHandle(*(HANDLE *)(this + 0x38));

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

+    }

+  }

+  if (*(HANDLE *)(this + 0x38) != (HANDLE)0x0) {

+    DVar2 = WaitForSingleObject(*(HANDLE *)(this + 0x38),0);

+    if (DVar2 != 0) goto LAB_0;

+    ResetEvent(*(HANDLE *)(this + 0x38));

+    SandboxTelemetry::WriteDbgTraceInfo

+              ("sandbox::SandboxManagerUtil::RefreshSettings",(ushort *)L"GP Changed - refreshing");

+  }

+  RefreshSpoolerPluginExecutionPolicy(this);

+  RefreshOverrideCompatPolicy(this);

+LAB_0:

+  NCoreLibrary::TCriticalSection::Leave((TCriticalSection *)this);

+  return;

+}

+
```

## `API-MS-WIN-CORE-REGISTRY-L1-1-1.DLL::RegSetKeyValueW`  (modified)

```diff
--- API-MS-WIN-CORE-REGISTRY-L1-1-1.DLL::RegSetKeyValueW calling
+++ API-MS-WIN-CORE-REGISTRY-L1-1-1.DLL::RegSetKeyValueW calling
@@ -1,0 +2 @@
+ResetWindowsProtectedPrintConfigurationForError
```

## `API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL::RegGetValueW`  (modified)

```diff
--- API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL::RegGetValueW calling
+++ API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL::RegGetValueW calling
@@ -13 +13,2 @@
-ResetWindowsProtectedPrintConfigurationForError
+IsWppConfigurationFailed
+PrintCore::WindowsProtectedPrintHelpers::GetWindowsProtectedPrintConfigurationSource
```

## `NTDLL.DLL::RtlPublishWnfStateData`  (modified)

```diff
--- NTDLL.DLL::RtlPublishWnfStateData calling
+++ NTDLL.DLL::RtlPublishWnfStateData calling
@@ -0,0 +1 @@
+PublishWppConfigurationNotification
```

## `API-MS-WIN-CORE-SYSINFO-L1-1-0.DLL::GetVersionExW`  (modified)

```diff
--- API-MS-WIN-CORE-SYSINFO-L1-1-0.DLL::GetVersionExW calling
+++ API-MS-WIN-CORE-SYSINFO-L1-1-0.DLL::GetVersionExW calling
@@ -3,0 +4 @@
+IsWncEdition
```

## `API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive`  (modified)

```diff
--- API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive calling
+++ API-MS-WIN-CORE-SYNCH-L1-1-0.DLL::AcquireSRWLockExclusive calling
@@ -11 +11 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2025_Wave1>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_Enforce_Windows_Protected_Print_On_NXT>::GetCachedFeatureEnabledState
@@ -13,8 +13 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_26_02_NonSec>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_26_03_NonSec>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_26_04_NonSec>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Ten2Loc>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_TestLoc1Perf>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_TestUex12>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_UexTest7>::GetCachedFeatureEnabledState
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_UxLabTest>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Print_PlatformStabilizationFixes_2026_Wave4>::GetCachedFeatureEnabledState
```
