# CVE-2026-122168 — mfmp4srcsnk.dll patch diff

`mfmp4srcsnk.dll` 10.0.26100.9549 -> 10.0.26100.9974 (ghidriff).

## `CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart`  (modified)

```diff
--- CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart
+++ CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart
@@ -1,2 +1,107 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart : 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: virtual long __cdecl CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart(unsigned long

+   * __ptr64) __ptr64 */

+

+long __thiscall

+CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart(CQTMediaHandler *this,ulong *param_1)

+

+{

+  uint uVar1;

+  uchar uVar2;

+  int iVar3;

+  int iVar4;

+  CallStackContext *pCVar5;

+  CallStackTracing *this_00;

+  undefined8 uVar6;

+  CallStackScopeTrace local_18 [16];

+  

+  if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+    CallStackTracing::InitInstance();

+  }

+  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+    pCVar5 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance);

+    uVar1 = *(uint *)(pCVar5 + 0x7c4);

+    if (uVar1 < *(uint *)(pCVar5 + 0x7c8)) {

+      *(char **)(pCVar5 + (ulonglong)uVar1 * 0x10) =

+           "CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart";

+      *(undefined4 *)(pCVar5 + (ulonglong)uVar1 * 0x10 + 8) = 0x4858;

+    }

+    *(int *)(pCVar5 + 0x7c4) = *(int *)(pCVar5 + 0x7c4) + 1;

+  }

+  this_00 = CallStackTracing::s_wpInstance;

+  if (param_1 == (ulong *)0x0) {

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar3 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar3 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    iVar3 = -0x7fffbffd;

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar5 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar5 + 0x7cc) != -0x7fffbffd)) {

+      CallStackContext::TraceFailure

+                (pCVar5,"CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart",0x485a,-0x7fffbffd)

+      ;

+    }

+    uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar2 != '\0') {

+      WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x553,

+                &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this + -0x18,0x80004003);

+    }

+    goto LAB_1;

+  }

+  *param_1 = 0;

+  if (this[0x28] == (CQTMediaHandler)0x0) {

+    iVar3 = -0x3ff2c94a;

+    if ((this_00 == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar4 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0),

+        this_00 = CallStackTracing::s_wpInstance, iVar4 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      this_00 = (CallStackTracing *)&DAT_0;

+    }

+    if ((this_00[8] != (CallStackTracing)0x0) &&

+       (pCVar5 = CallStackTracing::GetThreadRelativeContext(this_00),

+       *(int *)(pCVar5 + 0x7cc) != -0x3ff2c94a)) {

+      CallStackContext::TraceFailure

+                (pCVar5,"CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart",0x485f,-0x3ff2c94a)

+      ;

+    }

+    uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar2 == '\0') goto LAB_1;

+    uVar6 = 0x554;

+    iVar3 = -0x3ff2c94a;

+  }

+  else {

+    iVar3 = (**(code **)(**(longlong **)(this + 0x20) + 0x18))(*(longlong **)(this + 0x20),param_1);

+    if (-1 < iVar3) goto LAB_1;

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar4 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar4 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar5 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar5 + 0x7cc) != iVar3)) {

+      CallStackContext::TraceFailure

+                (pCVar5,"CQTMediaHandler::GetNumberOfSamplesInNonFragmentedPart",0x4862,iVar3);

+    }

+    uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar2 == '\0') goto LAB_1;

+    uVar6 = 0x555;

+  }

+  WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar6,

+            &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this + -0x18,iVar3);

+LAB_1:

+  CallStackScopeTrace::~CallStackScopeTrace(local_18);

+  return iVar3;

+}

+
```

## `CWMProperty::TranslateValue`  (modified)

```diff
--- CWMProperty::TranslateValue
+++ CWMProperty::TranslateValue
@@ -1,2 +1,184 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CWMProperty::TranslateValue : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

+/* protected: long __cdecl CWMProperty::TranslateValue(struct tagPROPVARIANT const & __ptr64,struct

+   tagPROPVARIANT * __ptr64,struct _GUID,struct _GUID) __ptr64 */

+

+long __thiscall

+CWMProperty::TranslateValue

+          (CWMProperty *this,tagPROPVARIANT *param_1,tagPROPVARIANT *param_2,_GUID *param_3,

+          _GUID *param_4)

+

+{

+  ushort uVar1;

+  uchar uVar2;

+  int iVar3;

+  long lVar4;

+  ulong uVar5;

+  CallStackContext *pCVar6;

+  CallStackScopeTrace *this_00;

+  undefined8 uVar7;

+  uint uVar8;

+  uint uVar9;

+  CallStackScopeTrace local_88 [4];

+  uint local_84;

+  undefined8 local_80;

+  undefined8 uStack_78;

+  undefined8 local_70;

+  tagPROPVARIANT *local_68;

+  CMFPropVariant local_60 [32];

+  

+  uVar1 = *(ushort *)param_1;

+  local_84 = 0;

+  local_70 = 0;

+  local_80 = 0;

+  uStack_78 = 0;

+  local_68 = param_2;

+  iVar3 = (**(code **)(*(longlong *)this + 0x38))(0,param_3,&local_84);

+  uVar8 = uVar1 & 0xffffefff;

+  if (-1 < iVar3) {

+    uVar8 = local_84;

+  }

+  local_84 = 0;

+  iVar3 = (**(code **)(*(longlong *)this + 0x38))(this,param_4,&local_84);

+  uVar9 = uVar1 & 0x1000;

+  if (-1 < iVar3) {

+    uVar9 = local_84;

+  }

+  if (((uVar1 & 0x1000) != 0) && (uVar9 == 0)) {

+    CMFPropVariant::CMFPropVariant(local_60,param_1);

+    uVar5 = CMFPropVariant::GetElementCount(local_60);

+    if (uVar5 == 0) {

+      CallStackScopeTrace::CallStackScopeTrace(local_88,"CWMProperty::TranslateValue",0x107);

+      lVar4 = -0x3ff2c94e;

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar3 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar3 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar6 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar6 + 0x7cc) != -0x3ff2c94e)) {

+        CallStackContext::TraceFailure(pCVar6,"CWMProperty::TranslateValue",0x107,-0x3ff2c94e);

+      }

+      uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar2 != '\0') {

+        uVar7 = 0x19;

+        lVar4 = -0x3ff2c94e;

+LAB_1:

+        WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar7,

+                  &WPP_560f6a261fab31c223ee22ea268b0035_Traceguids,this,lVar4);

+      }

+    }

+    else {

+      CallStackScopeTrace::CallStackScopeTrace(local_88,"CWMProperty::TranslateValue",0xfe);

+      lVar4 = CMFPropVariant::GetElement(local_60,0,(tagPROPVARIANT *)&local_80);

+      if (-1 < lVar4) {

+        CallStackScopeTrace::~CallStackScopeTrace(local_88);

+        CMFPropVariant::Clear(local_60);

+        param_2 = local_68;

+        goto LAB_2;

+      }

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar3 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar3 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar6 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar6 + 0x7cc) != lVar4)) {

+        CallStackContext::TraceFailure(pCVar6,"CWMProperty::TranslateValue",0xfe,lVar4);

+      }

+      uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar2 != '\0') {

+        uVar7 = 0x18;

+        goto LAB_1;

+      }

+    }

+    CallStackScopeTrace::~CallStackScopeTrace(local_88);

+    CMFPropVariant::Clear(local_60);

+    goto LAB_3;

+  }

+  CMFPropVariant::Copy((CMFPropVariant *)&local_80,param_1);

+LAB_2:

+  if (*(short *)param_1 == 0x41) {

+    CallStackScopeTrace::CallStackScopeTrace(local_88,"CWMProperty::TranslateValue",0x115);

+    lVar4 = -0x3ff2c94e;

+    if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+      CallStackTracing::InitInstance();

+    }

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar6 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar6 + 0x7cc) != -0x3ff2c94e)) {

+      CallStackContext::TraceFailure(pCVar6,"CWMProperty::TranslateValue",0x115,-0x3ff2c94e);

+    }

+    uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar2 != '\0') {

+      uVar7 = 0x1a;

+      lVar4 = -0x3ff2c94e;

+LAB_4:

+      WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar7,

+                &WPP_560f6a261fab31c223ee22ea268b0035_Traceguids,this,lVar4);

+    }

+  }

+  else if ((uVar1 & 0xffffefff) == uVar8) {

+    CallStackScopeTrace::CallStackScopeTrace(local_88,"CWMProperty::TranslateValue",0x11e);

+    lVar4 = PropVariantCopy(param_2,(PROPVARIANT *)&local_80);

+    if (lVar4 < 0) {

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar3 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar3 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar6 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar6 + 0x7cc) != lVar4)) {

+        CallStackContext::TraceFailure(pCVar6,"CWMProperty::TranslateValue",0x11e,lVar4);

+      }

+      uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar2 != '\0') {

+        uVar7 = 0x1b;

+        goto LAB_4;

+      }

+    }

+  }

+  else {

+    if (((uVar1 & 0x1000) != 0) && (uVar9 != 0)) {

+      uVar8 = uVar8 | 0x1000;

+    }

+    this_00 = local_88;

+    CallStackScopeTrace::CallStackScopeTrace(this_00,"CWMProperty::TranslateValue",0x129);

+    lVar4 = WMPropVariantChangeType

+                      ((CWMProperty *)this_00,param_2,(tagPROPVARIANT *)&local_80,(ushort)uVar8);

+    if (lVar4 < 0) {

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar3 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar3 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar6 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar6 + 0x7cc) != lVar4)) {

+        CallStackContext::TraceFailure(pCVar6,"CWMProperty::TranslateValue",0x129,lVar4);

+      }

+      uVar2 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar2 != '\0') {

+        uVar7 = 0x1c;

+        goto LAB_4;

+      }

+    }

+  }

+  CallStackScopeTrace::~CallStackScopeTrace(local_88);

+LAB_3:

+  CMFPropVariant::Clear((CMFPropVariant *)&local_80);

+  return lVar4;

+}

+
```

