Function at 0x140101210
Capabilities:
Check for time delay via queryperformancecounter
Get thread local storage value

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov rsi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x60], rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x50], rax
movapd xmm0, xmmword [0x140270690]
movapd xmmword [rsp + 0x40], xmm0
mov rax, qword [rcx - 0xc0]
mov byte [rsp + 0x40], 0
mov qword [rsp + 0x58], rax
cmp byte [rcx + 0x120], 0
je 0x140101334
mov eax, dword [0x1402a4558]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14010186b
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140101334
mov rcx, qword [0x1402a4548]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a4550]
jne 0x140101334
mov rdi, qword [rax + rcx]
test rdi, rdi
je 0x140101334
cmp byte [rsi + 0x128], 0
je 0x140101334
mov rax, qword [rdi]
test rax, rax
js 0x1401018ec
cmp dword [rdi + 0x14], 1
movabs rbx, 0x4000000000000000
jne 0x140101943
cmp qword [rdi + 8], 0
jne 0x140101988
movabs rax, 0xbfffffffffffffff
lock and qword [rdi], rax
mov r14, qword [rsi + 0x130]
cmp qword [rdi + 8], 0
jne 0x140101964
mov rax, qword [rdi]
and rax, rbx
movabs rcx, 0xffffffffffffff
and r14, rcx
or r14, rax
mov qword [rdi], r14
dec dword [rdi + 0x14]
mov qword [rsi + 0x130], 0
mov byte [rsi + 0x138], 0
mov byte [rsi + 0x128], 0
mov byte [rsi + 0x120], 1
mov rax, qword [rsi + 0xf0]
mov ecx, dword [rax]
inc ecx
je 0x140101900
mov dword [rax], ecx
mov rax, qword [rsi - 0x10]
cmp qword [rsi - 0x18], rax
je 0x1401014ff
mov eax, dword [rax - 0x38]
test eax, eax
je 0x1401014d9
cmp eax, 2
je 0x14010190d
cmp qword [rsi - 0x58], 0
je 0x1401014e4
cmp qword [rsi - 0x70], 0
je 0x1401014e4
mov rax, qword [rsi - 0x28]
test rax, rax
je 0x1401019ac
mov rcx, qword [rax + 0xa8]
sub rcx, qword [rax + 0xa0]
cmp rcx, 0x38
jne 0x1401014e4
cmp byte [rsp + 0x40], 0
jne 0x140101740
mov rax, qword [fcn.1401193e0]
lea rcx, [0x140179e10]
cmp rax, rcx
jne 0x1401018c0
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x38]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140101a52
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402a2810]
mov rdi, rax
cmp byte [rsp + 0x40], 0
mov qword [rsp + 0x48], rdi
jne 0x140101436
mov byte [rsp + 0x40], 1
mov rax, qword [rsi - 0x70]
xor edx, edx
cmp rdi, rax
setns dl
movabs r14, 0x7fffffffffffffff
add rdx, r14
mov rcx, rdi
sub rcx, rax
cmovo rcx, rdx
cmp rcx, 0x1c9c37f
jg 0x1401014bc
movabs rax, 0x8000000000000001
lea r8, [rcx + rax]
mov rdx, qword [rsi - 0xa8]
cmp r8, 1
jbe 0x1401019af
lea rax, [rdx + rcx]
sar rax, 0x3f
movabs r8, 0x8000000000000000
xor r8, rax
add rdx, rcx
cmovo rdx, r8
mov qword [rsi - 0xa8], rdx
cmp rdx, 0x186a0
jge 0x140101812
cmp qword [rsi - 0x28], 0
je 0x1401019cc
movzx eax, byte [0x14029c980]
test al, 9
setne bpl
jne 0x1401019cf
mov byte [rsi - 0x30], bpl
mov qword [rsi - 0x70], rdi
jmp 0x1401014e4
cmp qword [rsi - 0x58], 0
jne 0x14010166b
mov rdi, qword [rsi - 0x10]
cmp qword [rsi - 0x18], rdi
je 0x14010190a
cmp dword [rdi - 0x38], 0
mov dword [rdi - 0x38], 2
je 0x14010151a
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14017e7b0
nop
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
mov rbx, qword [rdi - 0x10]
inc rbx
mov qword [rdi - 0x10], rbx
mov eax, dword [0x1402a61a8]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140101798
mov r14d, dword [rdi - 0x18]
test r14d, r14d
je 0x1401018b9
mov bpl, 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
test r14d, r14d
setne r15b
mov r14, qword [rdi - 0x20]
lea rcx, [0x1402a6198]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140101751
mov rdi, qword [0x1402a6188]
test rdi, rdi
je 0x1401015dd
lea rax, [0x1402a5540]
xor ecx, ecx
mov edx, r15d
xor dl, 1
cmp rcx, 0x32
je 0x1401018fd
cmp qword [rax - 0x30], r14
jne 0x1401015d1
cmp byte [rax - 0x28], 0
jne 0x1401015d1
movzx r8d, byte [rax - 0x10]
test r8b, r8b
sete r9b
or r9b, dl
jne 0x140101762
cmp dword [rax - 0xc], esi
je 0x140101772
inc rcx
add rax, 0x40
cmp rdi, rcx
jne 0x14010159d
mov rax, qword [0x1402a6190]
test rax, rax
je 0x140101626
mov ecx, 0x32
sub rcx, rdi
cmp rax, rcx
jb 0x140101626
lea rcx, [0x1402a61a0]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140101626
lea rcx, [0x1402a5500]
mov rdx, rdi
call fcn.1400fd2f0
mov rdi, rax
lea rcx, [0x1402a61a0]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp rdi, 0x32
je 0x140101786
jae 0x140101ac7
shl rdi, 6
lea rax, [0x1402a5500]
mov qword [rdi + rax + 0x10], r14
mov byte [rdi + rax + 0x18], 0
mov byte [rdi + rax + 0x30], bpl
mov dword [rdi + rax + 0x34], esi
mov qword [rdi + rax + 0x40], rbx
mov byte [rdi + rax + 8], 1
lock inc qword [0x1402a6188]
jmp 0x140101786
mov rax, qword [rsi - 0x28]
test rax, rax
je 0x140101a4f
mov rcx, qword [rax + 0xa8]
sub rcx, qword [rax + 0xa0]
cmp rcx, 0x38
jne 0x1401014e4
cmp byte [rsp + 0x40], 0
jne 0x14010174a
mov rax, qword [fcn.1401193e0]
lea rcx, [0x140179e10]
cmp rax, rcx
jne 0x1401018d6
lea rdi, [rsp + 0x38]
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rdi]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140101a7c
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402a2810]
cmp byte [rsp + 0x40], 0
mov qword [rsp + 0x48], rax
jne 0x1401016fe
mov byte [rsp + 0x40], 1
mov qword [rsi - 0x78], rax
mov qword [rsi - 0x70], rax
test byte [0x14029c980], 0x19
je 0x1401014e4
cmp byte [rsi - 0x50], 0
je 0x140101b1a
lea r9, [rsi - 0x48]
mov qword [rsp + 0x20], rax
lea rdx, [0x14029c980]
lea r8, [0x14027250a]
mov cl, 0x45
call fcn.14003a110
jmp 0x1401014e4
mov rdi, qword [rsp + 0x48]
jmp 0x140101436
mov rax, qword [rsp + 0x48]
jmp 0x1401016fe
lea rcx, [0x1402a6198]
call fcn.1400fdfc0
jmp 0x140101582
test r8b, r8b
setne r8b
xor r8b, r15b
jne 0x1401015d1
mov qword [rax], rbx
mov cl, 1
xchg byte [rax - 0x38], cl
test cl, 1
jne 0x140101786
dec qword [0x1402a6190]
lea rcx, [0x1402a6198]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1401014ff
lea rcx, [0x1402a61a8]
call fcn.14017b2bc
cmp dword [0x1402a61a8], 0xffffffff
jne 0x14010154a
lea rax, [0x14026ca90]
mov qword [0x1402a5500], rax
mov eax, 0x40
lea rcx, [0x1402a5500]
xor edx, edx
mov byte [rax + rcx - 0x38], dl
mov byte [rax + rcx - 0x28], dl
mov byte [rax + rcx - 0x10], dl
mov qword [rax + rcx], 0
add rax, 0x40
cmp rax, 0xcc0
jne 0x1401017cd
xorpd xmm0, xmm0
movupd xmmword [0x1402a6198], xmm0
movupd xmmword [0x1402a6188], xmm0
lea rcx, [0x1402a61a8]
call fcn.14017b25c
jmp 0x14010154a
cvtsi2sd xmm0, rdx
divsd xmm0, qword [0x140275810]
cvttsd2si ebx, xmm0
mov rcx, qword [rsi - 0x58]
mov rax, qword [rcx]
mov rax, qword [rax + 0x30]
mov edx, 2
mov r8d, ebx
call qword [case.0x1401e7f70.0]
movsxd rax, ebx
imul rcx, rax, 0x3e8
mov rax, qword [rsi - 0xa8]
xor edx, edx
cmp rax, rcx
setns dl
add rdx, r14
sub rax, rcx
cmovo rax, rdx
mov qword [rsi - 0xa8], rax
jmp 0x1401014b1
lea rcx, [0x1402a4558]
call fcn.14017b2bc
cmp dword [0x1402a4558], 0xffffffff
jne 0x14010128e
mov qword [0x1402a4550], 0
lea rcx, [0x1402a4548]
mov qword [0x1402a4548], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a4558]
call fcn.14017b25c
jmp 0x14010128e
xor ebp, ebp
jmp 0x140101562
lea rdi, [rsp + 0x30]
mov rcx, rdi
call qword [case.0x1401e7f70.0]
mov rdi, qword [rdi]
jmp 0x140101425
lea rdi, [rsp + 0x30]
mov rcx, rdi
call qword [case.0x1401e7f70.0]
mov rax, qword [rdi]
jmp 0x1401016ed
mov rcx, qword [0x1402a4540]
call fcn.1401ba0f0
jmp 0x1401012d9
int3
mov ecx, 1
jmp 0x140101365
int3
lea r9, [rsi - 0xb8]
add rsi, 0xffffffffffffffe8
lea r8, [rsp + 0x30]
mov byte [r8], 1
lea rdx, [rsp + 0x38]
mov dword [rdx], 2
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov rcx, rsi
call fcn.1401ba5f0
jmp 0x1401014ff
cmp byte [rsi + 0x138], 0
je 0x140101306
cmp qword [rdi + 8], 0
jne 0x140101aa3
lock or qword [rdi], rbx
jmp 0x140101306
lea rcx, [rdi + 8]
mov r15, qword [rdi]
call fcn.1401ba590
movabs rcx, 0xff00000000000000
and rcx, r15
or rcx, rax
mov qword [rdi], rcx
jmp 0x140101318
lea rcx, [rdi + 8]
mov r14, qword [rdi]
call fcn.1401ba590
movabs rcx, 0xff00000000000000
and rcx, r14
or rcx, rax
mov qword [rdi], rcx
jmp 0x1401012f8
int3
lea r8, [rdx + rax]
dec rax
cmp r8, 1
ja 0x14010185f
cmp rdx, rcx
je 0x14010185f
int3
int3
and al, 0x19
cmp byte [rsi - 0x30], 0
jne 0x1401019df
test al, al
jne 0x140101aca
test al, al
je 0x1401014cf
cmp byte [rsi - 0x50], 0
je 0x140101b1a
mov rax, qword [rsi - 0x70]
lea rbx, [rsi - 0x48]
mov qword [rsp + 0x20], rax
lea rdx, [0x14029c980]
lea r8, str.PumpOverhead
mov cl, 0x42
mov r9, rbx
call fcn.14003a110
test byte [0x14029c980], 0x19
je 0x1401014cf
cmp byte [rsi - 0x50], 0
je 0x140101b1a
mov qword [rsp + 0x20], rdi
lea rdx, [0x14029c980]
lea r8, [0x14027250a]
mov cl, 0x45
mov r9, rbx
call fcn.14003a110
jmp 0x1401014cf
int3
mov rcx, qword [0x1402a2810]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
mov rdi, rax
add rdi, r8
jmp 0x140101425
mov rcx, qword [0x1402a2810]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401016ed
lea rcx, [rdi + 8]
mov r14, qword [rdi]
call fcn.1401ba590
movabs rcx, 0xff00000000000000
and rcx, r14
or rcx, rax
mov qword [rdi], rcx
jmp 0x14010195b
int3
cmp byte [rsi - 0x50], 0
je 0x140101b1a
mov rax, qword [rsi - 0x70]
mov rcx, 0xfffffffffff0bdc0
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
lea r9, [rsi - 0x48]
mov qword [rsp + 0x20], rcx
lea rdx, [0x14029c980]
lea r8, str.MessagePumpPhases
mov cl, 0x49
call fcn.14003a110
mov al, byte [0x14029c980]
and al, 0x19
jmp 0x1401019df
ud2