# CVE-2026-44810 — ncryptprov.dll patch diff

`ncryptprov.dll` 10.0.26100.8457 -> 10.0.26100.8521 (ghidriff).

## `SPPkcs11ImportKey`  (modified)

```diff
--- SPPkcs11ImportKey
+++ FUN_180050e38
@@ -1,250 +1,306 @@
 

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

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

 

-DWORD SPPkcs11ImportKey(PCEVENT_DESCRIPTOR param_1,longlong param_2,undefined8 *param_3,int *param_4

-                       ,int *param_5,uint param_6,DWORD param_7)

+DWORD FUN_180050e38(PCEVENT_DESCRIPTOR param_1,longlong param_2,undefined8 *param_3,int *param_4,

+                   int *param_5,uint param_6,DWORD param_7)

 

 {

   int iVar1;

   wchar_t *pwVar2;

   PCEVENT_DESCRIPTOR pEVar3;

-  uint extraout_EAX;

-  undefined4 uVar4;

-  DWORD DVar5;

-  undefined8 uVar6;

-  undefined **ppuVar7;

-  ulonglong uVar8;

+  PCEVENT_DESCRIPTOR pEVar4;

+  uint uVar12;

+  uint uVar5;

+  uint uVar6;

+  DWORD extraout_EAX;

+  undefined4 uVar7;

+  DWORD DVar8;

+  undefined8 uVar9;

+  undefined **ppuVar10;

+  ulonglong uVar11;

   void *_Dst;

-  uint uVar9;

-  uint uVar10;

-  PCEVENT_DESCRIPTOR pEVar11;

-  wchar_t *pwVar12;

-  uint uVar13;

-  longlong *unaff_RBP;

-  PCEVENT_DESCRIPTOR unaff_RSI;

-  uint unaff_EDI;

-  uint uVar14;

-  PCEVENT_DESCRIPTOR pEVar15;

-  uint in_R11D;

-  int *unaff_R12;

-  void *unaff_R13;

-  short unaff_R14W;

-  size_t unaff_R15;

-  longlong lVar16;

-  undefined1 in_ZF;

-  undefined4 in_stack_00000034;

-  undefined4 in_stack_0000003c;

-  PCEVENT_DESCRIPTOR in_stack_00000040;

-  uint in_stack_00000048;

-  PCEVENT_DESCRIPTOR in_stack_00000050;

-  int in_stack_00000058;

-  PCEVENT_DESCRIPTOR in_stack_00000060;

-  undefined8 *in_stack_00000068;

-  wchar_t *in_stack_00000070;

-  longlong in_stack_00000078;

+  wchar_t *pwVar13;

+  DWORD DVar14;

+  longlong *plVar15;

+  PCEVENT_DESCRIPTOR pEVar16;

+  PCEVENT_DESCRIPTOR pEVar17;

+  uint uVar18;

+  longlong lVar19;

+  undefined1 auStackY_178 [32];

+  longlong local_148;

+  wchar_t *local_140;

+  PCEVENT_DESCRIPTOR local_138;

+  DWORD local_130 [2];

+  PCEVENT_DESCRIPTOR local_128;

+  DWORD local_120;

+  PCEVENT_DESCRIPTOR local_118;

+  undefined8 *local_110;

+  wchar_t *local_108;

+  LARGE_INTEGER local_100 [17];

+  longlong local_78 [6];

+  ulonglong local_48;

   

-  do {

-    if ((bool)in_ZF) {

-LAB_0:

-      uVar13 = 0x80090027;

+  plVar15 = local_78;

+  local_48 = DAT_0 ^ (ulonglong)auStackY_178;

+  pEVar16 = (PCEVENT_DESCRIPTOR)0x0;

+  local_130[0] = param_7;

+  local_118 = (PCEVENT_DESCRIPTOR)0x0;

+  local_128 = (PCEVENT_DESCRIPTOR)0x0;

+  local_140 = (wchar_t *)0x0;

+  local_108 = (wchar_t *)0x0;

+  local_120 = 0xc0000001;

+  local_100[0].QuadPart = 0;

+  local_148 = param_2;

+  local_138 = param_1;

+  local_110 = param_3;

+  pEVar17 = pEVar16;

+  if ((((param_1 == (PCEVENT_DESCRIPTOR)0x0) || (param_2 == 0)) || (param_5 == (int *)0x0)) ||

+     ((param_3 == (undefined8 *)0x0 || (param_4 == (int *)0x0)))) {

 LAB_1:

-      FUN_180007a60(uVar13,"Status","onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c");

-LAB_2:

-      lVar16 = CONCAT44(in_stack_00000034,param_6);

-LAB_3:

-      pwVar2 = _param_7;

-      pEVar15 = (PCEVENT_DESCRIPTOR)0x0;

-      if (((5 < DAT_4) && ((_DAT_180082078 & 0x800000000000) != 0)) &&

-         ((DAT_5 & 0x800000000000) == DAT_5)) {

-        unaff_RBP[-0xc] = (longlong)&stack0x00000068;

-        in_stack_00000068 = (undefined8 *)0x1;

-        unaff_RBP[-10] = (longlong)&stack0x00000040;

-        unaff_RBP[-0xb] = 8;

-        unaff_RBP[-8] = (longlong)&stack0x00000048;

-        pwVar12 = L"NULL";

-        if (_param_7 != (wchar_t *)0x0) {

-          pwVar12 = _param_7;

+    DVar14 = 0x80090027;

+    pEVar17 = pEVar16;

+  }

+  else {

+    if (0x10 < param_6) {

+      if (*param_5 != 0x57504152) {

+        DVar14 = 0x8009000a;

+        goto LAB_2;

+      }

+      if (param_5[1] != 0) {

+        if (param_5[2] == 0) {

+          DVar14 = 0x80090008;

+          goto LAB_2;

         }

-        in_stack_00000040 = (PCEVENT_DESCRIPTOR)0x1000000;

-        unaff_RBP[-9] = 8;

-        unaff_RBP[-7] = 4;

-        in_stack_00000048 = uVar13;

-        FUN_18000191c(unaff_RBP + -6,(undefined *)pwVar12);

-        pwVar12 = L"NON-NULL";

-        if (in_stack_00000050 == pEVar15) {

-          pwVar12 = L"NULL";

+        local_120 = FUN_18002aae8(local_100);

+        if ((((int)local_120 < 0) && ((undefined **)PTR_LOOP_1800820e8 != &PTR_LOOP_1800820e8)) &&

+           ((PTR_LOOP_1800820e8[0x1c] & 1) != 0)) {

+          FUN_18002e5bc(*(undefined8 *)(PTR_LOOP_1800820e8 + 0x10),10,&DAT_3,

+                        "SPPkcs11ImportKey");

         }

-        FUN_18000191c(unaff_RBP + -4,(undefined *)pwVar12);

-        if ((unaff_R13 == (void *)0x0) ||

-           (pwVar12 = in_stack_00000070, *(int *)((longlong)unaff_R13 + 8) == (int)pEVar15)) {

-          pwVar12 = L"NULL";

+        uVar5 = param_5[1] + 0x10;

+        uVar12 = 0xffffffff;

+        if (uVar5 >= 0x10) {

+          uVar12 = uVar5;

         }

-        FUN_18000191c(unaff_RBP + -2,(undefined *)pwVar12);

-        if (lVar16 == 0) {

-          uVar4 = 0;

-        }

-        else {

-          uVar4 = *(undefined4 *)(lVar16 + 0x28);

-        }

-        _param_7 = (wchar_t *)CONCAT44(in_stack_0000003c,uVar4);

-        unaff_RBP[1] = 4;

-        *unaff_RBP = (longlong)&param_7;

-        unaff_RBP[2] = (longlong)&param_6;

-        unaff_RBP[3] = 4;

-        param_6 = unaff_EDI;

-        FUN_180019e5c(0x180082068,&DAT_6,0,10,(PEVENT_DATA_DESCRIPTOR)(unaff_RBP + -0x10));

-      }

-      if ((-1 < in_stack_00000058) && (-1 < (int)uVar13)) {

-        in_stack_00000040 = (PCEVENT_DESCRIPTOR)0x0;

-        DVar5 = FUN_18003e8e4(in_stack_00000078,(longlong *)&stack0x00000040);

-        if ((int)DVar5 < 0) {

-          if (((undefined **)PTR_LOOP_1800820e8 != &PTR_LOOP_1800820e8) &&

-             ((PTR_LOOP_1800820e8[0x1c] & 1) != 0)) {

-            FUN_18002e5bc(*(undefined8 *)(PTR_LOOP_1800820e8 + 0x10),0xb,&DAT_7,

-                          "SPPkcs11ImportKey");

+        DVar14 = (-(uint)(uVar5 < 0x10) & 0xc0000095) + 0x10000000;

+        if (uVar5 < 0x10) goto LAB_2;

+        if (uVar12 < param_6) {

+          uVar5 = param_5[2];

+          uVar6 = uVar5 + uVar12;

+          uVar18 = 0xffffffff;

+          if (uVar6 >= uVar12) {

+            uVar18 = uVar6;

+          }

+          DVar14 = (-(uint)(uVar6 < uVar12) & 0xc0000095) + 0x10000000;

+          if (uVar6 < uVar12) goto LAB_2;

+          if (uVar18 <= param_6) {

+            local_108 = (wchar_t *)((longlong)param_5 + (ulonglong)(uint)param_5[1] + 0x10);

+            if (1 < uVar5) {

+              uVar11 = (ulonglong)(uVar5 >> 1);

+              do {

+                uVar12 = (int)uVar11 - 1;

+                uVar11 = (ulonglong)uVar12;

+                if (local_108[uVar11] == L'\0') {

+                  uVar5 = param_5[3] + uVar18;

+                  uVar12 = 0xffffffff;

+                  if (uVar5 >= uVar18) {

+                    uVar12 = uVar5;

+                  }

+                  DVar14 = (-(uint)(uVar5 < uVar18) & 0xc0000095) + 0x10000000;

+                  if (uVar5 < uVar18) goto LAB_2;

+                  if (param_6 < uVar12) goto LAB_4;

+                  if ((param_7 & 0x6200) == 0) {

+                    uVar9 = FUN_180055d64(param_4,(longlong *)&local_140,0x2b);

+                    if ((((int)uVar9 < 0) || (local_140 == (wchar_t *)0x0)) ||

+                       (ppuVar10 = FUN_180003550(local_140), ppuVar10 == (undefined **)0x0)) break;

+                    uVar9 = FUN_18002c6f8(param_4,(longlong *)&local_128);

+                    pEVar4 = local_128;

+                    pEVar3 = local_138;

+                    DVar14 = (DWORD)uVar9;

+                    pEVar17 = (PCEVENT_DESCRIPTOR)0x0;

+                    if ((int)DVar14 < 0) goto LAB_2;

+                    if ((*(int *)(local_148 + 0x28) == 0x20) &&

+                       (local_128 != (PCEVENT_DESCRIPTOR)0x0)) break;

+                    if (*(int *)(local_148 + 0x90) == 0) {

+                      if ((param_7 & 0x20000) == 0) goto LAB_5;

+                    }

+                    else if ((param_7 & 0x20000) != 0) {

+LAB_5:

+                      param_7 = param_7 | 0x40000;

+                      if (*(int *)(local_148 + 0x28) != 0x20) {

+                        param_7 = local_130[0];

+                      }

+                      pEVar16 = local_138;

+                      plVar15 = (longlong *)

+                                FUN_180006140(local_128,(longlong)local_138,(longlong)ppuVar10,0,

+                                              param_7,&local_118);

+                      pEVar17 = local_118;

+                      DVar14 = extraout_EAX;

+                      if ((int)extraout_EAX < 0) {

+                        FUN_180007a60(extraout_EAX,"Status",

+                                      "onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c"

+                                     );

+                        pEVar17 = local_118;

+                        lVar19 = local_148;

+                        goto LAB_6;

+                      }

+                      if ((pEVar4 != (PCEVENT_DESCRIPTOR)0x0) && (pEVar4->Id != 0)) {

+                        uVar12._0_2_ = local_118[0x21].Id;

+                        uVar12._2_1_ = local_118[0x21].Version;

+                        uVar12._3_1_ = local_118[0x21].Channel;

+                        uVar5._0_2_ = local_118[2].Id;

+                        uVar5._2_1_ = local_118[2].Version;

+                        uVar5._3_1_ = local_118[2].Channel;

+                        uVar11 = FUN_18000be40((ulonglong)uVar5,(int *)pEVar16,

+                                               (short *)(ulonglong)uVar12,(void *)pEVar3[2].Keyword,

+                                               (longlong *)&local_118[4].Keyword);

+                        DVar14 = (DWORD)uVar11;

+                        if ((int)DVar14 < 0) goto LAB_2;

+                        if (-1 < (char)param_7) {

+                          uVar11 = FUN_18000f81c((longlong)pEVar17);

+                          DVar14 = (DWORD)uVar11;

+                          if ((int)DVar14 < 0) goto LAB_2;

+                        }

+                      }

+                      pEVar17[0xc].Keyword = (ULONGLONG)L"PKCS11RsaAesWrapBlob";

+                      _Dst = (void *)FUN_18000b870((ulonglong)param_6);

+                      *(void **)(pEVar17 + 0xd) = _Dst;

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

+                        DVar14 = 0x8009000e;

+                        goto LAB_2;

+                      }

+                      memcpy(_Dst,param_5,(ulonglong)param_6);

+                      lVar19 = local_148;

+                      *(uint *)&pEVar17[0xd].Keyword = param_6;

+                      uVar9 = *(undefined8 *)(local_148 + 0x70);

+                      pEVar17[6].Id = (short)uVar9;

+                      pEVar17[6].Version = (char)((ulonglong)uVar9 >> 0x10);

+                      pEVar17[6].Channel = (char)((ulonglong)uVar9 >> 0x18);

+                      pEVar17[6].Level = (char)((ulonglong)uVar9 >> 0x20);

+                      pEVar17[6].Opcode = (char)((ulonglong)uVar9 >> 0x28);

+                      pEVar17[6].Task = (short)((ulonglong)uVar9 >> 0x30);

+                      if (((param_7 >> 10 & 1) == 0) &&

+                         (DVar14 = FUN_1800342f0(local_138,pEVar17,

+                                                 (undefined **)(ulonglong)(param_7 & 0x40)),

+                         (int)DVar14 < 0)) {

+                        FUN_180007a60(DVar14,"Status",

+                                      "onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c"

+                                     );

+                      }

+                      else {

+                        *local_110 = pEVar17;

+                        pEVar17 = (PCEVENT_DESCRIPTOR)0x0;

+                      }

+                      goto LAB_6;

+                    }

+                  }

+                  DVar14 = 0x80090009;

+                  pEVar17 = pEVar16;

+                  goto LAB_2;

+                }

+              } while (uVar12 != 0);

+            }

+            goto LAB_1;

           }

         }

-        else if (((DAT_4 != 0) && ((_DAT_180082078 & 0x400000000000) != 0)) &&

-                ((DAT_5 & 0x400000000000) == DAT_5)) {

-          in_stack_00000068 = (undefined8 *)0x1;

-          unaff_RBP[-0xc] = (longlong)&stack0x00000068;

-          unaff_RBP[-10] = (longlong)&stack0x00000040;

-          pwVar12 = L"NULL";

-          if (pwVar2 != (wchar_t *)0x0) {

-            pwVar12 = pwVar2;

-          }

-          in_stack_00000060 = in_stack_00000040;

-          in_stack_00000050 = in_stack_00000040;

-          unaff_RBP[-8] = (longlong)&stack0x00000060;

-          unaff_RBP[-6] = (longlong)&stack0x00000050;

-          unaff_RBP[-0xb] = 8;

-          unaff_RBP[-9] = 8;

-          unaff_RBP[-7] = 8;

-          unaff_RBP[-5] = 8;

-          FUN_18000191c(unaff_RBP + -4,(undefined *)pwVar12);

-          *unaff_RBP = (longlong)in_stack_00000070;

-          iVar1 = *(int *)((longlong)unaff_R13 + 8);

-          unaff_RBP[-2] = (longlong)(unaff_RBP + 1);

-          *(int *)(unaff_RBP + 1) = iVar1 * 2;

-          unaff_RBP[-1] = 2;

-          unaff_RBP[2] = (longlong)&param_6;

-          *(undefined4 *)((longlong)unaff_RBP + 0xc) = 0;

-          unaff_RBP[4] = (longlong)&param_7;

-          unaff_RBP[3] = 4;

-          _param_7 = (wchar_t *)0x3000000;

-          unaff_RBP[5] = 8;

-          param_6 = unaff_EDI;

-          FUN_180019e5c(0x180082068,&DAT_8,0,0xb,(PEVENT_DATA_DESCRIPTOR)(unaff_RBP + -0x10)

-                       );

-        }

       }

-      if (unaff_RSI != (PCEVENT_DESCRIPTOR)0x0) {

-        FUN_1800163d0((undefined1 *)unaff_RSI);

+    }

+LAB_4:

+    DVar14 = 0x80090028;

+    pEVar17 = (PCEVENT_DESCRIPTOR)0x0;

+  }

+LAB_2:

+  FUN_180007a60(DVar14,"Status","onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c");

+  lVar19 = local_148;

+LAB_6:

+  pwVar2 = local_140;

+  pEVar16 = (PCEVENT_DESCRIPTOR)0x0;

+  if (((5 < DAT_7) && ((_DAT_180082078 & 0x800000000000) != 0)) &&

+     ((DAT_8 & 0x800000000000) == DAT_8)) {

+    plVar15[-0xc] = (longlong)&local_110;

+    local_110 = (undefined8 *)0x1;

+    plVar15[-10] = (longlong)&local_138;

+    plVar15[-0xb] = 8;

+    plVar15[-8] = (longlong)local_130;

+    pwVar13 = L"NULL";

+    if (local_140 != (wchar_t *)0x0) {

+      pwVar13 = local_140;

+    }

+    local_138 = (PCEVENT_DESCRIPTOR)0x1000000;

+    plVar15[-9] = 8;

+    plVar15[-7] = 4;

+    local_130[0] = DVar14;

+    FUN_18000191c(plVar15 + -6,(undefined *)pwVar13);

+    pwVar13 = L"NON-NULL";

+    if (local_128 == pEVar16) {

+      pwVar13 = L"NULL";

+    }

+    FUN_18000191c(plVar15 + -4,(undefined *)pwVar13);

+    if ((param_5 == (int *)0x0) || (pwVar13 = local_108, param_5[2] == (int)pEVar16)) {

+      pwVar13 = L"NULL";

+    }

+    FUN_18000191c(plVar15 + -2,(undefined *)pwVar13);

+    if (lVar19 == 0) {

+      uVar7 = 0;

+    }

+    else {

+      uVar7 = *(undefined4 *)(lVar19 + 0x28);

+    }

+    local_140 = (wchar_t *)CONCAT44(local_140._4_4_,uVar7);

+    plVar15[1] = 4;

+    *plVar15 = (longlong)&local_140;

+    local_148 = CONCAT44(local_148._4_4_,param_7);

+    plVar15[2] = (longlong)&local_148;

+    plVar15[3] = 4;

+    FUN_180019e5c(0x180082068,&DAT_9,0,10,(PEVENT_DATA_DESCRIPTOR)(plVar15 + -0x10));

+  }

+  if ((-1 < (int)local_120) && (-1 < (int)DVar14)) {

+    local_138 = (PCEVENT_DESCRIPTOR)0x0;

+    DVar8 = FUN_18003e8e4(local_100[0].QuadPart,(longlong *)&local_138);

+    if ((int)DVar8 < 0) {

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

+         ((PTR_LOOP_1800820e8[0x1c] & 1) != 0)) {

+        FUN_18002e5bc(*(undefined8 *)(PTR_LOOP_1800820e8 + 0x10),0xb,&DAT_3,

+                      "SPPkcs11ImportKey");

       }

-      return uVar13;

-    }

-    uVar9 = (int)param_1 + (uint)param_3;

-    param_1 = (PCEVENT_DESCRIPTOR)(ulonglong)uVar9;

-    if (*(short *)(param_2 + (longlong)param_1 * 2) == unaff_R14W) {

-      uVar14 = (uint)param_4;

-      uVar10 = *(int *)((longlong)unaff_R13 + 0xc) + uVar14;

-      uVar9 = (uint)param_3;

-      if (uVar10 >= uVar14) {

-        uVar9 = uVar10;

+    }

+    else if (((DAT_7 != 0) && ((_DAT_180082078 & 0x400000000000) != 0)) &&

+            ((DAT_8 & 0x400000000000) == DAT_8)) {

+      local_110 = (undefined8 *)0x1;

+      plVar15[-0xc] = (longlong)&local_110;

+      plVar15[-10] = (longlong)&local_138;

+      pwVar13 = L"NULL";

+      if (pwVar2 != (wchar_t *)0x0) {

+        pwVar13 = pwVar2;

       }

-      uVar13 = (-(uint)(uVar10 < uVar14) & in_R11D) + 0x10000000;

-      if (uVar10 < uVar14) goto LAB_1;

-      if ((uint)unaff_R15 < uVar9) {

-        uVar13 = 0x80090028;

-        goto LAB_1;

-      }

-      if ((unaff_EDI & 0x6200) == 0) {

-        uVar6 = FUN_180055d64(unaff_R12,(longlong *)&param_7,0x2b);

-        if ((((int)uVar6 < 0) || (_param_7 == (wchar_t *)0x0)) ||

-           (ppuVar7 = FUN_180003550(_param_7), ppuVar7 == (undefined **)0x0)) goto LAB_0;

-        uVar6 = FUN_18002c6f8(unaff_R12,(longlong *)&stack0x00000050);

-        pEVar3 = in_stack_00000050;

-        pEVar15 = in_stack_00000040;

-        uVar13 = (uint)uVar6;

-        if ((int)uVar13 < 0) goto LAB_1;

-        lVar16 = CONCAT44(in_stack_00000034,param_6);

-        if ((*(int *)(lVar16 + 0x28) == 0x20) && (in_stack_00000050 != (PCEVENT_DESCRIPTOR)0x0))

-        goto LAB_0;

-        if (*(int *)(lVar16 + 0x90) == 0) {

-          if ((unaff_EDI & 0x20000) == 0) goto LAB_9;

-        }

-        else if ((unaff_EDI & 0x20000) != 0) {

-LAB_9:

-          unaff_EDI = unaff_EDI | 0x40000;

-          if (*(int *)(lVar16 + 0x28) != 0x20) {

-            unaff_EDI = in_stack_00000048;

-          }

-          pEVar11 = in_stack_00000040;

-          unaff_RBP = (longlong *)

-                      FUN_180006140(in_stack_00000050,(longlong)in_stack_00000040,(longlong)ppuVar7,

-                                    0,unaff_EDI,&stack0x00000060);

-          unaff_RSI = in_stack_00000060;

-          uVar13 = extraout_EAX;

-          if ((int)extraout_EAX < 0) {

-            FUN_180007a60(extraout_EAX,"Status",

-                          "onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c");

-            unaff_RSI = in_stack_00000060;

-            goto LAB_2;

-          }

-          if ((pEVar3 != (PCEVENT_DESCRIPTOR)0x0) && (pEVar3->Id != 0)) {

-            uVar9._0_2_ = in_stack_00000060[0x21].Id;

-            uVar9._2_1_ = in_stack_00000060[0x21].Version;

-            uVar9._3_1_ = in_stack_00000060[0x21].Channel;

-            uVar10._0_2_ = in_stack_00000060[2].Id;

-            uVar10._2_1_ = in_stack_00000060[2].Version;

-            uVar10._3_1_ = in_stack_00000060[2].Channel;

-            uVar8 = FUN_18000be40((ulonglong)uVar10,(int *)pEVar11,(short *)(ulonglong)uVar9,

-                                  (void *)pEVar15[2].Keyword,

-                                  (longlong *)&in_stack_00000060[4].Keyword);

-            uVar13 = (uint)uVar8;

-            if ((int)uVar13 < 0) goto LAB_1;

-            if (-1 < (char)unaff_EDI) {

-              uVar8 = FUN_18000f81c((longlong)unaff_RSI);

-              uVar13 = (uint)uVar8;

-              if ((int)uVar13 < 0) goto LAB_1;

-            }

-          }

-          unaff_RSI[0xc].Keyword = (ULONGLONG)L"PKCS11RsaAesWrapBlob";

-          _Dst = (void *)FUN_18000b870(unaff_R15);

-          *(void **)(unaff_RSI + 0xd) = _Dst;

-          if (_Dst == (void *)0x0) {

-            uVar13 = 0x8009000e;

-            goto LAB_1;

-          }

-          memcpy(_Dst,unaff_R13,unaff_R15);

-          *(uint *)&unaff_RSI[0xd].Keyword = (uint)unaff_R15;

-          lVar16 = CONCAT44(in_stack_00000034,param_6);

-          uVar6 = *(undefined8 *)(lVar16 + 0x70);

-          unaff_RSI[6].Id = (short)uVar6;

-          unaff_RSI[6].Version = (char)((ulonglong)uVar6 >> 0x10);

-          unaff_RSI[6].Channel = (char)((ulonglong)uVar6 >> 0x18);

-          unaff_RSI[6].Level = (char)((ulonglong)uVar6 >> 0x20);

-          unaff_RSI[6].Opcode = (char)((ulonglong)uVar6 >> 0x28);

-          unaff_RSI[6].Task = (short)((ulonglong)uVar6 >> 0x30);

-          if (((unaff_EDI >> 10 & 1) == 0) &&

-             (uVar13 = FUN_1800342f0(in_stack_00000040,unaff_RSI,

-                                     (undefined **)(ulonglong)(unaff_EDI & 0x40)), (int)uVar13 < 0))

-          {

-            FUN_180007a60(uVar13,"Status",

-                          "onecore\\ds\\security\\cryptoapi\\ncrypt\\storage\\pkcsfmt.c");

-          }

-          else {

-            *in_stack_00000068 = unaff_RSI;

-            unaff_RSI = (PCEVENT_DESCRIPTOR)0x0;

-          }

-          goto LAB_3;

-        }

-      }

-      uVar13 = 0x80090009;

-      goto LAB_1;

-    }

-    in_ZF = uVar9 == 0;

-  } while( true );

+      local_118 = local_138;

+      local_128 = local_138;

+      plVar15[-8] = (longlong)&local_118;

+      plVar15[-6] = (longlong)&local_128;

+      plVar15[-0xb] = 8;

+      plVar15[-9] = 8;

+      plVar15[-7] = 8;

+      plVar15[-5] = 8;

+      FUN_18000191c(plVar15 + -4,(undefined *)pwVar13);

+      *plVar15 = (longlong)local_108;

+      iVar1 = param_5[2];

+      plVar15[-2] = (longlong)(plVar15 + 1);

+      *(int *)(plVar15 + 1) = iVar1 * 2;

+      plVar15[-1] = 2;

+      plVar15[2] = (longlong)&local_148;

+      *(undefined4 *)((longlong)plVar15 + 0xc) = 0;

+      plVar15[4] = (longlong)&local_140;

+      local_148 = CONCAT44(local_148._4_4_,param_7);

+      plVar15[3] = 4;

+      local_140 = (wchar_t *)0x3000000;

+      plVar15[5] = 8;

+      FUN_180019e5c(0x180082068,&DAT_10,0,0xb,(PEVENT_DATA_DESCRIPTOR)(plVar15 + -0x10));

+    }

+  }

+  if (pEVar17 != (PCEVENT_DESCRIPTOR)0x0) {

+    FUN_1800163d0((undefined1 *)pEVar17);

+  }

+  return DVar14;

 }
```

## `std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>`  (modified)

```diff
--- std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>
+++ std::_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>
@@ -1,2 +1,2 @@
-Failed to decompile ncryptprov.dll - .ProgramDB std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_> : Error: Decompile error: 
+Failed to decompile ncryptprov.dll - .ProgramDB std::_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_> : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```

## `std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_>`  (modified)

```diff
--- std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_>
+++ std::_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>
@@ -1,2 +1,2 @@
-Failed to decompile ncryptprov.dll - .ProgramDB std::_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_>::~_Alloc_construct_ptr<std::allocator<std::_List_node<std::pair<unsigned_long_const_,KEYGUARD_TELEMETRY_PID*___ptr64>,void*___ptr64>_>_> : Error: Decompile error: 
+Failed to decompile ncryptprov.dll - .ProgramDB std::_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_>::~_List_node_emplace_op2<std::allocator<std::_List_node<std::pair<std::basic_string<unsigned_short,std::char_traits<unsigned_short>,std::allocator<unsigned_short>_>_const_,KEYGUARD_TELEMETRY_IMAGE_T*___ptr64>,void*___ptr64>_>_> : Error: Decompile error: 
 Marshaling error: Did not see expected closing element
```