## `CMP4StreamHandler::_GetSampleTime`  (modified)

```diff
--- CMP4StreamHandler::_GetSampleTime
+++ CMP4StreamHandler::_GetSampleTime
@@ -1,2 +1,279 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CMP4StreamHandler::_GetSampleTime : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

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

+/* private: long __cdecl CMP4StreamHandler::_GetSampleTime(unsigned long,__int64 * __ptr64,__int64 *

+   __ptr64,__int64 * __ptr64) __ptr64 */

+

+long __thiscall

+CMP4StreamHandler::_GetSampleTime

+          (CMP4StreamHandler *this,ulong param_1,__int64 *param_2,__int64 *param_3,__int64 *param_4)

+

+{

+  ulong uVar1;

+  longlong lVar2;

+  CQTEditList *this_00;

+  byte bVar3;

+  char cVar4;

+  uchar uVar5;

+  long lVar6;

+  int iVar7;

+  uint uVar8;

+  int iVar9;

+  CallStackContext *pCVar10;

+  undefined8 uVar11;

+  longlong lVar12;

+  longlong lVar13;

+  undefined1 auStackY_d8 [32];

+  CallStackScopeTrace local_98 [8];

+  __uint64 local_90;

+  ulong local_88;

+  __uint64 *local_80;

+  __uint64 local_78;

+  uint local_70 [2];

+  __uint64 local_68;

+  longlong local_60;

+  ulonglong local_58;

+  

+  local_58 = __security_cookie ^ (ulonglong)auStackY_d8;

+  local_80 = (__uint64 *)param_3;

+  if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+    CallStackTracing::InitInstance();

+  }

+  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+    pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance);

+    uVar8 = *(uint *)(pCVar10 + 0x7c4);

+    if (uVar8 < *(uint *)(pCVar10 + 0x7c8)) {

+      *(char **)(pCVar10 + (ulonglong)uVar8 * 0x10) = "CMP4StreamHandler::_GetSampleTime";

+      *(undefined4 *)(pCVar10 + (ulonglong)uVar8 * 0x10 + 8) = 0x486;

+    }

+    *(int *)(pCVar10 + 0x7c4) = *(int *)(pCVar10 + 0x7c4) + 1;

+  }

+  local_70[0] = 0;

+  local_78 = 0;

+  local_90 = 0;

+  local_68 = 0;

+  local_88 = param_1;

+  iVar7 = (**(code **)(*(longlong *)this + 0x10))(this,local_70);

+  if (iVar7 < 0) {

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar10 + 0x7cc) != iVar7)) {

+      CallStackContext::TraceFailure(pCVar10,"CMP4StreamHandler::_GetSampleTime",0x491,iVar7);

+    }

+    uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar5 == '\0') goto LAB_1;

+    uVar11 = 0x6b;

+  }

+  else if (param_1 < local_70[0]) {

+    if ((*(longlong *)(this + 0x40) != 0) &&

+       (lVar2 = *(longlong *)(*(longlong *)(this + 0x40) + 0xb0), lVar2 != 0)) {

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

+        if (param_1 < *(uint *)(lVar2 + 0x570)) {

+          lVar13 = 0;

+          for (lVar12 = lVar2 + 0xb8; lVar12 != 0; lVar12 = *(longlong *)(lVar12 + 0x4b0)) {

+            uVar8 = *(uint *)(lVar12 + 8);

+            if ((uVar8 <= param_1) && (param_1 < uVar8 + 0x14)) {

+              uVar8 = param_1 - uVar8;

+              if ((*(byte *)((longlong)

+                             &CTSparseBlock<unsigned_long,CSeiMessage*___ptr64,20,0>::

+                              s_bSingleBitMasks + (ulonglong)(uVar8 & 7)) &

+                  *(byte *)((ulonglong)(uVar8 >> 3) + 0x48 + lVar12)) != 0) {

+                lVar13 = (ulonglong)uVar8 * 0x38 + 0x50 + lVar12;

+              }

+              break;

+            }

+          }

+          param_1 = *(ulong *)(lVar13 + 0x20);

+        }

+        else {

+          param_1 = (*(int *)(lVar2 + 0x58c) - *(uint *)(lVar2 + 0x570)) + param_1;

+        }

+      }

+      if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+        CallStackTracing::InitInstance();

+      }

+      if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+        pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance);

+        uVar8 = *(uint *)(pCVar10 + 0x7c4);

+        if (uVar8 < *(uint *)(pCVar10 + 0x7c8)) {

+          *(char **)(pCVar10 + (ulonglong)uVar8 * 0x10) = "CQTEditList::GetOriginalSampleIndex";

+          *(undefined4 *)(pCVar10 + (ulonglong)uVar8 * 0x10 + 8) = 0x5554;

+        }

+        *(int *)(pCVar10 + 0x7c4) = *(int *)(pCVar10 + 0x7c4) + 1;

+      }

+      bVar3 = _MFControlLevel_CTRLGUID_MF_PIPELINE::GetLevel();

+      if (0xf < bVar3) {

+        WPP_SF_qdd(*(undefined8 *)(WPP_GLOBAL_Control + 0x38),0x65d,

+                   &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,lVar2);

+      }

+      CallStackScopeTrace::~CallStackScopeTrace(local_98);

+    }

+    uVar1 = param_1 + 1;

+    uVar8 = (**(code **)(**(longlong **)(this + 8) + 0x108))();

+    if (param_1 < uVar8) {

+      local_60 = 0;

+      if ((*(CQTSampleTable **)(this + 0x38) == (CQTSampleTable *)0x0) ||

+         (lVar6 = CQTSampleTable::GetSampleTime

+                            (*(CQTSampleTable **)(this + 0x38),uVar1,(__int64 *)&local_78,

+                             (__int64 *)&local_90,(__int64 *)&local_68), lVar6 < 0)) {

+        iVar7 = (**(code **)(**(longlong **)(this + 8) + 0x110))

+                          (*(longlong **)(this + 8),uVar1,&local_78,&local_68);

+        if (iVar7 < 0) {

+          if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+            CallStackTracing::InitInstance();

+          }

+          if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+             (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+             *(int *)(pCVar10 + 0x7cc) != iVar7)) {

+            CallStackContext::TraceFailure(pCVar10,"CMP4StreamHandler::_GetSampleTime",0x4a6,iVar7);

+          }

+          uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+          if (uVar5 == '\0') goto LAB_1;

+          uVar11 = 0x6d;

+          goto LAB_2;

+        }

+        local_90 = local_78;

+        if ((*(longlong **)(this + 0x10) != (longlong *)0x0) &&

+           (cVar4 = (**(code **)(**(longlong **)(this + 0x10) + 0x110))(), cVar4 != '\0')) {

+          iVar7 = (**(code **)(**(longlong **)(this + 0x10) + 0x118))

+                            (*(longlong **)(this + 0x10),uVar1,&local_60);

+          if (iVar7 < 0) {

+            if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+               ((CallStackTracing::s_wpInstance =

+                      (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                   (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+              CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+            }

+            if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+               (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance)

+               , *(int *)(pCVar10 + 0x7cc) != iVar7)) {

+              CallStackContext::TraceFailure

+                        (pCVar10,"CMP4StreamHandler::_GetSampleTime",0x4ab,iVar7);

+            }

+            uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+            if (uVar5 == '\0') goto LAB_1;

+            uVar11 = 0x6e;

+            goto LAB_2;

+          }

+          if (local_60 != 0) {

+            local_78 = local_78 + local_60;

+          }

+        }

+      }

+      if (*(longlong *)(this + 0x40) != 0) {

+        this_00 = *(CQTEditList **)(*(longlong *)(this + 0x40) + 0xb0);

+        iVar7 = 0;

+        if (this_00 != (CQTEditList *)0x0) {

+          iVar7 = CQTEditList::AdjustTimestamps(this_00,local_88,&local_78,&local_90,&local_68);

+        }

+        if (iVar7 < 0) {

+          if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+            CallStackTracing::InitInstance();

+          }

+          if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+             (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+             *(int *)(pCVar10 + 0x7cc) != iVar7)) {

+            CallStackContext::TraceFailure(pCVar10,"CMP4StreamHandler::_GetSampleTime",0x4b6,iVar7);

+          }

+          uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+          if (uVar5 == '\0') goto LAB_1;

+          uVar11 = 0x6f;

+          goto LAB_2;

+        }

+      }

+      if (param_2 != (__int64 *)0x0) {

+        *param_2 = local_78;

+      }

+      if (local_80 != (__uint64 *)0x0) {

+        *local_80 = local_90;

+      }

+      if (param_4 != (__int64 *)0x0) {

+        *param_4 = local_68;

+      }

+LAB_3:

+      bVar3 = _MFControlLevel_CTRLGUID_MF_PIPELINE::GetLevel();

+      if (0x1f < bVar3) {

+        WPP_SF_qDii(*(undefined8 *)(WPP_GLOBAL_Control + 0x38),0x72);

+      }

+      goto LAB_1;

+    }

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

+      iVar7 = -0x7fffbffb;

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar10 + 0x7cc) != -0x7fffbffb)) {

+        CallStackContext::TraceFailure

+                  (pCVar10,"CMP4StreamHandler::_GetSampleTime",0x4d0,-0x7fffbffb);

+      }

+      uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar5 == '\0') goto LAB_1;

+      uVar11 = 0x71;

+      iVar7 = -0x7fffbffb;

+    }

+    else {

+      iVar7 = (**(code **)(**(longlong **)(this + 8) + 0x108))();

+      iVar7 = CTrackFragment::GetSampleTime

+                        (*(CTrackFragment **)(this + 0x48),param_1 - iVar7,(__uint64 *)param_2,

+                         local_80,(__uint64 *)param_4);

+      if (-1 < iVar7) goto LAB_3;

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+         (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+         *(int *)(pCVar10 + 0x7cc) != iVar7)) {

+        CallStackContext::TraceFailure(pCVar10,"CMP4StreamHandler::_GetSampleTime",0x4cb,iVar7);

+      }

+      uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar5 == '\0') goto LAB_1;

+      uVar11 = 0x70;

+    }

+  }

+  else {

+    iVar7 = -0x7ff8ffa9;

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar10 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar10 + 0x7cc) != -0x7ff8ffa9)) {

+      CallStackContext::TraceFailure(pCVar10,"CMP4StreamHandler::_GetSampleTime",0x495,-0x7ff8ffa9);

+    }

+    uVar5 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar5 == '\0') goto LAB_1;

+    uVar11 = 0x6c;

+    iVar7 = -0x7ff8ffa9;

+  }

+LAB_2:

+  WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar11,

+            &WPP_c6a8f43bf48b3c7417f1c6cff1fc71bb_Traceguids,this);

+LAB_1:

+  CallStackScopeTrace::~CallStackScopeTrace(local_98);

+  return iVar7;

+}

+
```

## `CQTSampleTable::FinalParseAtom`  (modified)

```diff
--- CQTSampleTable::FinalParseAtom
+++ CQTSampleTable::FinalParseAtom
@@ -1,2 +1,665 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CQTSampleTable::FinalParseAtom : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

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

+   guard_dispatch_icall */

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

+/* protected: virtual long __cdecl CQTSampleTable::FinalParseAtom(void) __ptr64 */

+

+long __thiscall CQTSampleTable::FinalParseAtom(CQTSampleTable *this)

+

+{

+  CallStackTracing *pCVar1;

+  MFDynamicArray<CMpeg4TrackConfig> *this_00;

+  undefined8 *puVar2;

+  longlong lVar3;

+  longlong *plVar4;

+  undefined8 uVar5;

+  undefined8 uVar6;

+  undefined8 uVar7;

+  bool bVar8;

+  int iVar9;

+  DWORD DVar10;

+  DWORD DVar11;

+  uint uVar12;

+  int iVar13;

+  undefined4 uVar14;

+  undefined4 uVar15;

+  uint uVar16;

+  uint uVar17;

+  uint uVar18;

+  CallStackTracing *pCVar19;

+  CallStackContext *pCVar20;

+  CQTAtom *pCVar21;

+  ulonglong uVar22;

+  longlong lVar23;

+  ulong uVar24;

+  undefined8 uVar25;

+  uint uVar26;

+  uint uVar27;

+  undefined1 auStack_b8 [32];

+  undefined8 local_98;

+  undefined8 local_90;

+  undefined8 local_88;

+  undefined8 local_80;

+  CallStackScopeTrace local_78 [8];

+  int local_70;

+  undefined4 uStack_6c;

+  longlong lStack_68;

+  longlong local_60;

+  longlong lStack_58;

+  longlong local_50;

+  longlong local_48;

+  longlong local_40;

+  ulonglong local_38;

+  

+  local_38 = __security_cookie ^ (ulonglong)auStack_b8;

+  CallStackScopeTrace::CallStackScopeTrace(local_78,"CQTSampleTable::FinalParseAtom",0x354c);

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

+    uVar12 = 0xdeba0002;

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    pCVar19 = CallStackTracing::s_wpInstance;

+    if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+      pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+      DVar10 = GetLastError();

+      pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+      if ((pCVar19 == (CallStackTracing *)0x0) &&

+         (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+        if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+           ((CallStackTracing::s_wpInstance =

+                  (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+            CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+            (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                               (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+          CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+        }

+        pCVar20 = (CallStackContext *)(*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+        if (pCVar20 != (CallStackContext *)0x0) {

+          pCVar19 = (CallStackTracing *)pCVar20;

+        }

+      }

+      SetLastError(DVar10);

+      if (*(int *)(pCVar19 + 0x7cc) != -0x2145fffe) {

+        CallStackContext::TraceFailure

+                  ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x354f,-0x2145fffe);

+      }

+    }

+    if (g_wppLevels != (MFWppLevels)0x0) {

+      local_98 = CONCAT44(local_98._4_4_,0xdeba0002);

+      WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3b9,

+                &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this);

+    }

+    goto LAB_1;

+  }

+  if ((((*(longlong *)(this + 0xc0) == 0) || (*(longlong *)(this + 0xd0) == 0)) ||

+      (*(longlong *)(this + 0xd8) == 0)) || (*(longlong *)(this + 0xe0) == 0)) {

+    local_50 = 0;

+    iVar9 = (**(code **)(*(longlong *)(this + 0x18) + 0x58))(this + 0x18,&DAT_2,&local_50);

+    if ((iVar9 < 0) || (iVar9 = (**(code **)(*(longlong *)(local_50 + 0xd8) + 0x30))(), iVar9 == 0))

+    {

+      uVar25 = *(undefined8 *)(this + 0xe0);

+      uVar12 = 0xdeba0002;

+      uVar5 = *(undefined8 *)(this + 0xd8);

+      uVar6 = *(undefined8 *)(this + 0xd0);

+      uVar7 = *(undefined8 *)(this + 0xc0);

+      uVar24 = (**(code **)(*(longlong *)(this + 0x18) + 0x18))(this + 0x18);

+      local_98 = uVar7;

+      local_90 = uVar6;

+      local_88 = uVar5;

+      local_80 = uVar25;

+      CQTAtom::ReportAtomParsingError

+                ((CQTAtom *)this,-0x2145fffe,uVar24,

+                 (ushort *)

+                 L"CQTSampleTable::FinalParseAtom missing required atoms stts (%p), stsz (%p), stsc (%p), stco (%p)"

+                );

+      goto LAB_1;

+    }

+    lVar3 = *(longlong *)(this + 0xc0);

+    if (lVar3 != 0) {

+      (**(code **)(*(longlong *)(lVar3 + 0x18) + 0x10))(lVar3 + 0x18);

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

+    }

+    pCVar21 = CQTTimeToSampleMapAtom::Create();

+    *(CQTAtom **)(this + 0xc0) = pCVar21;

+    if (pCVar21 == (CQTAtom *)0x0) {

+      uVar12 = 0x8007000e;

+      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+      }

+      pCVar19 = CallStackTracing::s_wpInstance;

+      if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+        pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+        DVar10 = GetLastError();

+        pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+        if ((pCVar19 == (CallStackTracing *)0x0) &&

+           (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+          if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+             ((CallStackTracing::s_wpInstance =

+                    (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+              CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+              (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                 (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+            CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+          }

+          pCVar20 = (CallStackContext *)(*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)()

+          ;

+          if (pCVar20 != (CallStackContext *)0x0) {

+            pCVar19 = (CallStackTracing *)pCVar20;

+          }

+        }

+        SetLastError(DVar10);

+        if (*(int *)(pCVar19 + 0x7cc) != -0x7ff8fff2) {

+          CallStackContext::TraceFailure

+                    ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x356d,-0x7ff8fff2

+                    );

+        }

+      }

+      if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+      uVar25 = 0x3ba;

+    }

+    else {

+      lVar3 = *(longlong *)(this + 0xd0);

+      if (lVar3 != 0) {

+        (**(code **)(*(longlong *)(lVar3 + 0x18) + 0x10))(lVar3 + 0x18);

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

+      }

+      pCVar21 = CQTSampleSizeAtom::Create();

+      *(CQTAtom **)(this + 0xd0) = pCVar21;

+      if (pCVar21 == (CQTAtom *)0x0) {

+        uVar12 = 0x8007000e;

+        if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+           ((CallStackTracing::s_wpInstance =

+                  (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+            CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+            (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                               (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+          CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+        }

+        pCVar19 = CallStackTracing::s_wpInstance;

+        if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+          pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+          DVar10 = GetLastError();

+          pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+          if ((pCVar19 == (CallStackTracing *)0x0) &&

+             (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+            if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+               ((CallStackTracing::s_wpInstance =

+                      (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                   (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+              CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+            }

+            pCVar20 = (CallStackContext *)

+                      (*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+            if (pCVar20 != (CallStackContext *)0x0) {

+              pCVar19 = (CallStackTracing *)pCVar20;

+            }

+          }

+          SetLastError(DVar10);

+          if (*(int *)(pCVar19 + 0x7cc) != -0x7ff8fff2) {

+            CallStackContext::TraceFailure

+                      ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x3571,

+                       -0x7ff8fff2);

+          }

+        }

+        if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+        uVar25 = 0x3bb;

+      }

+      else {

+        lVar3 = *(longlong *)(this + 0xd8);

+        if (lVar3 != 0) {

+          (**(code **)(*(longlong *)(lVar3 + 0x18) + 0x10))(lVar3 + 0x18);

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

+        }

+        pCVar21 = CQTSampleToChunkMapAtom::Create();

+        *(CQTAtom **)(this + 0xd8) = pCVar21;

+        if (pCVar21 == (CQTAtom *)0x0) {

+          uVar12 = 0x8007000e;

+          if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+             ((CallStackTracing::s_wpInstance =

+                    (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+              CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+              (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                 (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+            CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+          }

+          pCVar19 = CallStackTracing::s_wpInstance;

+          if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+            pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+            DVar10 = GetLastError();

+            pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+            if ((pCVar19 == (CallStackTracing *)0x0) &&

+               (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+              if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                 ((CallStackTracing::s_wpInstance =

+                        (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                  CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                  (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                     (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+                CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+              }

+              pCVar20 = (CallStackContext *)

+                        (*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+              if (pCVar20 != (CallStackContext *)0x0) {

+                pCVar19 = (CallStackTracing *)pCVar20;

+              }

+            }

+            SetLastError(DVar10);

+            if (*(int *)(pCVar19 + 0x7cc) != -0x7ff8fff2) {

+              CallStackContext::TraceFailure

+                        ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x3575,

+                         -0x7ff8fff2);

+            }

+          }

+          if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+          uVar25 = 0x3bc;

+        }

+        else {

+          lVar3 = *(longlong *)(this + 0xe0);

+          if (lVar3 != 0) {

+            (**(code **)(*(longlong *)(lVar3 + 0x18) + 0x10))(lVar3 + 0x18);

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

+          }

+          pCVar21 = CQTChunkOffsetAtom::Create();

+          *(CQTAtom **)(this + 0xe0) = pCVar21;

+          if (pCVar21 != (CQTAtom *)0x0) goto LAB_3;

+          uVar12 = 0x8007000e;

+          if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+             ((CallStackTracing::s_wpInstance =

+                    (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+              CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+              (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                 (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+            CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+          }

+          pCVar19 = CallStackTracing::s_wpInstance;

+          if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+            pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+            DVar10 = GetLastError();

+            pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+            if ((pCVar19 == (CallStackTracing *)0x0) &&

+               (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+              if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                 ((CallStackTracing::s_wpInstance =

+                        (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                  CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                  (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                     (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+                CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+              }

+              pCVar20 = (CallStackContext *)

+                        (*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+              if (pCVar20 != (CallStackContext *)0x0) {

+                pCVar19 = (CallStackTracing *)pCVar20;

+              }

+            }

+            SetLastError(DVar10);

+            if (*(int *)(pCVar19 + 0x7cc) != -0x7ff8fff2) {

+              CallStackContext::TraceFailure

+                        ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x3579,

+                         -0x7ff8fff2);

+            }

+          }

+          if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+          uVar25 = 0x3bd;

+        }

+      }

+    }

+  }

+  else {

+LAB_3:

+    uVar12 = CQTAtom::FinalParseAtom((CQTAtom *)this);

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

+      plVar4 = *(longlong **)(this + 200);

+      *(undefined4 *)(this + 0xf8) = *(undefined4 *)(*(longlong *)(this + 0xb0) + 0xd4);

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

+        lVar3 = *plVar4;

+        iVar9 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))();

+        iVar13 = (**(code **)(lVar3 + 0x108))(plVar4);

+        if ((iVar13 != iVar9) && (DAT_4 != '\0')) {

+          uVar14 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))();

+          uVar15 = (**(code **)(**(longlong **)(this + 200) + 0x108))();

+          local_90 = CONCAT44(local_90._4_4_,uVar14);

+          local_98 = CONCAT44(local_98._4_4_,uVar15);

+          WPP_SF_qdd(*(undefined8 *)(WPP_GLOBAL_Control + 0x38),0x3bf,

+                     &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this);

+        }

+        bVar8 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_SampleTimingOnDemand>

+                ::__private_IsEnabled

+                          ((FeatureImpl<__WilFeatureTraits_Feature_Servicing_SampleTimingOnDemand> *

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

+                             ::__l2::impl);

+        if (!bVar8) {

+          uVar16 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))();

+          uVar22 = (ulonglong)uVar16 << 5;

+          uVar16 = 0;

+          if (uVar22 < 0x100000000) {

+            if ((uint)uVar22 < 0xa00001) {

+              uVar24 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))();

+              MFDynamicArray<CMpeg4TrackConfig>::Reserve

+                        ((MFDynamicArray<CMpeg4TrackConfig> *)(this + 0xe8),uVar24);

+              uVar27 = 1;

+              for (uVar26 = 1; uVar17 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))(),

+                  uVar26 <= uVar17; uVar26 = uVar26 + 1) {

+                local_48 = 0;

+                local_40 = 0;

+                local_50 = 0;

+                iVar9 = (**(code **)(**(longlong **)(this + 0xc0) + 0x110))

+                                  (*(longlong **)(this + 0xc0),uVar26,&local_48,&local_50);

+                if (iVar9 < 0) {

+                  if (DAT_4 != '\0') {

+                    local_90 = CONCAT44(local_90._4_4_,uVar26);

+                    local_98 = CONCAT44(local_98._4_4_,iVar9);

+                    WPP_SF_qDd(*(undefined8 *)(WPP_GLOBAL_Control + 0x38));

+                  }

+                  *(undefined4 *)(this + 0xf0) = 0;

+                  _o_free(*(undefined8 *)(this + 0xe8));

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

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

+                  uVar12 = uVar16;

+                  break;

+                }

+                this_00 = (MFDynamicArray<CMpeg4TrackConfig> *)(this + 0xe8);

+                iVar9 = (**(code **)(**(longlong **)(this + 200) + 0x118))

+                                  (*(longlong **)(this + 200),uVar26,&local_40);

+                local_70 = uVar26 - 1;

+                uStack_6c = 0;

+                if (-1 < iVar9) {

+                  lStack_68 = local_48;

+                  local_60 = local_48 + local_40;

+                  lStack_58 = local_50;

+                  uVar17 = uVar16;

+                  if (*(int *)(this + 0xf0) == *(int *)(this + 0xf4)) {

+                    bVar8 = wil::details::

+                            FeatureImpl<__WilFeatureTraits_Feature_Servicing_MFDynamicArrayOverflowCheck>

+                            ::__private_IsEnabled

+                                      ((FeatureImpl<__WilFeatureTraits_Feature_Servicing_MFDynamicArrayOverflowCheck>

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

+                                           ::__l2::impl);

+                    if (!bVar8) {

+                      uVar12 = *(uint *)(this + 0xf4);

+                      if (uVar12 < 0x32) {

+                        uVar24 = uVar12 + 5;

+                      }

+                      else if (uVar12 < 0x96) {

+                        uVar24 = uVar12 + 0xf;

+                      }

+                      else {

+                        uVar24 = uVar12 + 0x1e;

+                      }

+                      uVar12 = MFDynamicArray<CMpeg4TrackConfig>::Reserve(this_00,uVar24);

+                      uVar17 = uVar12;

+joined_r0x0001800e15de:

+                      if (-1 < (int)uVar12) goto LAB_5;

+                      goto LAB_6;

+                    }

+                    uVar12 = *(uint *)(this + 0xf4);

+                    if (uVar12 < 0x32) {

+                      uVar18 = uVar12 + 5;

+                    }

+                    else {

+                      uVar18 = uVar12 + 0xf;

+                      if (0x95 < uVar12) {

+                        uVar18 = uVar12 + 0x1e;

+                      }

+                    }

+                    uVar24 = 0xffffffff;

+                    if (uVar18 >= uVar12) {

+                      uVar24 = uVar18;

+                    }

+                    uVar12 = -(uint)(uVar18 < uVar12) & 0x80070216;

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

+                      uVar12 = MFDynamicArray<CMpeg4TrackConfig>::Reserve(this_00,uVar24);

+                      goto joined_r0x0001800e15de;

+                    }

+                  }

+                  else {

+LAB_5:

+                    uVar12 = uVar17;

+                    uVar17 = *(uint *)(this + 0xf0);

+                    lVar3 = *(longlong *)this_00;

+                    puVar2 = (undefined8 *)((ulonglong)uVar17 * 0x20 + lVar3);

+                    *puVar2 = CONCAT44(uStack_6c,local_70);

+                    puVar2[1] = lStack_68;

+                    plVar4 = (longlong *)((ulonglong)uVar17 * 0x20 + 0x10 + lVar3);

+                    *plVar4 = local_60;

+                    plVar4[1] = lStack_58;

+                    *(int *)(this + 0xf0) = *(int *)(this + 0xf0) + 1;

+LAB_6:

+                    if (-1 < (int)uVar12) goto LAB_7;

+                  }

+                  if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                     ((CallStackTracing::s_wpInstance =

+                            (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                      CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                      (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                         (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+                    CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+                  }

+                  pCVar19 = CallStackTracing::s_wpInstance;

+                  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+                    pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+                    DVar10 = GetLastError();

+                    pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+                    if ((pCVar19 == (CallStackTracing *)0x0) &&

+                       (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+                      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                         ((CallStackTracing::s_wpInstance =

+                                (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                          CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                          (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                             (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0))))

+                      {

+                        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+                      }

+                      pCVar20 = (CallStackContext *)

+                                (*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+                      if (pCVar20 != (CallStackContext *)0x0) {

+                        pCVar19 = (CallStackTracing *)pCVar20;

+                      }

+                    }

+                    SetLastError(DVar10);

+                    if (*(uint *)(pCVar19 + 0x7cc) != uVar12) {

+                      CallStackContext::TraceFailure

+                                ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x35b8

+                                 ,uVar12);

+                    }

+                  }

+                  if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+                  uVar25 = 0x3c2;

+                  goto LAB_8;

+                }

+                lStack_68 = local_48;

+                local_60 = local_48;

+                lStack_58 = local_50;

+                uVar17 = uVar16;

+                if (*(int *)(this + 0xf0) == *(int *)(this + 0xf4)) {

+                  bVar8 = wil::details::

+                          FeatureImpl<__WilFeatureTraits_Feature_Servicing_MFDynamicArrayOverflowCheck>

+                          ::__private_IsEnabled

+                                    ((FeatureImpl<__WilFeatureTraits_Feature_Servicing_MFDynamicArrayOverflowCheck>

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

+                                         ::__l2::impl);

+                  if (!bVar8) {

+                    uVar12 = *(uint *)(this + 0xf4);

+                    if (uVar12 < 0x32) {

+                      uVar24 = uVar12 + 5;

+                    }

+                    else if (uVar12 < 0x96) {

+                      uVar24 = uVar12 + 0xf;

+                    }

+                    else {

+                      uVar24 = uVar12 + 0x1e;

+                    }

+                    uVar12 = MFDynamicArray<CMpeg4TrackConfig>::Reserve(this_00,uVar24);

+                    uVar17 = uVar12;

+joined_r0x0001800e16ba:

+                    if (-1 < (int)uVar12) goto LAB_9;

+                    goto LAB_10;

+                  }

+                  uVar12 = *(uint *)(this + 0xf4);

+                  if (uVar12 < 0x32) {

+                    uVar18 = uVar12 + 5;

+                  }

+                  else {

+                    uVar18 = uVar12 + 0xf;

+                    if (0x95 < uVar12) {

+                      uVar18 = uVar12 + 0x1e;

+                    }

+                  }

+                  uVar24 = 0xffffffff;

+                  if (uVar18 >= uVar12) {

+                    uVar24 = uVar18;

+                  }

+                  uVar12 = -(uint)(uVar18 < uVar12) & 0x80070216;

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

+                    uVar12 = MFDynamicArray<CMpeg4TrackConfig>::Reserve(this_00,uVar24);

+                    goto joined_r0x0001800e16ba;

+                  }

+LAB_11:

+                  if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                     ((CallStackTracing::s_wpInstance =

+                            (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                      CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                      (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                         (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+                    CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+                  }

+                  pCVar19 = CallStackTracing::s_wpInstance;

+                  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+                    pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+                    DVar10 = GetLastError();

+                    pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+                    if ((pCVar19 == (CallStackTracing *)0x0) &&

+                       (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+                      if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+                         ((CallStackTracing::s_wpInstance =

+                                (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                          CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                          (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                             (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0))))

+                      {

+                        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+                      }

+                      pCVar20 = (CallStackContext *)

+                                (*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+                      if (pCVar20 != (CallStackContext *)0x0) {

+                        pCVar19 = (CallStackTracing *)pCVar20;

+                      }

+                    }

+                    SetLastError(DVar10);

+                    if (*(uint *)(pCVar19 + 0x7cc) != uVar12) {

+                      CallStackContext::TraceFailure

+                                ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x35c1

+                                 ,uVar12);

+                    }

+                  }

+                  if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+                  uVar25 = 0x3c3;

+                  goto LAB_8;

+                }

+LAB_9:

+                uVar12 = uVar17;

+                uVar17 = *(uint *)(this + 0xf0);

+                lVar3 = *(longlong *)this_00;

+                puVar2 = (undefined8 *)((ulonglong)uVar17 * 0x20 + lVar3);

+                *puVar2 = CONCAT44(uStack_6c,local_70);

+                puVar2[1] = lStack_68;

+                plVar4 = (longlong *)((ulonglong)uVar17 * 0x20 + 0x10 + lVar3);

+                *plVar4 = local_60;

+                plVar4[1] = lStack_58;

+                *(int *)(this + 0xf0) = *(int *)(this + 0xf0) + 1;

+LAB_10:

+                if ((int)uVar12 < 0) goto LAB_11;

+LAB_7:

+              }

+              _o_qsort(*(undefined8 *)(this + 0xe8),*(undefined4 *)(this + 0xf0),0x20,

+                       <lambda_bc369429c26e396582e5a7f2070309ba>::<lambda_invoker_cdecl>);

+              if (1 < *(uint *)(this + 0xf0)) {

+                do {

+                  lVar3 = *(longlong *)(this + 0xe8);

+                  lVar23 = (ulonglong)(uVar27 - 1) * 0x20;

+                  uVar22 = (ulonglong)uVar27;

+                  uVar27 = uVar27 + 1;

+                  *(longlong *)(lVar23 + 0x18 + lVar3) =

+                       *(longlong *)(uVar22 * 0x20 + 0x10 + lVar3) -

+                       *(longlong *)(lVar23 + 0x10 + lVar3);

+                } while (uVar27 < *(uint *)(this + 0xf0));

+              }

+              _o_qsort(*(undefined8 *)(this + 0xe8),*(undefined4 *)(this + 0xf0),0x20,

+                       <lambda_078681a4fad92e7db7354914d437890f>::<lambda_invoker_cdecl>);

+              goto LAB_1;

+            }

+          }

+          else {

+            uVar22 = 0xffffffff;

+          }

+          if (DAT_4 != '\0') {

+            local_90 = CONCAT44(local_90._4_4_,0xa00000);

+            local_98 = CONCAT44(local_98._4_4_,(int)uVar22);

+            WPP_SF_qdd(*(undefined8 *)(WPP_GLOBAL_Control + 0x38),0x3c0,

+                       &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this);

+          }

+          *(undefined4 *)(this + 0xf0) = 0;

+          _o_free(*(undefined8 *)(this + 0xe8));

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

+          uVar12 = 0;

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

+        }

+      }

+      goto LAB_1;

+    }

+    if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+       ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+        CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+        (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                           (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+      CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+    }

+    pCVar19 = CallStackTracing::s_wpInstance;

+    if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+      pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+      DVar10 = GetLastError();

+      pCVar19 = TlsGetValue(*(DWORD *)(pCVar19 + 0xc));

+      if ((pCVar19 == (CallStackTracing *)0x0) &&

+         (DVar11 = GetLastError(), pCVar19 = pCVar1, DVar11 == 0)) {

+        if ((CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) &&

+           ((CallStackTracing::s_wpInstance =

+                  (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+            CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+            (iVar9 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                               (CallStackTracing::s_wpInstance,0x7f0), iVar9 == 0)))) {

+          CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+        }

+        pCVar20 = (CallStackContext *)(*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+        if (pCVar20 != (CallStackContext *)0x0) {

+          pCVar19 = (CallStackTracing *)pCVar20;

+        }

+      }

+      SetLastError(DVar10);

+      if (*(uint *)(pCVar19 + 0x7cc) != uVar12) {

+        CallStackContext::TraceFailure

+                  ((CallStackContext *)pCVar19,"CQTSampleTable::FinalParseAtom",0x357d,uVar12);

+      }

+    }

+    if (g_wppLevels == (MFWppLevels)0x0) goto LAB_1;

+    uVar25 = 0x3be;

+  }

+LAB_8:

+  local_98 = CONCAT44(local_98._4_4_,uVar12);

+  WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar25,

+            &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this);

+LAB_1:

+  CallStackScopeTrace::~CallStackScopeTrace(local_78);

+  return uVar12;

+}

+
```

