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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2a8]
sub rsp, 0x380
mov rax, qword [0x140035008]
xor rax, rsp
mov qword [rbp + 0x270], rax
mov rdi, rcx
xor r15d, r15d
xor eax, eax
lock cmpxchg dword [rcx + 0x16c], r15d
je 0x14000d38b
xor eax, eax
lock cmpxchg dword [rcx + 0x168], r15d
je 0x14000d38b
xor eax, eax
lock cmpxchg dword [rcx + 0x170], r15d
je 0x14000d38b
lea r14d, [r15 + 1]
mov eax, r14d
lock xadd dword [rcx + 0x164], eax
add eax, r14d
cmp eax, dword [rcx + 0x1bc]
jbe 0x14000cb4a
lock add dword [rcx + 0x18c], r14d
lock dec dword [rcx + 0x164]
jmp 0x14000d38b
mov dword [rbp + 0x200], 0x70
mov rcx, qword [rcx + 0x118]
mov rax, qword [rcx]
lea r8, [rbp + 0x200]
mov edx, dword [rdi + 0x124]
mov rax, qword [rax + 0x68]
call qword [0x140026788]
test eax, eax
jns 0x14000cbed
mov ecx, 0x23312245
mov dword [rsp + 0x58], eax
lea rax, [0x1400292c4]
mov qword [rbp - 0x78], rax
xor eax, eax
mov word [rbp - 0x70], ax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov word [rsp + 0x5c], r15w
lea rax, [rsp + 0x78]
lea r13, [0x1400291f0]
lea r12, [0x140027e80]
lea r15, [0x140027ea8]
lea r14, str.SH_ErrorCode
mov qword [rbp - 0x80], r13
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSample
call fcn.140009b50
jmp 0x14000d384
mov eax, dword [rdi + 0x1c4]
cmp dword [rbp + 0x260], eax
jbe 0x14000ccc2
lock add dword [rdi + 0x190], r14d
mov qword [rsp + 0x60], r15
mov rcx, qword [rdi + 0x70]
mov rax, qword [rcx]
lea rdx, [rsp + 0x60]
mov rax, qword [rax + 0x50]
call qword [0x140026788]
test eax, eax
jns 0x14000cc30
mov ecx, 0x130851f
jmp 0x14000cb7e
mov rcx, qword [rdi + 0x118]
mov rax, qword [rcx]
mov r8, qword [rsp + 0x60]
mov edx, dword [rdi + 0x124]
mov rax, qword [rax + 0x38]
call qword [0x140026788]
test eax, eax
jns 0x14000d384
lea r14, str.SH_ErrorCode
mov qword [rbp - 0x30], r14
mov dword [rbp - 0x28], eax
mov word [rbp - 0x24], r15w
lea r15, [0x140027ea8]
mov qword [rbp - 0x38], r15
lea r12, [0x140027e80]
mov qword [rbp + 0xb8], r12
lea r13, [0x1400291f0]
mov qword [rbp + 0xc0], r13
lea rax, str.m_spSinkWriter__SendStreamTick_m_videoStreamIndex__timestamp_
mov qword [rbp + 0xc8], rax
xor eax, eax
mov word [rbp + 0xd0], ax
lea rax, [rbp - 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xb8]
mov ecx, 0x1308520
jmp 0x14000cbd7
mov qword [rsp + 0x40], r15
mov byte [rbp - 0x58], r15b
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x68], xmm0
mov byte [rbp - 0x40], r15b
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
cmp qword [rdi + 0x118], r15
je 0x14000d384
cmp dword [rdi + 0x124], 0xffffffff
je 0x14000d384
lea rbx, [rdi + 0x78]
mov rsi, r15
mov qword [rsp + 0x70], r15
test rbx, rbx
je 0x14000cd1b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rsi, rbx
mov qword [rsp + 0x70], rbx
mov edx, dword [rdi + 0x12c]
lea eax, [rdx + 1]
mov dword [rdi + 0x12c], eax
mov rcx, qword [rdi + 0x70]
test edx, edx
jne 0x14000cd49
mov qword [rdi + 0x58], r15
mov rax, qword [rcx]
movabs rdx, 0x7fffffffffffffff
mov rax, qword [rax + 0x68]
jmp 0x14000cd55
mov rax, qword [rcx]
lea rdx, [rsp + 0x40]
mov rax, qword [rax + 0x50]
call qword [0x140026788]
test eax, eax
jns 0x14000cd6b
mov edx, eax
mov rcx, rdi
call fcn.14000fad0
jmp 0x14000cd7e
mov rax, qword [rdi + 0x58]
cmp qword [rsp + 0x40], rax
jge 0x14000cd95
lock add dword [rdi + 0x18c], r14d
test rsi, rsi
je 0x14000d384
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14000d384
cmp byte [rbp - 0x58], r15b
jne 0x14000cda9
lea rcx, [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov byte [rbp - 0x58], r14b
mov rbx, r15
mov rax, qword [rdi + 0x110]
mov edx, dword [rax + 0x20]
sub edx, dword [rax + 0x18]
mov ecx, dword [rax + 0x24]
sub ecx, dword [rax + 0x1c]
movzx eax, word [rax + 0x28]
imul eax, ecx
imul eax, edx
cdq
and edx, 7
lea r14d, [rdx + rax]
sar r14d, 3
mov qword [rsp + 0x38], r15
lea rcx, [rsp + 0x38]
call qword [sym.imp.MFPlat.DLL_MFCreateSample]
mov esi, eax
test eax, eax
jns 0x14000ce67
lea r14, str.SH_ErrorCode
mov qword [rbp - 0x18], r14
mov dword [rbp - 0x10], eax
mov word [rbp - 0xc], r15w
lea r15, [0x140027ea8]
mov qword [rbp - 0x20], r15
lea r12, [0x140027e80]
mov qword [rbp + 0xd8], r12
lea r13, [0x1400291f0]
mov qword [rbp + 0xe0], r13
lea rax, str.MFCreateSample_spSample_
mov qword [rbp + 0xe8], rax
xor eax, eax
mov word [rbp + 0xf0], ax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xd8]
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSampleFromScreen
mov ecx, 0x13085cd
call fcn.140009b50
jmp 0x14000d1d6
mov qword [rsp + 0x30], r15
lea rdx, [rsp + 0x30]
mov ecx, r14d
call qword [sym.imp.MFPlat.DLL_MFCreateMemoryBuffer]
mov esi, eax
test eax, eax
jns 0x14000cf0e
lea r14, str.SH_ErrorCode
mov qword [rbp], r14
mov dword [rbp + 8], eax
mov word [rbp + 0xc], r15w
lea r15, [0x140027ea8]
mov qword [rbp - 8], r15
lea r12, [0x140027e80]
mov qword [rbp + 0xf8], r12
lea r13, [0x1400291f0]
mov qword [rbp + 0x100], r13
lea rax, str.MFCreateMemoryBuffer_bufferSize__spBuffer_
mov qword [rbp + 0x108], rax
xor eax, eax
mov word [rbp + 0x110], ax
lea rax, [rbp - 8]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xf8]
mov ecx, 0x13085ce
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSampleFromScreen
call fcn.140009b50
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14000d1d6
jmp 0x14000d1c9
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
mov edx, r14d
mov rax, qword [rax + 0x30]
call qword [0x140026788]
mov esi, eax
test eax, eax
jns 0x14000cf94
lea r14, str.SH_ErrorCode
mov qword [rbp + 0x18], r14
mov dword [rbp + 0x20], eax
mov word [rbp + 0x24], r15w
lea r15, [0x140027ea8]
mov qword [rbp + 0x10], r15
lea r12, [0x140027e80]
mov qword [rbp + 0x118], r12
lea r13, [0x1400291f0]
mov qword [rbp + 0x120], r13
lea rax, str.spBuffer__SetCurrentLength_bufferSize_
mov qword [rbp + 0x128], rax
xor eax, eax
mov word [rbp + 0x130], ax
lea rax, [rbp + 0x10]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x118]
mov ecx, 0x13085cf
jmp 0x14000ceea
mov qword [rsp + 0x68], r15
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
mov rax, qword [rax + 0x18]
call qword [0x140026788]
mov esi, eax
test eax, eax
jns 0x14000d027
lea r14, str.SH_ErrorCode
mov qword [rbp + 0x30], r14
mov dword [rbp + 0x38], eax
mov word [rbp + 0x3c], r15w
lea r15, [0x140027ea8]
mov qword [rbp + 0x28], r15
lea r12, [0x140027e80]
mov qword [rbp + 0x138], r12
lea r13, [0x1400291f0]
mov qword [rbp + 0x140], r13
lea rax, str.spBuffer__Lock_pbBuffer__0__0_
mov qword [rbp + 0x148], rax
xor eax, eax
mov word [rbp + 0x150], ax
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x138]
mov ecx, 0x13085d0
jmp 0x14000ceea
mov rcx, qword [rdi + 0x110]
mov rdx, qword [rsp + 0x68]
prefetchw byte [rdi + 0x178]
mov eax, dword [rdi + 0x178]
mov r8d, eax
or r8d, r15d
lock cmpxchg dword [rdi + 0x178], r8d
jne 0x14000d040
test eax, eax
setne r9b
mov r8d, r14d
call fcn.140010818
lea r14, str.SH_ErrorCode
lea r15, [0x140027ea8]
lea r12, [0x140027e80]
lea r13, [0x1400291f0]
xor ecx, ecx
test eax, eax
jns 0x14000d0d9
mov qword [rbp + 0x48], r14
mov dword [rbp + 0x50], eax
mov word [rbp + 0x54], cx
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x158], r12
mov qword [rbp + 0x160], r13
lea rax, str.m_spScreenGrabber__CopyDIBFromScreen_pbBuffer__bufferSize___InterlockedOr_m_showCursor__0_____0_
mov qword [rbp + 0x168], rax
mov word [rbp + 0x170], cx
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x158]
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSampleFromScreen
mov ecx, 0x13085d1
call fcn.140009b50
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx]
mov rax, qword [rax + 0x20]
call qword [0x140026788]
mov esi, eax
xor ecx, ecx
test eax, eax
jns 0x14000d13f
mov qword [rbp + 0x60], r14
mov dword [rbp + 0x68], eax
mov word [rbp + 0x6c], cx
mov qword [rbp + 0x58], r15
mov qword [rbp + 0x178], r12
mov qword [rbp + 0x180], r13
lea rax, str.spBuffer__Unlock__
mov qword [rbp + 0x188], rax
mov word [rbp + 0x190], cx
lea rax, [rbp + 0x58]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x178]
mov ecx, 0x13085d2
jmp 0x14000ceea
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x30]
mov rax, qword [rax + 0x150]
call qword [0x140026788]
mov esi, eax
xor ecx, ecx
test eax, eax
jns 0x14000d1b3
mov qword [rbp + 0x78], r14
mov dword [rbp + 0x80], eax
mov word [rbp + 0x84], cx
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x198], r12
mov qword [rbp + 0x1a0], r13
lea rax, str.spSample__AddBuffer_spBuffer_
mov qword [rbp + 0x1a8], rax
mov word [rbp + 0x1b0], cx
lea rax, [rbp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x198]
mov ecx, 0x13085d3
jmp 0x14000ceea
mov rbx, qword [rsp + 0x38]
mov qword [rsp + 0x38], rcx
mov rcx, qword [rsp + 0x30]
xor esi, esi
test rcx, rcx
je 0x14000d1ee
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140026788]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14000d1ee
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140026788]
nop
lea rcx, [rbp - 0x68]
call fcn.1400105bc
xor eax, eax
test esi, esi
js 0x14000d21d
mov rdx, qword [rsp + 0x40]
mov qword [rdi + 0x58], rdx
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x120]
call qword [0x140026788]
mov esi, eax
xor eax, eax
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14000d22f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
test esi, esi
js 0x14000d2e3
cmp byte [rbp - 0x40], al
jne 0x14000d24a
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov byte [rbp - 0x40], 1
mov rcx, qword [rdi + 0x118]
mov rax, qword [rcx]
mov r8, rbx
mov edx, dword [rdi + 0x124]
mov rax, qword [rax + 0x30]
call qword [0x140026788]
mov esi, eax
lea rcx, [rbp - 0x50]
call fcn.1400105bc
xor ecx, ecx
test esi, esi
jns 0x14000d36f
mov qword [rbp + 0x90], r14
mov dword [rbp + 0x98], esi
mov word [rbp + 0x9c], cx
mov qword [rbp + 0x88], r15
mov qword [rbp + 0x1b8], r12
mov qword [rbp + 0x1c0], r13
lea rax, [0x1400292c4]
mov qword [rbp + 0x1c8], rax
mov word [rbp + 0x1d0], cx
lea rax, [rbp + 0x88]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1b8]
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSample
mov ecx, 0x1308523
call fcn.140009b50
mov rcx, qword [rdi + 0x118]
mov rax, qword [rcx]
mov r8, qword [rsp + 0x40]
mov edx, dword [rdi + 0x124]
mov rax, qword [rax + 0x38]
call qword [0x140026788]
xor ecx, ecx
test eax, eax
jns 0x14000d36f
mov qword [rbp + 0xa8], r14
mov dword [rbp + 0xb0], eax
mov word [rbp + 0xb4], cx
mov qword [rbp + 0xa0], r15
mov qword [rbp + 0x1d8], r12
mov qword [rbp + 0x1e0], r13
lea rax, str.m_spSinkWriter__SendStreamTick_m_videoStreamIndex__timestamp_
mov qword [rbp + 0x1e8], rax
mov word [rbp + 0x1f0], cx
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1d8]
mov qword [rsp + 0x20], rax
lea r9, str.CreateVideoSample
mov ecx, 0x1308541
call fcn.140009b50
test rbx, rbx
je 0x14000d384
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x10]
call qword [0x140026788]
lock dec dword [rdi + 0x164]
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.1400237c0
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret