Function at 0x140139d20
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, 0xc8
movaps xmmword [rsp + 0xb0], xmm6
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x1402b7040]
xor rax, rsp
mov qword [rsp + 0xa8], rax
movabs r13, 0xaaaaaaaaaaaaaaaa
mov qword [rdx + 0xa0], r13
movaps xmm6, xmmword [0x140275a70]
movups xmmword [rdx + 0x90], xmm6
movups xmmword [rdx + 0x80], xmm6
movups xmmword [rdx + 0x70], xmm6
movups xmmword [rdx + 0x60], xmm6
movups xmmword [rdx + 0x50], xmm6
movups xmmword [rdx + 0x40], xmm6
movups xmmword [rdx + 0x30], xmm6
movups xmmword [rdx + 0x20], xmm6
movups xmmword [rdx + 0x10], xmm6
movups xmmword [rdx], xmm6
mov rax, qword [rcx]
mov rdx, qword [rax]
mov r8, qword [rax + 0x20]
inc rdx
xor ecx, ecx
cmp rdx, r8
cmovne rcx, rdx
cmp rcx, r8
jae 0x14013a471
mov rax, qword [rax + 0x18]
imul rcx, rcx, 0xa8
movups xmm0, xmmword [rax + rcx]
movups xmm1, xmmword [rax + rcx + 0x10]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
movups xmm0, xmmword [rax + rcx + 0x20]
movups xmm1, xmmword [rax + rcx + 0x30]
movups xmm2, xmmword [rax + rcx + 0x40]
movups xmm3, xmmword [rax + rcx + 0x50]
movups xmmword [rsi + 0x20], xmm0
movups xmmword [rsi + 0x30], xmm1
movups xmmword [rsi + 0x40], xmm2
movups xmmword [rsi + 0x50], xmm3
movups xmm0, xmmword [rax + rcx + 0x60]
movups xmmword [rsi + 0x60], xmm0
mov rdx, qword [rax + rcx + 0x6d]
mov qword [rsi + 0x6d], rdx
mov rdx, qword [rax + rcx + 0x78]
mov qword [rsi + 0x78], rdx
mov qword [rax + rcx + 0x78], 0
movzx edx, byte [rax + rcx + 0x82]
mov byte [rsi + 0x82], dl
movzx edx, word [rax + rcx + 0x80]
mov word [rsi + 0x80], dx
mov rdx, qword [rax + rcx + 0x88]
mov qword [rsi + 0x88], rdx
mov qword [rax + rcx + 0x88], 0
mov rdx, qword [rax + rcx + 0x90]
mov qword [rsi + 0x90], rdx
mov rdx, qword [rax + rcx + 0x98]
mov qword [rsi + 0x98], rdx
mov qword [rax + rcx + 0x98], 0
mov rax, qword [rax + rcx + 0xa0]
mov qword [rsi + 0xa0], rax
mov rax, qword [rdi]
mov rdx, qword [rax]
mov r8, qword [rax + 0x20]
inc rdx
xor ecx, ecx
cmp rdx, r8
cmovne rcx, rdx
mov qword [rax], rcx
cmp rcx, r8
jae 0x14013a474
mov rax, qword [rax + 0x18]
imul rcx, rcx, 0xa8
lea r15, [rax + rcx]
mov rcx, qword [rax + rcx + 0x98]
test rcx, rcx
jne 0x14013a232
mov rbx, qword [r15 + 0x88]
test rbx, rbx
jne 0x14013a206
mov rcx, qword [r15 + 0x78]
test rcx, rcx
jne 0x14013a284
mov rax, qword [rdi]
mov rcx, qword [rax + 8]
cmp rcx, qword [rax]
jne 0x140139f03
mov rcx, qword [rax + 0x28]
test rcx, rcx
jne 0x14013a2bc
dec qword [rdi + 0x10]
jne 0x14013a1cd
movabs rbp, 0x8637bd05af7
cmp dword [rdi + 0x70], 0
jne 0x14013a11f
mov r12, qword [rdi + 0x30]
cmp qword [rdi + 8], 0
je 0x140139fd3
mov qword [rsp + 0x58], r13
mov rax, qword [0x1402b9770]
lea rcx, [0x1401869b0]
cmp rax, rcx
jne 0x14013a29c
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x80]
cmp rax, rbp
jge 0x14013a7cc
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402c9700]
mov qword [rsp + 0x58], rax
cmp rax, qword [rdi + 0x20]
jl 0x140139fd3
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 0x140139fd3
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax + 0x20]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x140139fbd
cmp rcx, r8
jb 0x14013a326
lea rbx, [r12 + 0x28]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14013a2e8
mov rax, qword [rdi]
mov rcx, qword [r12 + 0x30]
mov qword [rdi], rcx
mov qword [r12 + 0x30], rax
mov rax, qword [rdi + 8]
mov rcx, qword [r12 + 0x38]
mov qword [rdi + 8], rcx
mov qword [r12 + 0x38], rax
mov rax, qword [rdi + 0x10]
mov rcx, qword [r12 + 0x40]
mov qword [rdi + 0x10], rcx
mov qword [r12 + 0x40], rax
mov rax, qword [rdi + 0x18]
mov rcx, qword [r12 + 0x48]
mov qword [rdi + 0x18], rcx
mov qword [r12 + 0x48], rax
mov rax, qword [rdi + 0x20]
mov rcx, qword [r12 + 0x50]
mov qword [rdi + 0x20], rcx
mov qword [r12 + 0x50], rax
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a417
cmp byte [r12 + 0x148], 1
je 0x14013a477
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a3e5
mov rcx, qword [r12 + 0xa8]
cmp qword [rcx + 0x10], 0
sete byte [r12 + 0x58]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a3fe
movzx ecx, byte [r12 + 0x118]
mov byte [r12 + 0x5b], cl
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a429
cmp qword [r12 + 0x98], 0
jne 0x14013a3c6
mov rax, qword [r12]
mov rcx, qword [r12 + 0x18]
lea rdx, [0x14019ba10]
cmp qword [rax + 0x10], rdx
mov r14d, dword [rcx + 8]
jne 0x14013a215
test r14d, r14d
jne 0x14013a44d
cmp byte [r12 + 0x118], 1
jne 0x14013a2f6
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a43b
movzx eax, byte [r12 + 0x138]
xor al, 1
mov byte [r12 + 0x59], al
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rdi + 8], 0
je 0x14013a1cd
mov qword [rsp + 0x58], r13
mov rax, qword [0x1402b9770]
lea rcx, [0x1401869b0]
cmp rax, rcx
jne 0x14013a245
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x80]
cmp rax, rbp
jge 0x14013a7a5
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402c9700]
mov qword [rsp + 0x58], rax
cmp rax, qword [rdi + 0x20]
jl 0x14013a1cd
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 0x14013a1cd
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax + 0x20]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x14013a1b7
cmp rcx, r8
jb 0x14013a2fd
mov rcx, qword [rdi + 0x28]
mov rdx, rdi
call fcn.140139100
mov rbx, qword [rdi + 0x30]
movzx eax, byte [0x1402c9336]
test al, al
jne 0x14013a690
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
cmp rcx, qword [0x1402b7040]
je 0x14013a265
call fcn.14019f290
int3
lock dec dword [rbx + 8]
jne 0x140139edd
jmp 0x14013a34f
test r14d, r14d
jne 0x14013a45f
cmp byte [r12 + 0x118], 0
jne 0x14013a0f4
jmp 0x14013a2f6
lock dec dword [rcx]
jne 0x140139ecd
call fcn.14019cac4
jmp 0x140139ecd
lea rbx, [rsp + 0x58]
mov rcx, rbx
call qword [0x1402a7b00]
mov rax, qword [rbx]
cmp rax, qword [rdi + 0x20]
jge 0x14013a18c
jmp 0x14013a1cd
mov rax, rsi
movaps xmm6, xmmword [rsp + 0xb0]
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lock dec dword [rcx]
jne 0x140139eea
mov rax, qword [rcx + 0x10]
call qword [0x1402a7b00]
jmp 0x140139eea
lea rbx, [rsp + 0x58]
mov rcx, rbx
call qword [0x1402a7b00]
mov rax, qword [rbx]
cmp rax, qword [rdi + 0x20]
jge 0x140139f92
jmp 0x140139fd3
mov qword [rax + 0x28], 0
mov rbx, qword [rdi]
mov qword [rdi], rcx
test rbx, rbx
je 0x140139f03
mov rcx, rbx
call fcn.14016f640
mov rcx, rbx
call fcn.14019cac4
jmp 0x140139f03
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x140139fe9
xor eax, eax
jmp 0x14013a111
mov rcx, rdi
call fcn.14010afb0
mov eax, 0x4c4b40
add rax, qword [rsp + 0x58]
movabs rcx, 0x7fffffffffffffff
cmovno rcx, rax
mov qword [rdi + 0x20], rcx
jmp 0x14013a1cd
mov rcx, rdi
call fcn.14010afb0
mov eax, 0x4c4b40
add rax, qword [rsp + 0x58]
movabs rcx, 0x7fffffffffffffff
cmovno rcx, rax
mov qword [rdi + 0x20], rcx
jmp 0x140139fd3
mov rcx, qword [rbx]
mov rax, qword [rcx + 8]
lea rdx, [0x1402036e0]
cmp qword [rcx + 0x10], rdx
jne 0x14013a36f
lea rcx, [0x14000be10]
cmp rax, rcx
je 0x14013a382
mov rcx, rbx
mov edx, 1
call qword [0x1402a7b00]
jmp 0x140139edd
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14013a390
lock dec dword [rcx]
je 0x14013a3bf
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x14013a39f
lock dec dword [r14]
je 0x14013a3ac
mov rcx, rbx
call fcn.14019cac4
jmp 0x140139edd
lea rcx, [r14 + 8]
call fcn.14014ddd0
mov rcx, r14
call fcn.14019cac4
jmp 0x14013a39f
call fcn.14019cac4
jmp 0x14013a390
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a7f3
mov al, byte [r12 + 0x118]
jmp 0x14013a111
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
jne 0x14013a81e
mov rax, qword [r12 + 0x18]
jmp 0x14013a074
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
jne 0x14013a821
mov rax, qword [r12 + 0x18]
jmp 0x14013a094
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a053
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a0af
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a106
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a0e5
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a21e
int3
int3
int3
lea r14, [rsp + 0x70]
movaps xmmword [r14], xmm6
mov rdx, qword [rdi]
mov rcx, r14
call fcn.140217c60
mov rax, qword [r14]
test rax, rax
je 0x14013a50a
mov qword [rsp + 0x50], 0
mov r14, qword [rsp + 0x78]
cmp r14, qword [rax + 0x20]
jae 0x14013a824
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x48], rax
mov rax, qword [r12 + 0x18]
mov r15d, dword [rax + 8]
test r15d, r15d
jne 0x14013a80c
mov al, byte [r12 + 0x148]
test al, al
je 0x14013a807
imul r14, r14, 0xa8
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rcx + r14 + 0x20]
cmp rcx, qword [r12 + 0x140]
jge 0x14013a518
lea rcx, [rsp + 0x70]
call fcn.1402168e0
mov rax, qword [rsp + 0x70]
test rax, rax
jne 0x14013a49c
jmp 0x14013a665
mov qword [rsp + 0x50], 0
jmp 0x14013a665
mov rcx, qword [r12 + 0x18]
mov r15d, dword [rcx + 8]
test r15d, r15d
jne 0x14013a86d
add qword [rsp + 0x48], r14
test al, 1
je 0x14013a53c
mov byte [r12 + 0x148], 0
lea r14, [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
mov rdx, r14
call fcn.14013ee40
lea rcx, [rsp + 0x80]
mov rdx, r14
call fcn.1400f9ee0
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a885
movups xmm0, xmmword [rsp + 0x80]
movups xmmword [r12 + 0x120], xmm0
mov eax, dword [rsp + 0x90]
mov dword [r12 + 0x130], eax
cmp byte [r12 + 0x138], 0
jne 0x14013a5a4
mov byte [r12 + 0x138], 1
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a897
mov r14, qword [r12 + 0xa8]
mov r15d, dword [rax + 8]
test r15d, r15d
jne 0x14013a8ac
cmp byte [r12 + 0x138], 0
je 0x14013a805
lea r15, [r12 + 0x120]
mov eax, dword [r15 + 0x10]
lea rdx, [rsp + 0x80]
mov dword [rdx + 0x10], eax
movups xmm0, xmmword [r15]
movaps xmmword [rdx], xmm0
mov rcx, r14
call fcn.140218700
mov rax, qword [r12 + 0x18]
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a8be
mov rcx, qword [r12 + 0xa0]
mov qword [rsp + 0x48], rcx
mov r14d, dword [rax + 8]
test r14d, r14d
jne 0x14013a8d7
cmp byte [r12 + 0x138], 0
je 0x14013a805
mov eax, dword [r15 + 0x10]
lea rdx, [rsp + 0x80]
mov dword [rdx + 0x10], eax
movups xmm0, xmmword [r15]
movaps xmmword [rdx], xmm0
mov rcx, qword [rsp + 0x48]
call fcn.140218700
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x50], rax
movabs rax, 0xfffffffc00000000
and rax, qword [rsp + 0x50]
cmp rax, qword [0x1402b9708]
jne 0x14013a062
mov rcx, qword [rsp + 0x50]
call fcn.140004e70
jmp 0x14013a062
mov rcx, qword [rbx + 0x18]
call fcn.14019bf80
test al, al
je 0x14013a1ec
lea rdi, [rbx + 0x28]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x14013a6bb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rax, qword [rbx + 0x18]
mov r14, qword [rbx + 0x40]
mov ebp, dword [rax + 8]
test ebp, ebp
jne 0x14013a836
mov rcx, qword [rbx + 0xa8]
mov r15, qword [rcx + 0x10]
mov ebp, dword [rax + 8]
test ebp, ebp
jne 0x14013a849
mov rcx, qword [rbx + 0xa0]
mov r12, qword [rcx + 0x10]
mov ebp, dword [rax + 8]
test ebp, ebp
jne 0x14013a85c
mov rbp, qword [rbx + 0xb8]
mov r13, qword [rbx + 0xc0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov qword [rsp + 0x70], 0xe6
mov al, byte [0x1402c9336]
test al, al
je 0x14013a1ec
movzx edi, al
add r15d, r14d
sub r13, rbp
shr r13, 3
imul ebp, r13d, 0x3cf3cf3d
add ebp, r12d
add ebp, r15d
mov ecx, dword [rbx + 8]
call fcn.1402178a0
lea r8, [rsp + 0x58]
mov qword [r8], rax
lea rax, [rsp + 0xa4]
mov dword [rax], ebp
lea rcx, [0x14027bc29]
lea rdx, [rsp + 0x80]
mov qword [rdx], rcx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdx
lea rax, [0x14027b790]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0
mov byte [rsp + 0x28], 0x43
lea rdx, [rsp + 0x70]
mov ecx, edi
xor r9d, r9d
call fcn.1402178d0
jmp 0x14013a1ec
mov rcx, qword [0x1402c9700]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x14013a181
mov rcx, qword [0x1402c9700]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140139f87
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a3d8
int3
ud2
call fcn.1401d8b50
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r15d, eax
je 0x14013a4c6
int3
int3
int3
int3
int3
int3
int3
int3
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebp, eax
jne 0x14013a827
mov rax, qword [rbx + 0x18]
jmp 0x14013a6ce
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebp, eax
jne 0x14013a82a
mov rax, qword [rbx + 0x18]
jmp 0x14013a6e4
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp ebp, eax
je 0x14013a6fa
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r15d, eax
jne 0x14013a82d
mov al, byte [r12 + 0x148]
jmp 0x14013a52a
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a570
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
jne 0x14013a830
mov rax, qword [r12 + 0x18]
jmp 0x14013a5b6
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r15d, eax
je 0x14013a5cb
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
jne 0x14013a833
mov rax, qword [r12 + 0x18]
jmp 0x14013a612
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r14d, eax
je 0x14013a62c
int3