## `CBitstreamReader::PopN`  (modified)

```diff
--- CBitstreamReader::PopN
+++ CBitstreamReader::PopN
@@ -1,2 +1,204 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CBitstreamReader::PopN : 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 CBitstreamReader::PopN(int,unsigned long * __ptr64) __ptr64 */

+

+long __thiscall CBitstreamReader::PopN(CBitstreamReader *this,int param_1,ulong *param_2)

+

+{

+  CBitstreamReader *pCVar1;

+  byte bVar2;

+  uint uVar3;

+  uint uVar4;

+  longlong lVar5;

+  uchar uVar6;

+  int iVar7;

+  CallStackContext *pCVar8;

+  uint uVar9;

+  undefined8 uVar10;

+  uint uVar11;

+  uint uVar12;

+  CBitstreamReader CVar13;

+  uint uVar14;

+  uint uVar15;

+  CallStackTracing *this_00;

+  uint uVar16;

+  int local_res18 [2];

+  

+  uVar11 = 0;

+  if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+    CallStackTracing::InitInstance();

+  }

+  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+    pCVar8 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance);

+    uVar12 = *(uint *)(pCVar8 + 0x7c4);

+    if (uVar12 < *(uint *)(pCVar8 + 0x7c8)) {

+      *(char **)(pCVar8 + (ulonglong)uVar12 * 0x10) = "CBitstreamReader::PopN";

+      *(undefined4 *)(pCVar8 + (ulonglong)uVar12 * 0x10 + 8) = 0xd0;

+    }

+    *(int *)(pCVar8 + 0x7c4) = *(int *)(pCVar8 + 0x7c4) + 1;

+  }

+  this_00 = CallStackTracing::s_wpInstance;

+  if (param_2 == (ulong *)0x0) {

+    if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+      CallStackTracing::InitInstance();

+    }

+    uVar12 = 0x80004003;

+    if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+       (pCVar8 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+       *(int *)(pCVar8 + 0x7cc) != -0x7fffbffd)) {

+      CallStackContext::TraceFailure(pCVar8,"CBitstreamReader::PopN",0xd0,-0x7fffbffd);

+    }

+    uVar6 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar6 == '\0') goto LAB_0;

+    uVar10 = 0x12;

+  }

+  else {

+    *param_2 = 0;

+    if (param_1 < 0) {

+      uVar12 = 0x80070057;

+      if ((this_00 == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar7 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                             (CallStackTracing::s_wpInstance,0x7f0),

+          this_00 = CallStackTracing::s_wpInstance, iVar7 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_1;

+        this_00 = (CallStackTracing *)&DAT_1;

+      }

+      if ((this_00[8] != (CallStackTracing)0x0) &&

+         (pCVar8 = CallStackTracing::GetThreadRelativeContext(this_00),

+         *(int *)(pCVar8 + 0x7cc) != -0x7ff8ffa9)) {

+        CallStackContext::TraceFailure(pCVar8,"CBitstreamReader::PopN",0xd5,-0x7ff8ffa9);

+      }

+      uVar6 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar6 == '\0') goto LAB_0;

+      uVar10 = 0x13;

+    }

+    else {

+      uVar3 = *(uint *)(this + 0xc);

+      uVar16 = *(uint *)(this + 8);

+      uVar14 = *(uint *)(this + 0x10);

+      uVar12 = (uint)param_1 >> 0x1f;

+      if ((uVar3 - uVar16) * 8 - uVar14 < (uint)param_1) {

+        uVar12 = 0x80004005;

+        if ((this_00 == (CallStackTracing *)0x0) &&

+           ((CallStackTracing::s_wpInstance =

+                  (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+            CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+            (iVar7 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                               (CallStackTracing::s_wpInstance,0x7f0),

+            this_00 = CallStackTracing::s_wpInstance, iVar7 == 0)))) {

+          CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_1;

+          this_00 = (CallStackTracing *)&DAT_1;

+        }

+        if ((this_00[8] != (CallStackTracing)0x0) &&

+           (pCVar8 = CallStackTracing::GetThreadRelativeContext(this_00),

+           *(int *)(pCVar8 + 0x7cc) != -0x7fffbffb)) {

+          CallStackContext::TraceFailure(pCVar8,"CBitstreamReader::PopN",0xd9,-0x7fffbffb);

+        }

+        uVar6 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+        if (uVar6 == '\0') goto LAB_0;

+        uVar10 = 0x14;

+      }

+      else {

+        if (param_1 == 0) goto LAB_0;

+        if ((uVar14 != 0) || (param_1 != 8)) {

+          pCVar1 = this + 0x14;

+          uVar16 = uVar11;

+          for (local_res18[0] = 0; local_res18[0] < param_1; local_res18[0] = local_res18[0] + 1) {

+            if (uVar14 == 0) {

+              if (uVar3 <= *(uint *)(this + 8)) {

+                uVar12 = 0x8000ffff;

+                if ((this_00 == (CallStackTracing *)0x0) &&

+                   ((CallStackTracing::s_wpInstance =

+                          (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+                    CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+                    (iVar7 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                                       (CallStackTracing::s_wpInstance,0x7f0),

+                    this_00 = CallStackTracing::s_wpInstance, iVar7 == 0)))) {

+                  CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_1;

+                  this_00 = (CallStackTracing *)&DAT_1;

+                }

+                if ((this_00[8] != (CallStackTracing)0x0) &&

+                   (pCVar8 = CallStackTracing::GetThreadRelativeContext(this_00),

+                   *(int *)(pCVar8 + 0x7cc) != -0x7fff0001)) {

+                  CallStackContext::TraceFailure(pCVar8,"CBitstreamReader::PopN",0xfa,-0x7fff0001);

+                }

+                uVar6 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+                if (uVar6 == '\0') goto LAB_0;

+                uVar10 = 0x16;

+                goto LAB_2;

+              }

+              *pCVar1 = *(CBitstreamReader *)((ulonglong)*(uint *)(this + 8) + *(longlong *)this);

+            }

+            CVar13 = *pCVar1;

+            *pCVar1 = (CBitstreamReader)((char)CVar13 * '\x02');

+            uVar16 = (uint)((byte)CVar13 >> 7) | uVar16 * 2;

+            uVar14 = uVar14 + 1;

+            *(uint *)(this + 0x10) = uVar14;

+            if (uVar14 == 8) {

+              uVar4 = *(uint *)(this + 8);

+              *(undefined4 *)(this + 0x10) = 0;

+              uVar9 = uVar4 + 1;

+              *(uint *)(this + 8) = uVar9;

+              CVar13 = (CBitstreamReader)0x0;

+              if (uVar9 < uVar3) {

+                CVar13 = *(CBitstreamReader *)((ulonglong)uVar9 + *(longlong *)this);

+              }

+              this[0x14] = CVar13;

+              uVar15 = 0;

+              uVar14 = uVar11;

+              if (((((this[0x15] != (CBitstreamReader)0x0) && (uVar14 = uVar15, uVar9 < uVar3)) &&

+                   (1 < uVar9)) &&

+                  ((lVar5 = *(longlong *)this, *(char *)((ulonglong)(uVar4 - 1) + lVar5) == '\0' &&

+                   (*(char *)((ulonglong)uVar4 + lVar5) == '\0')))) &&

+                 (*(char *)((ulonglong)uVar9 + lVar5) == '\x03')) {

+                *(uint *)(this + 8) = uVar4 + 2;

+              }

+            }

+          }

+          *param_2 = uVar16;

+          goto LAB_0;

+        }

+        if (uVar16 < uVar3) {

+          bVar2 = *(byte *)((ulonglong)uVar16 + *(longlong *)this);

+          *(uint *)(this + 8) = uVar16 + 1;

+          *param_2 = (uint)bVar2;

+          if (*(uint *)(this + 8) < *(uint *)(this + 0xc)) {

+            uVar11 = (uint)*(byte *)((ulonglong)*(uint *)(this + 8) + *(longlong *)this);

+          }

+          this[0x14] = SUB41(uVar11,0);

+          goto LAB_0;

+        }

+        uVar12 = 0x8000ffff;

+        if ((this_00 == (CallStackTracing *)0x0) &&

+           ((CallStackTracing::s_wpInstance =

+                  (CallStackTracing *)MFGetCallStackTracingWeakReference(),

+            CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+            (iVar7 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                               (CallStackTracing::s_wpInstance,0x7f0),

+            this_00 = CallStackTracing::s_wpInstance, iVar7 == 0)))) {

+          CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_1;

+          this_00 = (CallStackTracing *)&DAT_1;

+        }

+        if ((this_00[8] != (CallStackTracing)0x0) &&

+           (pCVar8 = CallStackTracing::GetThreadRelativeContext(this_00),

+           *(int *)(pCVar8 + 0x7cc) != -0x7fff0001)) {

+          CallStackContext::TraceFailure(pCVar8,"CBitstreamReader::PopN",0xe4,-0x7fff0001);

+        }

+        uVar6 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+        if (uVar6 == '\0') goto LAB_0;

+        uVar10 = 0x15;

+LAB_2:

+        uVar12 = 0x8000ffff;

+      }

+    }

+  }

+  WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),uVar10,

+            &WPP_4a034bfb94a036f1275e68247e1b0a55_Traceguids,this,uVar12);

+LAB_0:

+  CallStackScopeTrace::~CallStackScopeTrace((CallStackScopeTrace *)local_res18);

+  return uVar12;

+}

+
```

## `CTPtrArray<_stTRUNEntry,20>::GetAt`  (modified)

```diff
--- CTPtrArray<_stTRUNEntry,20>::GetAt
+++ CTPtrArray<_stTRUNEntry,20>::GetAt
@@ -1,2 +1,47 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CTPtrArray<_stTRUNEntry,20>::GetAt : Error: Decompile error: 
-Marshaling error: Did not see expected closing element+

+/* public: int __cdecl CTPtrArray<struct _stTRUNEntry,20>::GetAt(unsigned long,struct _stTRUNEntry *

+   __ptr64 * __ptr64)const __ptr64 */

+

+int __thiscall

+CTPtrArray<_stTRUNEntry,20>::GetAt

+          (CTPtrArray<_stTRUNEntry,20> *this,ulong param_1,_stTRUNEntry **param_2)

+

+{

+  uint uVar1;

+  _stTRUNEntry *p_Var2;

+  CTPtrArray<_stTRUNEntry,20> *pCVar3;

+  

+  p_Var2 = (_stTRUNEntry *)0x0;

+  *param_2 = (_stTRUNEntry *)0x0;

+  if (param_1 < *(uint *)(this + 200)) {

+    for (pCVar3 = this; pCVar3 != (CTPtrArray<_stTRUNEntry,20> *)0x0;

+        pCVar3 = *(CTPtrArray<_stTRUNEntry,20> **)(pCVar3 + 0xc0)) {

+      uVar1 = *(uint *)(pCVar3 + 8);

+      if ((uVar1 <= param_1) && (param_1 < uVar1 + 0x14)) {

+        uVar1 = param_1 - uVar1;

+        if ((*(byte *)((longlong)

+                       &CTSparseBlock<unsigned_long,CSeiMessage*___ptr64,20,0>::s_bSingleBitMasks +

+                      (ulonglong)(uVar1 & 7)) & (byte)pCVar3[(ulonglong)(uVar1 >> 3) + 0x18]) != 0)

+        {

+          p_Var2 = *(_stTRUNEntry **)(pCVar3 + (ulonglong)uVar1 * 8 + 0x20);

+          uVar1 = 0;

+          goto LAB_0;

+        }

+        break;

+      }

+    }

+    uVar1 = 0x80004005;

+    if (((byte)this[0xc] & 1) != 0) {

+      p_Var2 = *(_stTRUNEntry **)(this + 0x10);

+      uVar1 = 0;

+    }

+LAB_0:

+    *param_2 = p_Var2;

+    uVar1 = ~uVar1 >> 0x1f;

+  }

+  else {

+    uVar1 = 0;

+  }

+  return uVar1;

+}

+
```

