Function at 0x140038380
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, 0x138
movapd xmmword [rsp + 0x120], xmm10
movapd xmmword [rsp + 0x110], xmm9
movaps xmmword [rsp + 0x100], xmm8
movaps xmmword [rsp + 0xf0], xmm7
movaps xmmword [rsp + 0xe0], xmm6
mov rsi, rcx
mov rax, qword [0x140166028]
xor rax, rsp
mov qword [rsp + 0xd8], rax
movabs r13, 0xaaaaaaaaaaaaaaaa
test byte [0x140167f80], 0x19
jne 0x140038b6c
mov rcx, qword [rsi + 0x60]
test rcx, rcx
jne 0x140038ff6
mov rcx, qword [rsi + 0x48]
mov rdx, rsi
call fcn.1400b8290
call fcn.1400aba50
test al, al
jne 0x140039001
xor edi, edi
lea rcx, [rsp + 0xa0]
mov qword [rcx], r13
call fcn.1400abf70
mov dword [rsp + 0x5c], edi
test dil, dil
jne 0x14003902a
test byte [0x140167f80], 0x19
jne 0x140038b02
mov rax, qword [rsi + 0x48]
mov rax, qword [rax + 0x38]
mov rax, qword [rax + 0x90]
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x1401251a8]
lea rcx, [rsi + 0x30]
mov qword [rsp + 0x50], rcx
movsd xmm8, qword [0x1401251b0]
ucomisd xmm8, xmm0
jb 0x140038fcf
ucomisd xmm0, qword [0x14010e348]
jb 0x140038fcf
cvttsd2si rax, xmm0
lea rcx, [rsp + 0xb0]
mov qword [rcx], rax
cmp rax, 0xf4240
lea rdx, [0x140151080]
cmovle rdx, rcx
mov rcx, qword [rsp + 0x50]
call fcn.140001780
test al, al
je 0x140038e62
test byte [0x140167f80], 0x19
jne 0x140038bd6
mov al, byte [rsi + 0x40]
test al, al
jne 0x140038a33
lea r12, [rsp + 0xb8]
mov r15, qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
movaps xmm7, xmmword [0x14011b490]
xorps xmm6, xmm6
lea rdi, [rsp + 0x90]
movsd xmm9, qword [0x1401251a8]
movsd xmm10, qword [0x14010e348]
lea r14, [rsp + 0x80]
nop
movzx eax, byte [rsi + 0x70]
test al, al
jne 0x140038a33
mov rbx, qword [rsi + 0x50]
lea rbp, [rbx + 0x58]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400389ba
mov rcx, qword [rbx + 0x60]
test rcx, rcx
jne 0x1400389d4
mov rcx, rbp
call r15
movaps xmmword [rsp + 0xb0], xmm7
mov qword [rsp + 0xd0], r13
movaps xmmword [rsp + 0xc0], xmm7
mov byte [rsp + 0xb0], 0
movups xmmword [r12], xmm6
mov qword [r12 + 0x10], 0
cmp byte [rsp + 0x5c], 0
jne 0x140038ead
mov rax, qword [rsi + 0x50]
mov rax, qword [rax + 0x30]
mov eax, dword [rax]
test al, 1
jne 0x140038ec7
mov ebp, dword [rsi + 0x68]
cmp dword [rsi + 0x6c], ebp
jne 0x140038ed1
movaps xmmword [rsp + 0x90], xmm7
mov rcx, qword [rsi + 0x48]
mov rdx, rdi
mov r8, rsi
call fcn.140059ed0
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x140038670
mov rcx, qword [rsi + 0x50]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x90], 0
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x78], rax
mov rdx, r14
lea r8, [rsp + 0x70]
call fcn.1400392f0
mov rcx, rdi
mov rdx, r14
call fcn.140039210
mov rcx, r14
call fcn.140039160
mov rcx, qword [rsi + 0x48]
movapd xmm0, xmmword [rsp + 0x90]
movupd xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x90], xmm6
lea rdx, [rsp + 0x60]
call fcn.14005e340
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rdi
call fcn.140039160
cmp byte [rsp + 0xb0], 0
jne 0x140038ee0
movzx eax, byte [rsi + 0x40]
test al, al
je 0x140038510
jmp 0x140038a33
movzx eax, byte [rsi + 0x40]
test al, al
jne 0x140038a18
movzx eax, byte [rsi + 0x70]
test al, al
jne 0x140038a18
mov rbx, qword [rsi + 0x50]
lea rbp, [rbx + 0x58]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400389c7
mov rcx, qword [rbx + 0x60]
test rcx, rcx
jne 0x1400389f7
mov rcx, rbp
call r15
test byte [0x140167f80], 0x19
jne 0x1400387bc
cmp byte [rsp + 0xb0], 0
jne 0x140038f54
mov rax, qword [rsi + 0x48]
mov rcx, qword [rax]
lea rdx, [0x14000d990]
cmp qword [rcx + 0x30], rdx
jne 0x140038969
mov rax, qword [rax + 0x38]
mov rax, qword [rax + 0x90]
cvtsi2sd xmm0, rax
mulsd xmm0, xmm9
ucomisd xmm8, xmm0
jb 0x140038f2e
ucomisd xmm0, xmm10
jb 0x140038f2e
cvttsd2si rax, xmm0
mov qword [rsp + 0x80], rax
mov rdx, r14
cmp rax, 0xf4241
jl 0x140038731
lea rdx, [0x140151080]
mov rcx, qword [rsp + 0x50]
call fcn.140001780
test al, al
je 0x14003890c
test byte [0x140167f80], 0x19
je 0x140038644
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
mov qword [rsp + 0xa8], r13
mov rax, qword [0x140167ee0]
lea rcx, [0x1400347e0]
cmp rax, rcx
jne 0x140038af3
mov qword [rsp + 0x80], 0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14003889e
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x1400388c0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, r13
mov r13d, eax
mov qword [rsp + 0xa8], rcx
mov rax, qword [0x140167ee0]
lea rcx, [0x1400347e0]
cmp rax, rcx
jne 0x140038ae4
mov qword [rsp + 0x80], 0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140038825
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x140038847
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbp, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbp
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r13d
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov cl, 0x45
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
xor r9d, r9d
call fcn.14003b8f0
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x1400386c1
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbx, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbx
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebp
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov cl, 0x42
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
xor r9d, r9d
call fcn.14003b8f0
jmp 0x140038644
call fcn.1400aba00
mov rax, qword [rsp + 0x80]
cmp rax, 0xf4241
jl 0x140038743
lea rcx, [rax - 0xf4240]
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
cmove rcx, rdx
mov qword [rsp + 0xa8], rcx
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0xa8]
call fcn.140001780
test byte [0x140167f80], 0x19
je 0x140038644
jmp 0x140038750
mov rax, qword [rax + 0x38]
mov rax, qword [rax + 0x90]
cvtsi2sd xmm0, rax
mulsd xmm0, xmm9
ucomisd xmm8, xmm0
jb 0x140038f95
ucomisd xmm0, xmm10
jb 0x140038f95
cvttsd2si rax, xmm0
mov qword [rsp + 0x80], rax
cmp rax, 0xf4240
mov rdx, r14
lea rax, [0x140151080]
cmovg rdx, rax
jmp 0x140038731
mov rcx, rbp
call fcn.1400428d0
jmp 0x140038535
mov rcx, rbp
call fcn.1400428d0
jmp 0x1400386a1
call fcn.1400ac110
mov r13d, eax
mov rcx, rbp
call r15
test r13b, r13b
movabs r13, 0xaaaaaaaaaaaaaaaa
je 0x140038548
jmp 0x140038a33
call fcn.1400ac110
mov r13d, eax
mov rcx, rbp
call r15
test r13b, r13b
movabs r13, 0xaaaaaaaaaaaaaaaa
je 0x1400386b4
lea rcx, [rsp + 0x90]
call fcn.140039160
cmp byte [rsp + 0xb0], 0
jne 0x140039144
mov rcx, qword [rsi + 0x48]
mov rdx, rsi
call fcn.1400ac550
mov rcx, qword [rsi + 0x60]
test rcx, rcx
jne 0x14003905c
mov rdi, qword [rsi + 0x10]
mov qword [rsi + 0x10], 0
test rdi, rdi
je 0x140038a7b
lock dec dword [rdi + 8]
jne 0x140038a7b
add rdi, 8
add rdi, 0xfffffffffffffff8
mov rcx, rdi
call fcn.1400ac750
mov rcx, rdi
call fcn.14007c098
test byte [0x140167f80], 0x19
jne 0x140039067
lea rcx, [rsp + 0xa0]
call fcn.140043230
mov rcx, qword [rsp + 0xd8]
xor rcx, rsp
call fcn.14007ed30
movaps xmm6, xmmword [rsp + 0xe0]
movaps xmm7, xmmword [rsp + 0xf0]
movaps xmm8, xmmword [rsp + 0x100]
movaps xmm9, xmmword [rsp + 0x110]
movaps xmm10, xmmword [rsp + 0x120]
add rsp, 0x138
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [rsp + 0xa8]
call rax
jmp 0x14003884f
lea rcx, [rsp + 0xa8]
call rax
jmp 0x1400388c8
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0x90], r13
mov rax, qword [0x140167ee0]
lea rcx, [0x1400347e0]
cmp rax, rcx
jne 0x140038ef2
lea rbx, [rsp + 0xb0]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140038c40
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x140038c62
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0x90], r13
mov rax, qword [0x140167ee0]
lea r14, [0x1400347e0]
cmp rax, r14
jne 0x140038f01
lea rbx, [rsp + 0xb0]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140038cb1
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x140038cd3
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0x90], r13
mov rax, qword [0x140167ee0]
lea rcx, [0x1400347e0]
cmp rax, rcx
jne 0x140038f1f
lea rbx, [rsp + 0xb0]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140038def
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x140038e11
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbp, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbp
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
mov cl, 0x45
xor r9d, r9d
call fcn.14003b8f0
jmp 0x14003843e
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbp, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbp
mov qword [rsp + 0x90], rax
lea rbp, [rsp + 0x90]
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x30], edi
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 8
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_born
mov cl, 0x49
xor r9d, r9d
call fcn.14003b8f0
test byte [0x140167f80], 0x19
je 0x1400383ec
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0x90], r13
mov rax, qword [0x140167ee0]
cmp rax, r14
jne 0x140038f10
lea rbx, [rsp + 0xb0]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140038d86
imul rax, rax, 0xf4240
cqo
idiv qword [0x14016c648]
jmp 0x140038da8
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbx, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbx
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x30], edi
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
mov cl, 0x42
xor r9d, r9d
call fcn.14003b8f0
jmp 0x1400383ec
mov rcx, qword [0x14016c648]
cqo
idiv rcx
imul rbp, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbp
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
xorpd xmm0, xmm0
movupd xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
mov cl, 0x42
xor r9d, r9d
call fcn.14003b8f0
jmp 0x1400384c8
call fcn.1400aba00
mov rax, qword [rsp + 0xb0]
cmp rax, 0xf4241
jl 0x1400384bb
lea rcx, [rax - 0xf4240]
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
cmove rcx, rdx
lea rdx, [rsp + 0x90]
mov qword [rdx], rcx
mov rcx, qword [rsp + 0x50]
call fcn.140001780
jmp 0x1400384bb
mov edx, 0x989680
mov rcx, r12
call fcn.140002f20
mov byte [rsp + 0xb0], 1
jmp 0x140038581
mov ebp, 1
jmp 0x140038596
mov ecx, ebp
call fcn.1400aae30
mov dword [rsi + 0x6c], ebp
jmp 0x14003859f
lea rcx, [rsp + 0xb8]
call fcn.1400458e0
jmp 0x14003865a
lea rcx, [rsp + 0x90]
call rax
jmp 0x140038c6a
lea rcx, [rsp + 0x90]
call rax
jmp 0x140038cdb
lea rcx, [rsp + 0x90]
call rax
jmp 0x140038db0
lea rcx, [rsp + 0x90]
call rax
jmp 0x140038e19
test rax, rax
js 0x140038f6e
movabs rax, 0x7fffffffffffffff
mov qword [rsp + 0x80], rax
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x14003872a
lea rcx, [rsp + 0xb8]
call fcn.1400458e0
mov byte [rsp + 0xb0], 0
jmp 0x1400386cf
movabs rax, 0x7fffffffffffffff
inc rax
mov qword [rsp + 0x80], rax
mov rdx, r14
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x140038731
test rax, rax
js 0x140038fb5
movabs rax, 0x7fffffffffffffff
mov qword [rsp + 0x80], rax
lea rdx, [0x140151080]
jmp 0x140038f86
movabs rax, 0x7fffffffffffffff
inc rax
lea rdx, [rsp + 0x80]
mov qword [rdx], rax
jmp 0x140038f86
test rax, rax
js 0x14003911d
movabs rax, 0x7fffffffffffffff
mov qword [rsp + 0xb0], rax
lea rdx, [0x140151080]
jmp 0x140039135
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x1400383f9
mov rax, qword [rsi + 0x50]
mov rax, qword [rax + 0x30]
mov eax, dword [rax]
test al, 1
jne 0x140039156
cmp dword [rsi + 0x68], 0
setne dil
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x140038414
lea rdi, [rsp + 0xb0]
mov rcx, rdi
mov edx, 2
call fcn.1400f0aa0
lea rcx, [rsp + 0xa0]
mov rdx, rdi
call fcn.1400fb1b0
mov rcx, rdi
call fcn.140043230
jmp 0x140038431
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x140038a4c
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
lea rsi, [rsp + 0xb0]
mov qword [rsi], r13
mov rcx, rsi
call fcn.14004bab0
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], edi
xorps xmm6, xmm6
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_active
mov cl, 0x45
xor r9d, r9d
call fcn.14003b8f0
test byte [0x140167f80], 0x19
je 0x140038a88
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0xb0], r13
mov rcx, rsi
call fcn.14004bab0
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], edi
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 8
mov qword [rsp + 0x40], 0
lea rdx, [0x140167f80]
lea r8, str.WorkerThread_dead
mov cl, 0x49
xor r9d, r9d
call fcn.14003b8f0
jmp 0x140038a88
movabs rax, 0x7fffffffffffffff
inc rax
lea rdx, [rsp + 0xb0]
mov qword [rdx], rax
movabs r13, 0xaaaaaaaaaaaaaaaa
jmp 0x1400384a9
lea rcx, [rsp + 0xb8]
call fcn.1400458e0
jmp 0x140038a33
mov dil, 1
jmp 0x14003901b