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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
movaps xmmword [rsp + 0xa0], xmm6
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x98], rax
movaps xmm6, xmmword [0x140270690]
movups xmmword [rdx + 0x78], xmm6
mov rdx, qword [rcx]
mov r8, qword [rdx + 8]
mov rcx, qword [rdx + 0x18]
inc r8
xor eax, eax
cmp r8, qword [rdx]
cmove r8, rax
imul rdx, r8, 0xa8
mov r8, qword [rcx + rdx]
mov qword [rsi], r8
mov qword [rcx + rdx], 0
movups xmm0, xmmword [rcx + rdx + 8]
movups xmm1, xmmword [rcx + rdx + 0x18]
movups xmmword [rsi + 0x18], xmm1
movups xmmword [rsi + 8], xmm0
mov r8, qword [rcx + rdx + 0x75]
mov qword [rsi + 0x75], r8
movups xmm0, xmmword [rcx + rdx + 0x68]
movups xmmword [rsi + 0x68], xmm0
movups xmm0, xmmword [rcx + rdx + 0x28]
movups xmm1, xmmword [rcx + rdx + 0x38]
movups xmm2, xmmword [rcx + rdx + 0x48]
movups xmm3, xmmword [rcx + rdx + 0x58]
movups xmmword [rsi + 0x58], xmm3
movups xmmword [rsi + 0x48], xmm2
movups xmmword [rsi + 0x38], xmm1
movups xmmword [rsi + 0x28], xmm0
movzx r8d, byte [rcx + rdx + 0x82]
mov byte [rsi + 0x82], r8b
movzx r8d, word [rcx + rdx + 0x80]
mov word [rsi + 0x80], r8w
mov r8, qword [rcx + rdx + 0x88]
mov qword [rsi + 0x88], r8
mov qword [rcx + rdx + 0x88], 0
mov r8, qword [rcx + rdx + 0x90]
mov qword [rsi + 0x90], r8
mov r8, qword [rcx + rdx + 0x98]
mov qword [rsi + 0x98], r8
mov qword [rcx + rdx + 0x98], 0
mov rcx, qword [rcx + rdx + 0xa0]
mov qword [rsi + 0xa0], rcx
mov rcx, qword [rdi]
mov rdx, qword [rcx + 8]
mov rbx, qword [rcx + 0x18]
inc rdx
cmp rdx, qword [rcx]
cmove rdx, rax
mov qword [rcx + 8], rdx
imul r14, rdx, 0xa8
mov rcx, qword [rbx + r14 + 0x98]
test rcx, rcx
jne 0x140118630
lea r15, [rbx + r14]
mov rbx, qword [rbx + r14 + 0x88]
test rbx, rbx
jne 0x14011865a
mov rcx, qword [r15]
test rcx, rcx
jne 0x1401186be
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
cmp rcx, qword [rax + 8]
jne 0x1401182b4
mov rcx, qword [rax + 0x20]
test rcx, rcx
jne 0x1401188c3
dec qword [rdi + 0x10]
jne 0x14011854f
movabs r15, 0xaaaaaaaaaaaaaaaa
movabs r14, 0x8637bd05af7
cmp dword [rdi + 0x78], 0
jne 0x14011844c
mov r12, qword [rdi + 0x30]
cmp qword [rdi + 8], 0
je 0x140118384
mov qword [rsp + 0x50], r15
mov rax, qword [0x14029bf90]
lea rcx, [0x140179e10]
cmp rax, rcx
jne 0x140118ac5
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x70]
cmp rax, r14
jge 0x140118c1d
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402a2810]
mov qword [rsp + 0x50], rax
cmp rax, qword [rdi + 0x20]
jl 0x140118384
mov rax, qword [rdi + 0x18]
inc rax
cmp rax, 5
mov edx, 4
cmovae rdx, rax
mov rax, qword [rdi]
mov rcx, qword [rdi + 0x10]
mov qword [rdi + 0x18], rcx
test rax, rax
je 0x140118384
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x14011836f
cmp rcx, r8
jb 0x140118a03
lea rbx, [r12 + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1401189c7
mov rax, qword [rdi]
mov rcx, qword [r12 + 0x28]
mov qword [rdi], rcx
mov qword [r12 + 0x28], rax
mov rax, qword [rdi + 8]
mov rcx, qword [r12 + 0x30]
mov qword [rdi + 8], rcx
mov qword [r12 + 0x30], rax
mov rax, qword [rdi + 0x10]
mov rcx, qword [r12 + 0x38]
mov qword [rdi + 0x10], rcx
mov qword [r12 + 0x38], rax
mov rax, qword [rdi + 0x18]
mov rcx, qword [r12 + 0x40]
mov qword [rdi + 0x18], rcx
mov qword [r12 + 0x40], rax
mov rax, qword [rdi + 0x20]
mov rcx, qword [r12 + 0x48]
mov qword [rdi + 0x20], rcx
mov qword [r12 + 0x48], rax
cmp byte [r12 + 0x158], 0
je 0x140118413
mov rdx, qword [rdi]
test rdx, rdx
je 0x140118413
mov r9, qword [rdx + 8]
cmp qword [rdx + 0x10], r9
jne 0x1401186d6
mov rax, qword [r12 + 0xb8]
cmp qword [rax + 0x10], 0
sete byte [r12 + 0x50]
cmp qword [r12 + 0xa8], 0
movzx eax, byte [r12 + 0x128]
je 0x140118643
mov byte [r12 + 0x51], al
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rdi + 8], 0
je 0x1401184f0
mov qword [rsp + 0x50], r15
mov rax, qword [0x14029bf90]
lea rcx, [0x140179e10]
cmp rax, rcx
jne 0x140118aaf
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x70]
cmp rax, r14
jge 0x140118bf6
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402a2810]
mov qword [rsp + 0x50], rax
cmp rax, qword [rdi + 0x20]
jl 0x1401184f0
mov rax, qword [rdi + 0x18]
inc rax
cmp rax, 5
mov edx, 4
cmovae rdx, rax
mov rax, qword [rdi]
mov rcx, qword [rdi + 0x10]
mov qword [rdi + 0x18], rcx
test rax, rax
je 0x1401184f0
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x1401184db
cmp rcx, r8
jb 0x1401189d4
mov r14, qword [rdi + 0x28]
mov rbx, qword [rdi + 0x38]
cmp qword [rdi + 0x10], 0
jne 0x140118557
cmp rbx, 7
jae 0x140118c4a
mov r15, rbx
shl r15, 5
lea rcx, [r14 + r15]
add rcx, 8
xor edx, edx
call fcn.1400079f0
mov rax, qword [r14 + r15 + 0x10]
cmp rax, qword [r14 + r15 + 0x18]
jne 0x1401185f4
mov rax, qword [r14 + 0xe8]
dec dword [rax + rbx*4 + 0x10]
jne 0x1401185f4
mov ecx, dword [rax + 0x30]
btr ecx, ebx
mov qword [rax + 0x30], rcx
jmp 0x1401185f4
mov r14, qword [rdi + 0x28]
mov rbx, qword [rdi + 0x38]
cmp byte [rdi + 0x50], 0
mov rdx, qword [rdi]
mov rcx, qword [rdx + 8]
mov rax, qword [rdx + 0x18]
jne 0x140118836
mov rdx, qword [rdx]
inc rcx
xor r8d, r8d
cmp rcx, rdx
cmove rcx, r8
imul rcx, rcx, 0xa8
mov edx, dword [rax + rcx + 0x78]
mov r9, qword [rax + rcx + 0x30]
test r9, r9
jne 0x140118880
cmp rbx, 7
jae 0x140118c44
shl rbx, 5
mov r9, qword [r14 + rbx + 0x10]
cmp qword [r14 + rbx + 0x18], r9
je 0x140118c47
mov rax, qword [rax + rcx + 0x90]
lea rcx, [r14 + rbx]
add rcx, 8
mov r9, qword [r9 + 0x18]
mov qword [r9 + 0x40], 0xffffffffffffffff
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r8
mov dword [rsp + 0x80], edx
mov qword [rsp + 0x88], rdi
lea r8, [rsp + 0x70]
xor edx, edx
call fcn.140007d20
test byte [0x14029ccf0], 9
jne 0x140118ae5
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.14017e7b0
mov rax, rsi
movaps xmm6, xmmword [rsp + 0xa0]
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lock dec dword [rcx]
jne 0x140118279
call fcn.14017b254
jmp 0x140118279
test al, al
je 0x14011882f
mov al, byte [r12 + 0x130]
xor al, 1
jmp 0x14011843e
lock dec dword [rbx + 8]
jne 0x14011828e
mov rcx, qword [rbx]
mov rax, qword [rcx + 8]
lea rdx, [0x1401e6bb0]
cmp qword [rcx + 0x10], rdx
jne 0x140118a32
lea rcx, [0x140203760]
cmp rax, rcx
jne 0x140118a32
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14011869e
lock dec dword [rcx]
je 0x140118adb
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x1401186b1
lock dec dword [r14]
je 0x1401189b1
mov rcx, rbx
call fcn.14017b254
jmp 0x14011828e
lock dec dword [rcx]
jne 0x14011829a
mov rax, qword [rcx + 0x10]
call qword [case.0x1401e7f70.0]
jmp 0x14011829a
inc r9
mov r8, qword [rdx]
mov rcx, qword [rdx + 0x18]
xor eax, eax
cmp r9, r8
cmovne rax, r9
mov r9, qword [r12 + 0x160]
imul r11, rax, 0xa8
cmp qword [rcx + r11 + 0x28], r9
jge 0x140118748
xor r10d, r10d
jmp 0x14011872c
inc rax
cmp rax, r8
cmove rax, r10
mov rcx, qword [rdx + 0x18]
imul r11, rax, 0xa8
cmp qword [rcx + r11 + 0x28], r9
jge 0x140118748
cmp rax, qword [rdx + 0x10]
jne 0x140118710
mov rdx, qword [rdx + 0x20]
test rdx, rdx
je 0x140118413
mov r8, qword [rdx]
mov rax, qword [rdx + 8]
jmp 0x140118710
add r11, rcx
mov byte [r12 + 0x158], 0
mov edx, dword [r11 + 0x78]
mov r9, qword [r11 + 0x30]
test r9, r9
jne 0x14011892f
xor r8d, r8d
imul rax, rax, 0xa8
mov rax, qword [rcx + rax + 0x90]
cmp byte [r12 + 0x130], 0
lea r13, [r12 + 0x138]
mov qword [r12 + 0x138], rax
mov qword [r12 + 0x140], r8
mov dword [r12 + 0x148], edx
jne 0x1401187ab
mov byte [r12 + 0x130], 1
mov rbp, qword [r12 + 0xb8]
mov eax, dword [r13 + 0x10]
mov dword [rsp + 0x60], eax
movups xmm0, xmmword [r13]
movaps xmmword [rsp + 0x50], xmm0
cmp byte [rbp + 0x50], 0
jne 0x1401188ef
movups xmm0, xmmword [r13]
mov eax, dword [r13 + 0x10]
mov dword [rbp + 0x68], eax
movups xmmword [rbp + 0x58], xmm0
mov byte [rbp + 0x50], 1
cmp byte [r12 + 0x130], 0
je 0x140118aad
mov rbp, qword [r12 + 0xb0]
mov eax, dword [r13 + 0x10]
mov dword [rsp + 0x60], eax
movups xmm0, xmmword [r13]
movaps xmmword [rsp + 0x50], xmm0
cmp byte [rbp + 0x50], 0
jne 0x14011890f
movups xmm0, xmmword [r13]
mov eax, dword [r13 + 0x10]
mov dword [rbp + 0x68], eax
movups xmmword [rbp + 0x58], xmm0
mov byte [rbp + 0x50], 1
jmp 0x140118413
xor eax, eax
jmp 0x14011843e
inc rcx
mov rdx, qword [rdx]
xor r10d, r10d
cmp rcx, rdx
mov r8, rcx
cmove r8, r10
imul r9, r8, 0xa8
mov r8d, dword [rax + r9 + 0x78]
mov r11, qword [rax + r9 + 0x30]
test r11, r11
jne 0x14011896e
mov r11, qword [rdi + 0x58]
cmp qword [rax + r9 + 0x90], r11
je 0x140118c4d
jb 0x140118572
jmp 0x1401184ff
lea r8, [rax + rcx]
cmp dword [r8 + 0x40], 0
jne 0x1401188bb
movabs r10, 0x8000000000000001
mov r8, qword [r8 + 0x38]
lea r11, [r8 + r10]
cmp r11, 2
jb 0x140118c62
lea r10, [r9 + r8]
sar r10, 0x3f
btc r10, 0x3f
add r9, r8
cmovo r9, r10
mov r8, r9
jmp 0x140118595
mov qword [rax + 0x20], 0
mov rbx, qword [rdi]
mov qword [rdi], rcx
test rbx, rbx
je 0x1401182b4
mov rcx, rbx
call fcn.140008120
mov rcx, rbx
call fcn.14017b254
jmp 0x1401182b4
cmp qword [rbp + 0x10], 0
jne 0x140118a45
mov eax, dword [rsp + 0x60]
mov dword [rbp + 0x68], eax
movaps xmm0, xmmword [rsp + 0x50]
movups xmmword [rbp + 0x58], xmm0
jmp 0x1401187e3
cmp qword [rbp + 0x10], 0
jne 0x140118a7a
mov eax, dword [rsp + 0x60]
mov dword [rbp + 0x68], eax
movaps xmm0, xmmword [rsp + 0x50]
movups xmmword [rbp + 0x58], xmm0
jmp 0x140118413
cmp dword [r11 + 0x40], 0
jne 0x140118966
movabs r10, 0x8000000000000001
mov r8, qword [r11 + 0x38]
lea r11, [r8 + r10]
cmp r11, 2
jb 0x140118c7b
lea r10, [r9 + r8]
sar r10, 0x3f
btc r10, 0x3f
add r9, r8
cmovo r9, r10
mov r8, r9
jmp 0x140118768
lea r10, [rax + r9]
cmp dword [r10 + 0x40], 0
jne 0x1401189a9
movabs r15, 0x8000000000000001
mov r10, qword [r10 + 0x38]
lea r12, [r10 + r15]
cmp r12, 2
jb 0x140118c94
lea r15, [r11 + r10]
sar r15, 0x3f
btc r15, 0x3f
add r11, r10
cmovo r11, r15
mov r10, r11
jmp 0x140118863
lea rcx, [r14 + 8]
call fcn.1400091b0
mov rcx, r14
call fcn.14017b254
jmp 0x1401186b1
mov rcx, rbx
call fcn.1400fdfc0
jmp 0x14011839a
mov rcx, rdi
call fcn.1400081b0
mov rax, qword [rsp + 0x50]
mov ecx, 0x4c4b40
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
mov qword [rdi + 0x20], rcx
jmp 0x1401184f0
mov rcx, rdi
call fcn.1400081b0
mov rax, qword [rsp + 0x50]
mov ecx, 0x4c4b40
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
mov qword [rdi + 0x20], rcx
jmp 0x140118384
mov rcx, rbx
mov edx, 1
call qword [case.0x1401e7f70.0]
jmp 0x14011828e
mov rax, qword [rbp]
mov rcx, qword [rax + 8]
inc rcx
xor edx, edx
cmp rcx, qword [rax]
cmovne rdx, rcx
imul rcx, rdx, 0xa8
add rcx, qword [rax + 0x18]
lea rdx, [rsp + 0x70]
call fcn.140156780
cmp byte [rbp + 0x50], 0
jne 0x1401188fa
jmp 0x140118aad
mov rax, qword [rbp]
mov rcx, qword [rax + 8]
inc rcx
xor edx, edx
cmp rcx, qword [rax]
cmovne rdx, rcx
imul rcx, rdx, 0xa8
add rcx, qword [rax + 0x18]
lea rdx, [rsp + 0x70]
call fcn.140156780
cmp byte [rbp + 0x50], 0
jne 0x14011891a
ud2
lea rbx, [rsp + 0x50]
mov rcx, rbx
call qword [case.0x1401e7f70.0]
mov rax, qword [rbx]
jmp 0x1401184aa
lea rbx, [rsp + 0x50]
mov rcx, rbx
call qword [case.0x1401e7f70.0]
mov rax, qword [rbx]
jmp 0x14011833e
call fcn.14017b254
jmp 0x14011869e
mov rbx, qword [rdi + 0x30]
mov rax, qword [rbx + 0x10]
mov edi, dword [rax + 4]
call sub.KERNEL32.dll_GetCurrentThreadId
cmp edi, eax
jne 0x140118601
lea rdi, [rbx + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140118cad
mov r14, qword [rbx + 0x38]
mov rax, qword [rbx + 0xb0]
mov rcx, qword [rbx + 0xb8]
mov r12, qword [rcx + 0x10]
mov r15, qword [rax + 0x10]
mov r13, qword [rbx + 0xd0]
mov rbp, qword [rbx + 0xc8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test byte [0x14029ccf0], 0x19
je 0x140118601
sub r13, rbp
shr r13, 3
imul eax, r13d, 0x3cf3cf3d
add r12d, r14d
add r15d, r12d
add r15d, eax
mov ecx, dword [rbx]
call fcn.1402037c0
mov rdi, rax
lea rbx, [rsp + 0x50]
mov rcx, rbx
call fcn.1401193e0
call sub.KERNEL32.dll_GetCurrentThreadId
lea r14, [rsp + 0x70]
movaps xmmword [r14], xmm6
movaps xmmword [r14 + 0x10], xmm6
movabs rcx, 0xaaaaaaaaaaaaaaaa
mov qword [r14 + 0x20], rcx
mov word [r14], 0x301
lea rcx, [0x140271c65]
mov qword [r14 + 8], rcx
movsxd rcx, r15d
mov qword [r14 + 0x18], rcx
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
lea rdx, [0x14029ccf0]
mov cl, 0x43
mov r8, rdi
xor r9d, r9d
call fcn.140104700
mov rcx, r14
call fcn.140118cc0
jmp 0x140118601
mov rcx, qword [0x1402a2810]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401184a5
mov rcx, qword [0x1402a2810]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140118339
int3
int3
int3
cmp r10, qword [rdi + 0x60]
jne 0x140118c57
cmp r8d, dword [rdi + 0x68]
jl 0x140118572
jmp 0x1401184ff
add r10, r9
cmp r10, 1
ja 0x140118595
cmp r9, r8
je 0x140118595
int3
add r10, r9
cmp r10, 1
ja 0x140118768
cmp r9, r8
je 0x140118768
int3
add r15, r11
cmp r15, 1
ja 0x140118863
cmp r11, r10
je 0x140118863
int3
mov rcx, rdi
call fcn.1400fdfc0
jmp 0x140118b12