## `CQTChunkLargeOffsetAtom::GetChunkOffset`  (modified)

```diff
--- CQTChunkLargeOffsetAtom::GetChunkOffset
+++ CQTChunkLargeOffsetAtom::GetChunkOffset
@@ -1,2 +1,118 @@
-Failed to decompile mfmp4srcsnk.dll - .ProgramDB CQTChunkLargeOffsetAtom::GetChunkOffset : 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: virtual long __cdecl CQTChunkLargeOffsetAtom::GetChunkOffset(unsigned long,unsigned

+   __int64 * __ptr64) __ptr64 */

+

+long __thiscall

+CQTChunkLargeOffsetAtom::GetChunkOffset

+          (CQTChunkLargeOffsetAtom *this,ulong param_1,__uint64 *param_2)

+

+{

+  CallStackTracing *pCVar1;

+  uint uVar2;

+  ulonglong uVar3;

+  uchar uVar4;

+  DWORD dwErrCode;

+  DWORD DVar5;

+  CallStackTracing *pCVar6;

+  longlong lVar7;

+  CallStackContext *pCVar8;

+  CallStackTracing *pCVar9;

+  int iVar10;

+  long lVar11;

+  CallStackScopeTrace local_38 [16];

+  

+  lVar11 = 0;

+  if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+    CallStackTracing::InitInstance();

+  }

+  pCVar9 = CallStackTracing::s_wpInstance;

+  if (CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) {

+    pCVar1 = CallStackTracing::s_wpInstance + 0xd0;

+    dwErrCode = GetLastError();

+    pCVar6 = TlsGetValue(*(DWORD *)(pCVar9 + 0xc));

+    if ((pCVar6 == (CallStackTracing *)0x0) && (DVar5 = GetLastError(), pCVar6 = pCVar1, DVar5 == 0)

+       ) {

+      if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+        CallStackTracing::InitInstance();

+      }

+      pCVar9 = (CallStackTracing *)(*(code *)**(undefined8 **)CallStackTracing::s_wpInstance)();

+      if (pCVar9 != (CallStackTracing *)0x0) {

+        pCVar6 = pCVar9;

+      }

+    }

+    SetLastError(dwErrCode);

+    pCVar9 = CallStackTracing::s_wpInstance;

+    uVar2 = *(uint *)(pCVar6 + 0x7c4);

+    if (uVar2 < *(uint *)(pCVar6 + 0x7c8)) {

+      *(char **)(pCVar6 + (ulonglong)uVar2 * 0x10) = "CQTChunkLargeOffsetAtom::GetChunkOffset";

+      *(undefined4 *)(pCVar6 + (ulonglong)uVar2 * 0x10 + 8) = 0x33ca;

+    }

+    *(int *)(pCVar6 + 0x7c4) = *(int *)(pCVar6 + 0x7c4) + 1;

+  }

+  if (param_2 == (__uint64 *)0x0) {

+    if (pCVar9 == (CallStackTracing *)0x0) {

+      CallStackTracing::InitInstance();

+      pCVar9 = CallStackTracing::s_wpInstance;

+    }

+    lVar11 = -0x7fffbffd;

+    if ((pCVar9[8] != (CallStackTracing)0x0) &&

+       (pCVar8 = CallStackTracing::GetThreadRelativeContext(pCVar9),

+       *(int *)(pCVar8 + 0x7cc) != -0x7fffbffd)) {

+      CallStackContext::TraceFailure

+                (pCVar8,"CQTChunkLargeOffsetAtom::GetChunkOffset",0x33cc,-0x7fffbffd);

+    }

+    uVar4 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+    if (uVar4 != '\0') {

+      WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3a5,

+                &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this + -0xb8,0x80004003);

+    }

+    CallStackScopeTrace::~CallStackScopeTrace(local_38);

+  }

+  else {

+    if ((param_1 == 0) || (*(uint *)(this + 8) < param_1)) {

+      lVar11 = -0x7ff8ffa9;

+      if ((pCVar9 == (CallStackTracing *)0x0) &&

+         ((CallStackTracing::s_wpInstance = (CallStackTracing *)MFGetCallStackTracingWeakReference()

+          , CallStackTracing::s_wpInstance == (CallStackTracing *)0x0 ||

+          (iVar10 = (**(code **)(*(longlong *)CallStackTracing::s_wpInstance + 8))

+                              (CallStackTracing::s_wpInstance,0x7f0),

+          pCVar9 = CallStackTracing::s_wpInstance, iVar10 == 0)))) {

+        CallStackTracing::s_wpInstance = (CallStackTracing *)&DAT_0;

+        pCVar9 = (CallStackTracing *)&DAT_0;

+      }

+      if ((pCVar9[8] != (CallStackTracing)0x0) &&

+         (pCVar8 = CallStackTracing::GetThreadRelativeContext(pCVar9),

+         pCVar9 = CallStackTracing::s_wpInstance, *(int *)(pCVar8 + 0x7cc) != -0x7ff8ffa9)) {

+        CallStackContext::TraceFailure

+                  (pCVar8,"CQTChunkLargeOffsetAtom::GetChunkOffset",0x33d4,-0x7ff8ffa9);

+        pCVar9 = CallStackTracing::s_wpInstance;

+      }

+      uVar4 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

+      if (uVar4 != '\0') {

+        WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3a6,

+                  &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this + -0xb8,0x80070057);

+        pCVar9 = CallStackTracing::s_wpInstance;

+      }

+    }

+    else {

+      lVar7 = (**(code **)(*(longlong *)(this + -0xb8) + 0xa0))();

+      uVar3 = *(ulonglong *)(lVar7 + 4 + (ulonglong)(param_1 - 1) * 8);

+      *param_2 = uVar3 >> 0x38 | (uVar3 & 0xff000000000000) >> 0x28 |

+                 (uVar3 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 |

+                 (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28 |

+                 uVar3 << 0x38;

+      pCVar9 = CallStackTracing::s_wpInstance;

+    }

+    if (pCVar9[8] != (CallStackTracing)0x0) {

+      pCVar8 = CallStackTracing::GetThreadRelativeContext(pCVar9);

+      if ((*(int *)(pCVar8 + 0x7c4) != 0) &&

+         (iVar10 = *(int *)(pCVar8 + 0x7c4) + -1, *(int *)(pCVar8 + 0x7c4) = iVar10, iVar10 == 0)) {

+        CallStackContext::ClearState(pCVar8);

+      }

+    }

+  }

+  return lVar11;

+}

+
```

