Function at 0x402aaf
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push 0x5c
mov eax, 0x418a86
call fcn.00417888
mov edi, ecx
xor esi, esi
lea edx, [edi + 0xf4]
xor eax, eax
lock cmpxchg dword [edx], esi
test eax, eax
je 0x402ddf
xor edx, edx
lea ecx, [edi + 0xf0]
xor eax, eax
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x402ddf
xor edx, edx
lea ecx, [edi + 0xf8]
xor eax, eax
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x402ddf
xor ebx, ebx
lea esi, [edi + 0xec]
inc ebx
mov dword [ebp - 0x20], esi
mov eax, ebx
lock xadd dword [esi], eax
inc eax
cmp eax, dword [edi + 0x134]
jbe 0x402b26
lock inc dword [edi + 0x114]
jmp 0x402dd9
lea ecx, [edi + 0x12c]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
lock xadd dword [ecx], eax
inc eax
cmp eax, dword [edi + 0x13c]
jbe 0x402bc4
lock inc dword [edi + 0x118]
mov eax, dword [edi + 0x50]
lea edx, [ebp - 0x18]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
test eax, eax
jns 0x402b92
push eax
push 0x41c05c
push str.CMovieRecorderMF::CreateVideoSample
push 0x279
push str.screenrecordercorecapturemfmovierecordermf.cpp
push str._s__d_:__s___s__hr__0x_0.8X_
lea ecx, [edi + 0x10]
push str.ERROR:
push ecx
call fcn.004019c1
add esp, 0x20
jmp 0x402dd3
push dword [ebp - 0x14]
mov eax, dword [edi + 0xbc]
push dword [ebp - 0x18]
push dword [edi + 0xc4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
test eax, eax
jns 0x402dd3
push eax
push str.m_spSinkWriter__SendStreamTick_m_videoStreamIndex__timestamp_
push str.CMovieRecorderMF::CreateVideoSample
push 0x283
jmp 0x402b72
xorps xmm0, xmm0
mov byte [ebp - 0x40], 0
xor esi, esi
movlpd qword [ebp - 0x28], xmm0
mov dword [ebp - 0x10], esi
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
mov byte [ebp - 0x58], 0
movlpd qword [ebp - 0x68], xmm0
movlpd qword [ebp - 0x60], xmm0
cmp dword [edi + 0xbc], esi
je 0x402dbe
cmp dword [edi + 0xc4], 0xffffffff
je 0x402dbe
lea eax, [edi + 0x54]
push eax
lea ecx, [ebp - 0x34]
call fcn.00401c96
mov ecx, dword [edi + 0xcc]
lea eax, [ecx + 1]
mov dword [edi + 0xcc], eax
mov eax, dword [edi + 0x50]
test ecx, ecx
jne 0x402c3d
and dword [edi + 0x40], esi
and dword [edi + 0x44], esi
mov ecx, dword [eax]
push SysReAllocString
push 0xffffffffffffffff
push eax
call dword [ecx + 0x34]
jmp 0x402c47
mov ecx, dword [eax]
lea edx, [ebp - 0x28]
push edx
push eax
call dword [ecx + 0x28]
test eax, eax
jns 0x402c55
push eax
mov ecx, edi
call fcn.00404307
jmp 0x402c6e
mov eax, dword [ebp - 0x24]
cmp eax, dword [edi + 0x44]
jg 0x402c8a
jl 0x402c67
mov eax, dword [ebp - 0x28]
cmp eax, dword [edi + 0x40]
jae 0x402c8a
lock inc dword [edi + 0x114]
cmp dword [ebp - 0x30], esi
sete al
test al, al
jne 0x402dbe
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x402dbe
cmp byte [ebp - 0x40], 0
jne 0x402c9d
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov byte [ebp - 0x40], bl
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.00403d1b
mov esi, eax
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x14], esi
call fcn.00404a2f
test esi, esi
fstp st(0)
mov esi, dword [ebp - 0x10]
js 0x402cd8
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
push eax
mov dword [edi + 0x40], edx
mov dword [edi + 0x44], eax
mov ecx, dword [esi]
push edx
push esi
call dword [ecx + 0x90]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x30], 0
sete al
test al, al
jne 0x402cec
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x14], 0
jl 0x402d5b
cmp byte [ebp - 0x58], 0
jne 0x402d05
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov byte [ebp - 0x58], bl
mov eax, dword [edi + 0xbc]
push esi
push dword [edi + 0xc4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x14], eax
call fcn.00404a2f
mov eax, dword [ebp - 0x14]
fstp st(0)
test eax, eax
jns 0x402de5
push eax
push 0x41c05c
push str.CMovieRecorderMF::CreateVideoSample
push 0x2d7
push str.screenrecordercorecapturemfmovierecordermf.cpp
push str._s__d_:__s___s__hr__0x_0.8X_
lea ecx, [edi + 0x10]
push str.ERROR:
push ecx
call fcn.004019c1
add esp, 0x20
push dword [ebp - 0x24]
mov eax, dword [edi + 0xbc]
push dword [ebp - 0x28]
push dword [edi + 0xc4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
test eax, eax
jns 0x402da2
push eax
push str.m_spSinkWriter__SendStreamTick_m_videoStreamIndex__timestamp_
push str.CMovieRecorderMF::CreateVideoSample
push 0x2f4
push str.screenrecordercorecapturemfmovierecordermf.cpp
push str._s__d_:__s___s__hr__0x_0.8X_
lea ecx, [edi + 0x10]
push str.ERROR:
push ecx
call fcn.004019c1
add esp, 0x20
push dword [ebp - 0x24]
lea eax, [edi + 0x10]
push dword [ebp - 0x28]
push str.CMovieRecorderMF::CreateVideoSample:_SendStreamTick_llu
push 0x41b300
push eax
call fcn.004019c1
add esp, 0x14
mov dword [ebp - 4], 2
test esi, esi
je 0x402dcf
mov eax, dword [esi]
push esi
call dword [eax + 8]
test bl, bl
je 0x402dd9
mov eax, dword [ebp - 0x1c]
lock dec dword [eax]
mov eax, dword [ebp - 0x20]
lock dec dword [eax]
call fcn.00417859
ret
mov eax, dword [edi + 0xbc]
push edi
push dword [edi + 0xc4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
test eax, eax
jns 0x402e29
push eax
push str.hrPlaceMarker
push str.CMovieRecorderMF::CreateVideoSample
push 0x2dd
push str.screenrecordercorecapturemfmovierecordermf.cpp
push str._s__d_:__s___s__hr__0x_0.8X_
lea ecx, [edi + 0x10]
push str.ERROR:
push ecx
call fcn.004019c1
add esp, 0x20
jmp 0x402dbe
xor bl, bl
jmp 0x402dbe