Function at 0x140140760
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, 0x628
mov rax, qword [0x14033f038]
xor rax, rsp
mov qword [rsp + 0x620], rax
cmp qword [rcx + 0x28], 0
je 0x140141077
mov rbx, rcx
mov eax, dword [0x140355bd0]
mov ecx, dword [0x14034fed0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140140f24
mov rax, qword [0x140355bc8]
cmp rax, 0x18
je 0x14014107e
cmp rax, 0x10
je 0x1401410a9
cmp rax, 4
je 0x1401410d4
lea rsi, [rsp + 0x80]
mov r8d, 0x548
mov rcx, rsi
mov dl, 0xaa
call fcn.140173760
lea rax, [rsp + 0x5c0]
mov qword [rax + 8], rsi
mov qword [rax + 0x28], rsi
mov byte [rax], 1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rax
cmp qword [rbx + 0x10], 0
je 0x140140c99
lea r9, [rsp + 0x5d0]
xor r15d, r15d
lea r12, [0x14020a2e0]
lea r13, [0x14009e1c0]
lea rbp, [0x14008a410]
mov rcx, qword [rbx]
mov rdx, qword [rcx]
mov rax, qword [rcx + 8]
inc rax
cmp rax, rdx
mov r8, rax
cmove r8, r15
mov r14, qword [rcx + 0x18]
imul rsi, r8, 0xa8
mov rcx, qword [r14 + rsi]
test rcx, rcx
je 0x1401408e0
mov rax, qword [rcx + 0x18]
cmp rax, r12
je 0x1401408a8
cmp rax, r13
je 0x140140891
cmp rax, rbp
je 0x140140891
xor edx, edx
mov rdi, r9
call qword [case.0x140211850.0]
mov r9, rdi
test al, al
je 0x1401408a8
jmp 0x1401408cf
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x1401408cf
mov al, byte [rax + 4]
test al, al
jne 0x1401408cf
cmp qword [rcx + 0x30], 0
je 0x1401408cf
cmp qword [r14 + rsi + 0xa0], 0
je 0x140140a3e
mov rax, qword [r14 + rsi + 0x98]
test rax, rax
je 0x1401408cf
mov al, byte [rax + 4]
test al, al
je 0x140140a3e
mov rax, qword [rbx]
mov r14, qword [rax + 0x18]
mov rdx, qword [rax]
mov rax, qword [rax + 8]
inc rax
cmp rax, rdx
mov ecx, 0
cmovne rcx, rax
imul r8, rcx, 0xa8
lea rdx, [r14 + r8]
mov rax, qword [rsp + 0x5d8]
cmp rax, qword [rsp + 0x5e0]
jae 0x140140ebd
test rax, rax
je 0x1401410ff
mov rcx, qword [rdx]
mov qword [rax], rcx
mov qword [rdx], r15
movups xmm0, xmmword [rdx + 8]
movups xmm1, xmmword [rdx + 0x18]
movups xmmword [rax + 0x18], xmm1
movups xmmword [rax + 8], xmm0
lea rdi, [rax + 0x28]
lea rsi, [rdx + 0x28]
mov ecx, 0xa
rep movsq qword [rdi], qword [rsi]
mov cl, byte [rdx + 0x7c]
mov byte [rax + 0x7c], cl
mov ecx, dword [rdx + 0x78]
mov dword [rax + 0x78], ecx
mov cl, byte [r14 + r8 + 0x82]
mov byte [rax + 0x82], cl
movzx ecx, word [r14 + r8 + 0x80]
mov word [rax + 0x80], cx
mov rcx, qword [r14 + r8 + 0x88]
mov qword [rax + 0x88], rcx
mov qword [r14 + r8 + 0x88], r15
mov rcx, qword [r14 + r8 + 0x90]
mov qword [rax + 0x90], rcx
mov rcx, qword [r14 + r8 + 0x98]
mov qword [rax + 0x98], rcx
mov qword [r14 + r8 + 0x98], r15
mov rcx, qword [r14 + r8 + 0xa0]
mov qword [rax + 0xa0], rcx
add rax, 0xa8
mov qword [rsp + 0x5d8], rax
mov rax, qword [rbx]
mov rcx, qword [rax + 8]
inc rcx
cmp rcx, qword [rax]
mov rsi, qword [rax + 0x18]
mov edx, 0
cmovne rdx, rcx
mov qword [rax + 8], rdx
imul rdi, rdx, 0xa8
mov rcx, qword [rsi + rdi + 0x98]
test rcx, rcx
jne 0x140140ac8
lea r14, [rsi + rdi]
mov rsi, qword [rsi + rdi + 0x88]
test rsi, rsi
jne 0x140140ae1
mov rcx, qword [r14]
test rcx, rcx
jne 0x140140bf5
mov rax, qword [rbx]
mov rcx, qword [rax + 0x10]
cmp rcx, qword [rax + 8]
jne 0x140140a34
mov rcx, qword [rax + 0x20]
test rcx, rcx
jne 0x140140ee8
dec qword [rbx + 0x10]
jne 0x14014083f
mov r14, qword [rsp + 0x5d0]
mov r15, r14
cmp r14, qword [rsp + 0x5d8]
jne 0x140140c13
test r15, r15
je 0x140140a8e
cmp r14, r15
jne 0x140140b4c
mov r15, r14
mov rsi, r14
mov qword [rsp + 0x5d8], r15
mov rax, qword [rsp + 0x5e8]
test rax, rax
je 0x140140abe
cmp rax, rsi
jne 0x140140abe
mov byte [rsi + 0x540], 0
jmp 0x140140a91
xor r15d, r15d
cmp r15, r14
setne sil
mov rcx, qword [rsp + 0x620]
xor rcx, rsp
call fcn.140171860
mov eax, esi
add rsp, 0x628
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call fcn.14016eccc
jmp 0x140140a91
lock dec dword [rcx]
jne 0x1401409f9
mov r14, r9
call fcn.14016eccc
mov r9, r14
jmp 0x1401409f9
lock dec dword [rsi + 8]
jne 0x140140a0e
mov rcx, qword [rsi]
mov rax, qword [rcx + 8]
lea rdx, [0x1401c4710]
cmp qword [rcx + 0x10], rdx
jne 0x140140f59
lea rcx, [0x1401c4730]
cmp rax, rcx
jne 0x140140f59
mov rdi, qword [rsi + 0x18]
test rdi, rdi
je 0x140140b25
lock dec dword [rdi]
je 0x14014101a
mov rdi, qword [rsi + 0x10]
test rdi, rdi
je 0x140140b37
lock dec dword [rdi]
je 0x140140f92
mov rcx, rsi
call fcn.14016eccc
lea r9, [rsp + 0x5d0]
jmp 0x140140a0e
mov rbx, r14
mov rcx, qword [rbx - 0x10]
test rcx, rcx
jne 0x140140b7f
mov rsi, qword [rbx - 0x20]
test rsi, rsi
jne 0x140140b89
mov rcx, qword [rbx - 0xa8]
add rbx, 0xffffffffffffff58
test rcx, rcx
jne 0x140140ed0
cmp rbx, r15
je 0x140140be8
jmp 0x140140b4f
lock dec dword [rcx]
jne 0x140140b58
jmp 0x140140f1a
lock dec dword [rsi + 8]
jne 0x140140b61
mov rcx, qword [rsi]
mov rax, qword [rcx + 8]
lea rdx, [0x1401c4710]
cmp qword [rcx + 0x10], rdx
jne 0x140140f7f
lea rcx, [0x1401c4730]
cmp rax, rcx
jne 0x140140f7f
mov rdi, qword [rsi + 0x18]
test rdi, rdi
je 0x140140bc9
lock dec dword [rdi]
je 0x140141062
mov rdi, qword [rsi + 0x10]
test rdi, rdi
je 0x140140bdb
lock dec dword [rdi]
je 0x140141005
mov rcx, rsi
call fcn.14016eccc
jmp 0x140140b61
mov rsi, qword [rsp + 0x5d0]
jmp 0x140140a6b
lock dec dword [rcx]
jne 0x140140a1a
mov rax, qword [rcx + 0x10]
mov rsi, r9
call qword [case.0x140211850.0]
mov r9, rsi
jmp 0x140140a1a
cmp qword [rbx + 0x10], 0
jne 0x140140e88
movabs r12, 0xaaaaaaaaaaaaaaaa
movabs r15, 0x8637bd05af7
cmp dword [rbx + 0x78], 0
jne 0x140140dc2
mov r13, qword [rbx + 0x30]
cmp qword [rbx + 8], 0
je 0x140140d11
mov qword [rsp + 0x58], r12
mov rax, qword [0x1403411f8]
lea rcx, [0x14003b7a0]
cmp rax, rcx
jne 0x14014104c
lea rsi, [rsp + 0x5f0]
mov qword [rsi], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsi]
cmp rax, r15
jge 0x140140ca4
imul rax, rax, 0xf4240
cqo
idiv qword [0x140354790]
jmp 0x140140cc6
mov r14, rsi
mov r15, rsi
jmp 0x140140a6b
mov rcx, qword [0x140354790]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
mov qword [rsp + 0x58], rax
cmp rax, qword [rbx + 0x20]
jl 0x140140d11
mov rax, qword [rbx + 0x18]
inc rax
cmp rax, 5
mov edx, 4
cmovae rdx, rax
mov rax, qword [rbx]
mov rcx, qword [rbx + 0x10]
mov qword [rbx + 0x18], rcx
test rax, rax
je 0x140140d11
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x140140cfc
cmp rcx, r8
jb 0x140140fd6
lea rsi, [r13 + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140140f72
mov rax, qword [rbx]
mov rcx, qword [r13 + 0x28]
mov qword [rbx], rcx
mov qword [r13 + 0x28], rax
mov rax, qword [rbx + 8]
mov rcx, qword [r13 + 0x30]
mov qword [rbx + 8], rcx
mov qword [r13 + 0x30], rax
mov rax, qword [rbx + 0x10]
mov rcx, qword [r13 + 0x38]
mov qword [rbx + 0x10], rcx
mov qword [r13 + 0x38], rax
mov rax, qword [rbx + 0x18]
mov rcx, qword [r13 + 0x40]
mov qword [rbx + 0x18], rcx
mov qword [r13 + 0x40], rax
mov rax, qword [rbx + 0x20]
mov rcx, qword [r13 + 0x48]
mov qword [rbx + 0x20], rcx
mov qword [r13 + 0x48], rax
cmp byte [r13 + 0x158], 0
jne 0x140141243
mov rax, qword [r13 + 0xb8]
cmp qword [rax + 0x10], 0
sete byte [r13 + 0x50]
cmp qword [r13 + 0xa8], 0
mov al, byte [r13 + 0x128]
jne 0x140140db5
test al, al
je 0x14014102f
mov al, byte [r13 + 0x130]
xor al, 1
mov byte [r13 + 0x51], al
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rbx + 8], 0
je 0x140140e88
mov qword [rsp + 0x58], r12
mov rax, qword [0x1403411f8]
lea rcx, [0x14003b7a0]
cmp rax, rcx
jne 0x140141036
lea rsi, [rsp + 0x5f0]
mov qword [rsi], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsi]
cmp rax, r15
jge 0x140140e1b
imul rax, rax, 0xf4240
cqo
idiv qword [0x140354790]
jmp 0x140140e3d
mov rcx, qword [0x140354790]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
mov qword [rsp + 0x58], rax
cmp rax, qword [rbx + 0x20]
jl 0x140140e88
mov rax, qword [rbx + 0x18]
inc rax
cmp rax, 5
mov edx, 4
cmovae rdx, rax
mov rax, qword [rbx]
mov rcx, qword [rbx + 0x10]
mov qword [rbx + 0x18], rcx
test rax, rax
je 0x140140e88
lea rcx, [rdx + 0x10]
xor r8d, r8d
add r8, qword [rax]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x140140e73
cmp rcx, r8
jb 0x140140fa7
cmp qword [rbx + 0x40], 0xffffffffffffffff
je 0x140140e9b
mov rcx, qword [rbx + 0x28]
mov rdx, rbx
call fcn.14008a8c0
test byte [0x140342240], 9
jne 0x14014112b
mov r15, qword [rsp + 0x5d0]
mov r14, qword [rsp + 0x5d8]
jmp 0x140140a57
mov rcx, r9
mov rsi, r9
call fcn.140094390
mov r9, rsi
jmp 0x1401409c3
lock dec dword [rcx]
jne 0x140140b78
mov rax, qword [rcx + 0x10]
call qword [case.0x140211850.0]
jmp 0x140140b78
mov qword [rax + 0x20], 0
mov rsi, qword [rbx]
mov qword [rbx], rcx
test rsi, rsi
je 0x140140a34
mov rcx, rsi
mov rdi, r9
call fcn.140065570
mov rcx, rsi
call fcn.14016eccc
mov r9, rdi
jmp 0x140140a34
call fcn.14016eccc
jmp 0x140140b58
lea rcx, [0x140355bd0]
call fcn.14016f8b4
cmp dword [0x140355bd0], 0xffffffff
jne 0x1401407b8
mov qword [0x140355bc8], 8
lea rcx, [0x140355bd0]
call fcn.14016ef8c
jmp 0x1401407b8
mov rcx, rsi
mov edx, 1
mov rsi, r9
call qword [case.0x140211850.0]
mov r9, rsi
jmp 0x140140a0e
mov rcx, rsi
call fcn.140047ff0
jmp 0x140140d26
mov rcx, rsi
mov edx, 1
call qword [case.0x140211850.0]
jmp 0x140140b61
mov rcx, rdi
call fcn.1400b6510
mov rcx, rdi
call fcn.14016eccc
jmp 0x140140b37
mov rcx, rbx
call fcn.140109380
mov rax, qword [rsp + 0x58]
mov ecx, 0x4c4b40
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
mov qword [rbx + 0x20], rcx
jmp 0x140140e88
mov rcx, rbx
call fcn.140109380
mov rax, qword [rsp + 0x58]
mov ecx, 0x4c4b40
lea rdx, [rcx + rax]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
mov qword [rbx + 0x20], rcx
jmp 0x140140d11
mov rcx, rdi
call fcn.1400b6510
mov rcx, rdi
call fcn.14016eccc
jmp 0x140140bdb
mov rcx, rdi
call fcn.1400ad7f0
mov rcx, rdi
call fcn.14016eccc
jmp 0x140140b25
xor eax, eax
jmp 0x140140db5
lea rsi, [rsp + 0x58]
mov rcx, rsi
call qword [case.0x140211850.0]
mov rax, qword [rsi]
jmp 0x140140e42
lea rsi, [rsp + 0x58]
mov rcx, rsi
call qword [case.0x140211850.0]
mov rax, qword [rsi]
jmp 0x140140ccb
mov rcx, rdi
call fcn.1400ad7f0
mov rcx, rdi
call fcn.14016eccc
jmp 0x140140bc9
xor esi, esi
jmp 0x140140a98
mov rcx, qword [rsp + 0x620]
xor rcx, rsp
call fcn.140171860
mov rcx, rbx
add rsp, 0x628
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140220ea0
mov rcx, qword [rsp + 0x620]
xor rcx, rsp
call fcn.140171860
mov rcx, rbx
add rsp, 0x628
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140220c10
mov rcx, qword [rsp + 0x620]
xor rcx, rsp
call fcn.140171860
mov rcx, rbx
add rsp, 0x628
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140220900
lea rax, str.null_pointer_given_to_construct_at
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str....._buildtools_third_partylibc_trunkinclude__memoryconstruct_at.h
lea r9, str.__location___nullptr
mov r8d, 0x23
call fcn.1401c469a
mov rdi, qword [rbx + 0x30]
mov rax, qword [rdi + 0x10]
mov esi, dword [rax + 4]
call sub.KERNEL32.dll_GetCurrentThreadId
cmp esi, eax
jne 0x140140ea8
lea rsi, [rdi + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140141395
mov r15, qword [rdi + 0x38]
mov rax, qword [rdi + 0xb0]
mov rcx, qword [rdi + 0xb8]
mov rbx, qword [rcx + 0x10]
mov r14, qword [rax + 0x10]
mov r12, qword [rdi + 0xd0]
mov r13, qword [rdi + 0xc8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test byte [0x140342240], 0x19
je 0x140140ea8
sub r12, r13
shr r12, 3
imul eax, r12d, 0x3cf3cf3d
add ebx, r15d
add r14d, eax
add r14d, ebx
mov ecx, dword [rdi]
call fcn.1400b64f0
mov rsi, rax
lea rdi, [rsp + 0x58]
mov rcx, rdi
call fcn.14007a620
call sub.KERNEL32.dll_GetCurrentThreadId
movaps xmm0, xmmword [0x140301d60]
lea rbx, [rsp + 0x5f0]
movaps xmmword [rbx], xmm0
movaps xmmword [rbx + 0x10], xmm0
movabs rcx, 0xaaaaaaaaaaaaaaaa
mov qword [rbx + 0x20], rcx
mov word [rbx], 0x301
lea rcx, [0x140303385]
mov qword [rbx + 8], rcx
movsxd rcx, r14d
mov qword [rbx + 0x18], rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
lea rdx, [0x140342240]
mov cl, 0x43
mov r8, rsi
xor r9d, r9d
call fcn.1401b9550
mov rcx, rbx
call fcn.140041948
jmp 0x140140ea8
movaps xmm0, xmmword [0x140301d60]
lea rdi, [rsp + 0x70]
movaps xmmword [rdi], xmm0
mov rdx, qword [rbx]
mov rcx, rdi
call fcn.140221e30
mov rax, qword [rdi]
test rax, rax
je 0x1401412a9
lea r14, [rsp + 0x70]
xor edi, edi
cmp byte [r13 + 0x158], 0
je 0x1401413a4
imul rdx, qword [rsp + 0x78], 0xa8
mov rcx, qword [rax + 0x18]
mov rax, qword [rcx + rdx + 0x28]
cmp rax, qword [r13 + 0x160]
jge 0x1401412cf
mov rcx, r14
call fcn.14016e920
mov rax, qword [rsp + 0x70]
test rax, rax
jne 0x14014126c
jmp 0x1401412ab
xor edi, edi
mov rax, qword [0x1403428e0]
and rax, rdi
cmp rax, qword [0x1403428c8]
jne 0x140140d82
mov rcx, rdi
call fcn.1401571d0
jmp 0x140140d82
add rcx, rdx
mov byte [r13 + 0x158], 0
lea rdi, [rsp + 0x58]
mov rdx, rdi
call fcn.1400d6ac0
lea rcx, [rsp + 0x5f0]
mov rdx, rdi
call fcn.14023ebc0
lea rdi, [r13 + 0x138]
cmp byte [r13 + 0x130], 0
jne 0x140141327
mov eax, dword [rsp + 0x600]
mov dword [rdi + 0x10], eax
movups xmm0, xmmword [rsp + 0x5f0]
movups xmmword [rdi], xmm0
mov byte [r13 + 0x130], 1
jmp 0x140141341
lea rdx, [rsp + 0x5f0]
mov rcx, rdi
call fcn.140079100
cmp byte [r13 + 0x130], 0
je 0x1401413a2
mov rcx, qword [r13 + 0xb8]
mov eax, dword [rdi + 0x10]
lea rdx, [rsp + 0x5f0]
mov dword [rdx + 0x10], eax
movups xmm0, xmmword [rdi]
movaps xmmword [rdx], xmm0
call fcn.140221210
cmp byte [r13 + 0x130], 0
je 0x1401413a2
mov rcx, qword [r13 + 0xb0]
mov eax, dword [rdi + 0x10]
lea rdx, [rsp + 0x5f0]
mov dword [rdx + 0x10], eax
movups xmm0, xmmword [rdi]
movaps xmmword [rdx], xmm0
call fcn.140221210
mov rdi, qword [rsp + 0x70]
jmp 0x1401412ab
mov rcx, rsi
call fcn.140047ff0
jmp 0x140141158
ud2
call fcn.1401ca202
int3