## `CallStackScopeTrace::~CallStackScopeTrace`  (modified)

```diff
--- CallStackScopeTrace::~CallStackScopeTrace
+++ CQTSampleTable::GetSampleTime
@@ -1,30 +1,187 @@
 

-void __thiscall

-CTSparseBlock<unsigned_long,CMPEG4MediaSourcePlugin::STREAM_PARSE_STATE*___ptr64,20,1>::

-~CallStackScopeTrace(CallStackScopeTrace *this)

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

+   guard_dispatch_icall */

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

+/* WARNING: Type propagation algorithm not settling */

+/* public: long __cdecl CQTSampleTable::GetSampleTime(unsigned long,__int64 * __ptr64,__int64 *

+   __ptr64,__int64 * __ptr64) __ptr64 */

+

+long __thiscall

+CQTSampleTable::GetSampleTime

+          (CQTSampleTable *this,ulong param_1,__int64 *param_2,__int64 *param_3,__int64 *param_4)

 

 {

-  uchar uVar1;

+  bool bVar1;

+  char cVar2;

+  int iVar3;

+  int iVar4;

+  uint uVar5;

+  uint uVar6;

   CallStackContext *this_00;

-  LPCRITICAL_SECTION unaff_RBX;

-  CallStackTracing unaff_DIL;

+  longlong lVar7;

+  longlong lVar8;

+  longlong lVar9;

+  uint uVar10;

+  undefined1 auStack_f8 [32];

+  int local_d8;

+  CallStackScopeTrace local_c8 [4];

+  uint local_c4;

+  undefined4 local_c0;

+  undefined4 uStack_bc;

+  undefined4 uStack_b8;

+  undefined4 uStack_b4;

+  undefined4 local_b0;

+  undefined4 uStack_ac;

+  undefined4 uStack_a8;

+  undefined4 uStack_a4;

+  undefined4 local_a0;

+  undefined4 uStack_9c;

+  undefined4 uStack_98;

+  undefined4 uStack_94;

+  undefined4 local_90;

+  undefined4 uStack_8c;

+  undefined4 uStack_88;

+  undefined4 uStack_84;

+  __int64 local_80;

+  longlong local_78;

+  longlong local_70;

+  longlong local_68;

+  longlong local_60 [4];

   

-  if (this == (CallStackScopeTrace *)0x0) {

-    CallStackTracing::InitInstance();

-    this = (CallStackScopeTrace *)CallStackTracing::s_wpInstance;

-  }

-  if (*(CallStackTracing *)(this + 8) != unaff_DIL) {

-    this_00 = CallStackTracing::GetThreadRelativeContext((CallStackTracing *)this);

-    if (*(int *)(this_00 + 0x7cc) != -0x3ff2c17c) {

-      CallStackContext::TraceFailure(this_00,"CMFMediaStream::RequestSample",0x2d5,-0x3ff2c17c);

+  local_60[2] = __security_cookie ^ (ulonglong)auStack_f8;

+  iVar3 = 0;

+  CallStackScopeTrace::CallStackScopeTrace(local_c8,"CQTSampleTable::GetSampleTime",0x35f9);

+  bVar1 = wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_SampleTimingOnDemand>::

+          __private_IsEnabled((FeatureImpl<__WilFeatureTraits_Feature_Servicing_SampleTimingOnDemand>

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

+                                  ::__l2::impl);

+  if (bVar1) {

+    if (((param_1 != 0) && (*(longlong **)(this + 0xc0) != (longlong *)0x0)) &&

+       (uVar10 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))(), param_1 <= uVar10)) {

+      local_80 = 0;

+      local_78 = 0;

+      iVar3 = (**(code **)(**(longlong **)(this + 0xc0) + 0x110))

+                        (*(longlong **)(this + 0xc0),param_1,&local_80,&local_78);

+      if (iVar3 < 0) {

+        if (CallStackTracing::s_wpInstance == (CallStackTracing *)0x0) {

+          CallStackTracing::InitInstance();

+        }

+        if ((CallStackTracing::s_wpInstance[8] != (CallStackTracing)0x0) &&

+           (this_00 = CallStackTracing::GetThreadRelativeContext(CallStackTracing::s_wpInstance),

+           *(int *)(this_00 + 0x7cc) != iVar3)) {

+          CallStackContext::TraceFailure(this_00,"CQTSampleTable::GetSampleTime",0x3605,iVar3);

+        }

+        if (g_wppLevels != (MFWppLevels)0x0) {

+          local_d8 = iVar3;

+          WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x3c5,

+                    &WPP_0f2683c2608d38f5ecbb88742fed5573_Traceguids,this);

+        }

+      }

+      else {

+        if (param_3 != (__int64 *)0x0) {

+          *param_3 = local_80;

+        }

+        if ((*(longlong **)(this + 200) != (longlong *)0x0) &&

+           (cVar2 = (**(code **)(**(longlong **)(this + 200) + 0x110))(), cVar2 != '\0')) {

+          local_70 = 0;

+          iVar4 = (**(code **)(**(longlong **)(this + 200) + 0x118))

+                            (*(longlong **)(this + 200),param_1,&local_70);

+          if (-1 < iVar4) {

+            lVar8 = local_70 + local_80;

+            *param_2 = lVar8;

+            uVar5 = (**(code **)(**(longlong **)(this + 0xc0) + 0x108))();

+            uVar10 = param_1 - 0x10;

+            if (param_1 < 0x11) {

+              uVar10 = 1;

+            }

+            lVar9 = 0x7fffffffffffffff;

+            uVar6 = param_1 + 0x10;

+            if (uVar5 < param_1 + 0x10) {

+              uVar6 = uVar5;

+            }

+            lVar7 = *(longlong *)(this + 0xc0);

+            local_c0 = *(undefined4 *)(lVar7 + 200);

+            uStack_bc = *(undefined4 *)(lVar7 + 0xcc);

+            uStack_b8 = *(undefined4 *)(lVar7 + 0xd0);

+            uStack_b4 = *(undefined4 *)(lVar7 + 0xd4);

+            local_b0 = *(undefined4 *)(lVar7 + 0xd8);

+            uStack_ac = *(undefined4 *)(lVar7 + 0xdc);

+            uStack_a8 = *(undefined4 *)(lVar7 + 0xe0);

+            uStack_a4 = *(undefined4 *)(lVar7 + 0xe4);

+            lVar7 = *(longlong *)(this + 200);

+            local_a0 = *(undefined4 *)(lVar7 + 200);

+            uStack_9c = *(undefined4 *)(lVar7 + 0xcc);

+            uStack_98 = *(undefined4 *)(lVar7 + 0xd0);

+            uStack_94 = *(undefined4 *)(lVar7 + 0xd4);

+            local_90 = *(undefined4 *)(lVar7 + 0xd8);

+            uStack_8c = *(undefined4 *)(lVar7 + 0xdc);

+            uStack_88 = *(undefined4 *)(lVar7 + 0xe0);

+            uStack_84 = *(undefined4 *)(lVar7 + 0xe4);

+            local_c4 = uVar6;

+            if (uVar10 <= uVar6) {

+              do {

+                if (uVar10 != param_1) {

+                  local_68 = 0;

+                  local_60[1] = 0;

+                  local_60[0] = 0;

+                  iVar4 = (**(code **)(**(longlong **)(this + 0xc0) + 0x110))

+                                    (*(longlong **)(this + 0xc0),uVar10,&local_68,local_60 + 1);

+                  uVar6 = local_c4;

+                  if (((-1 < iVar4) &&

+                      (iVar4 = (**(code **)(**(longlong **)(this + 200) + 0x118))

+                                         (*(longlong **)(this + 200),uVar10,local_60),

+                      uVar6 = local_c4, -1 < iVar4)) &&

+                     ((lVar7 = local_60[0] + local_68, lVar8 < lVar7 && (lVar7 < lVar9)))) {

+                    lVar9 = lVar7;

+                  }

+                }

+                uVar10 = uVar10 + 1;

+              } while (uVar10 <= uVar6);

+            }

+            lVar7 = *(longlong *)(this + 0xc0);

+            *(undefined4 *)(lVar7 + 200) = local_c0;

+            *(undefined4 *)(lVar7 + 0xcc) = uStack_bc;

+            *(undefined4 *)(lVar7 + 0xd0) = uStack_b8;

+            *(undefined4 *)(lVar7 + 0xd4) = uStack_b4;

+            *(undefined4 *)(lVar7 + 0xd8) = local_b0;

+            *(undefined4 *)(lVar7 + 0xdc) = uStack_ac;

+            *(undefined4 *)(lVar7 + 0xe0) = uStack_a8;

+            *(undefined4 *)(lVar7 + 0xe4) = uStack_a4;

+            lVar7 = *(longlong *)(this + 200);

+            *(undefined4 *)(lVar7 + 200) = local_a0;

+            *(undefined4 *)(lVar7 + 0xcc) = uStack_9c;

+            *(undefined4 *)(lVar7 + 0xd0) = uStack_98;

+            *(undefined4 *)(lVar7 + 0xd4) = uStack_94;

+            *(undefined4 *)(lVar7 + 0xd8) = local_90;

+            *(undefined4 *)(lVar7 + 0xdc) = uStack_8c;

+            *(undefined4 *)(lVar7 + 0xe0) = uStack_88;

+            *(undefined4 *)(lVar7 + 0xe4) = uStack_84;

+            lVar7 = local_78;

+            if (lVar9 != 0x7fffffffffffffff) {

+              lVar7 = lVar9 - lVar8;

+            }

+            *param_4 = lVar7;

+            goto LAB_0;

+          }

+        }

+        *param_2 = local_80;

+        *param_4 = local_78;

+      }

+      goto LAB_0;

     }

   }

-  uVar1 = _MFControlLevel_CTRLGUID_MF_PLATFORM::GetLevel();

-  if (uVar1 != '\0') {

-    WPP_SF_ql(*(undefined8 *)(WPP_GLOBAL_Control + 0x10),0x39);

+  else if ((param_1 != 0) && (param_1 <= *(uint *)(this + 0xf0))) {

+    if (param_3 != (__int64 *)0x0) {

+      *param_3 = *(__int64 *)((ulonglong)(param_1 - 1) * 0x20 + 8 + *(longlong *)(this + 0xe8));

+    }

+    lVar8 = (ulonglong)(param_1 - 1) * 0x20;

+    *param_2 = *(__int64 *)(*(longlong *)(this + 0xe8) + 0x10 + lVar8);

+    *param_4 = *(__int64 *)(*(longlong *)(this + 0xe8) + 0x18 + lVar8);

+    goto LAB_0;

   }

-  LeaveCriticalSection(unaff_RBX);

-  CallStackScopeTrace::~CallStackScopeTrace((CallStackScopeTrace *)&stack0x00000060);

-  return;

+  iVar3 = -0x7ff8fb70;

+LAB_0:

+  CallStackScopeTrace::~CallStackScopeTrace(local_c8);

+  return iVar3;

 }
```

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

```diff
--- API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::GetLastError calling
+++ API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::GetLastError calling
@@ -17,0 +18 @@
+CQTChunkLargeOffsetAtom::GetChunkOffset
@@ -20,0 +22 @@
+CQTSampleTable::FinalParseAtom
```

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

```diff
--- API-MS-WIN-CORE-PROCESSTHREADS-L1-1-0.DLL::TlsGetValue calling
+++ API-MS-WIN-CORE-PROCESSTHREADS-L1-1-0.DLL::TlsGetValue calling
@@ -1,0 +2 @@
+CQTChunkLargeOffsetAtom::GetChunkOffset
@@ -3,0 +5 @@
+CQTSampleTable::FinalParseAtom
```

## `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
@@ -18 +18 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_26_02_NonSec>::GetCachedFeatureEnabledState
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_SampleTimingOnDemand>::GetCachedFeatureEnabledState
@@ -20,0 +21 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_Standalone_Future>::GetCachedFeatureEnabledState
@@ -23 +23,0 @@
-wil::details::FeatureImpl<__WilFeatureTraits_Feature_TestLoc1Perf>::GetCachedFeatureEnabledState
@@ -25,0 +26 @@
+wil::details::FeatureImpl<__WilFeatureTraits_Feature_UxAccOptimization>::GetCachedFeatureEnabledState
```

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

```diff
--- API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::SetLastError calling
+++ API-MS-WIN-CORE-ERRORHANDLING-L1-1-0.DLL::SetLastError calling
@@ -1,0 +2 @@
+CQTChunkLargeOffsetAtom::GetChunkOffset
@@ -3,0 +5 @@
+CQTSampleTable::FinalParseAtom
```
