Function at 0x140099c50
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
mov rax, qword [rcx]
cmp rax, 3
je 0x14009a817
mov rdi, rdx
mov rsi, rcx
cmp eax, 2
jne 0x140099cc0
lea rbx, [rsi + 8]
mov rcx, rbx
call fcn.140075a50
lea rcx, [rsp + 0x60]
mov rdx, rbx
mov r8, rdi
call fcn.140075c10
movzx eax, byte [rsp + 0x60]
cmp eax, 4
je 0x14009a72c
cmp eax, 3
jne 0x14009a6cc
mov bpl, 5
cmp bpl, 6
je 0x14009a7a1
jmp 0x14009a899
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceCounter
test eax, eax
je 0x14009a99d
mov rbx, qword [rsp + 0x20]
mov rcx, qword [0x1401a4140]
test rcx, rcx
jne 0x140099d1c
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceFrequency
test eax, eax
je 0x14009a99d
mov rcx, qword [rsp + 0x20]
mov qword [0x1401a4140], rcx
test rcx, rcx
je 0x14009a817
mov rax, rbx
or rax, rcx
shr rax, 0x20
je 0x140099d32
mov rax, rbx
xor edx, edx
div rcx
jmp 0x140099d38
mov eax, ebx
xor edx, edx
div ecx
imul r8, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
je 0x140099d5c
xor edx, edx
div rcx
mov r14, rax
jmp 0x140099d63
xor edx, edx
div ecx
mov r14d, eax
add r14, r8
mov rax, r14
shr rax, 9
movabs rcx, 0x44b82fa09b5a53
mul rcx
mov r12, rdx
mov r13, qword [rsi + 0x510]
lea r15, [r13 + 0x10]
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
movzx eax, byte [r13 + 0x18]
test al, al
jne 0x14009a817
mov rax, qword [rsi + 0x510]
mov rax, qword [rax]
mov qword [rsp + 0x88], rax
mov r8d, dword [rsi + 0x4e8]
cmp r8d, 0x3b9aca00
je 0x14009a0d6
movzx eax, byte [rsi + 0x509]
test rax, rax
je 0x140099de0
cmp eax, 1
je 0x140099df4
cmp dword [r13 + 0x38], 0x3b9aca00
jne 0x140099df4
jmp 0x140099dfe
cmp qword [rsp + 0x88], 2
ja 0x140099dfe
cmp byte [rsi + 0x508], 0
jne 0x140099dfe
cmp al, 1
jne 0x14009a0d6
jmp 0x140099e5a
mov byte [rsi + 0x509], 1
mov eax, dword [r13 + 0x58]
cmp eax, 0x3b9aca00
je 0x14009a817
mov rdx, qword [r13 + 0x50]
add rdx, qword [rsi + 0x4e0]
jb 0x14009a817
add r8d, eax
cmp r8d, 0x3b9aca00
jb 0x140099e4e
inc rdx
je 0x14009a817
add r8d, 0xc4653600
cmp r8d, 0x3b9aca00
je 0x14009a817
mov rcx, qword [rsi + 0x500]
call fcn.140105ae0
mov qword [rsp + 0x50], r12
mov r12, qword [rsi + 0x500]
mov rbx, qword [rdi]
xor ecx, ecx
call fcn.140102310
test rax, rax
je 0x140099ec0
mov qword [rsp + 0x58], r13
mov r13, r14
mov r14, r15
movzx r15d, byte [rax + 0x4c]
movzx ebp, byte [rax + 0x4d]
test r15b, r15b
je 0x140099ee5
test bpl, bpl
jne 0x140099ee5
mov rax, qword [rbx]
mov rcx, qword [rbx + 8]
call qword [rax + 0x10]
mov r15, r14
mov r14, r13
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
cmp dword [r13 + 0x38], 0x3b9aca00
jne 0x14009a0e4
jmp 0x14009a699
mov rcx, r12
mov rdx, rdi
call fcn.1401026a0
mov r12, qword [rsp + 0x50]
test al, al
je 0x140099f52
movzx eax, al
cmp eax, 4
je 0x14009a0d6
jmp 0x14009a817
xor ecx, ecx
mov edx, ebp
sub dl, 1
movzx edx, dl
cmovb edx, ecx
test r15b, r15b
movzx ecx, bpl
cmovne ecx, edx
mov byte [rax + 0x4d], cl
mov rcx, r12
mov rdx, rdi
call fcn.1401026a0
test r15b, r15b
je 0x14009a02b
cmp al, 4
mov r15, r14
mov r14, r13
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
jne 0x140099ed0
xor ecx, ecx
call fcn.140102310
test rax, rax
je 0x14009a0d6
mov byte [rax + 0x4c], 1
mov byte [rax + 0x4d], bpl
cmp dword [r13 + 0x38], 0x3b9aca00
jne 0x14009a0e4
jmp 0x14009a699
mov eax, dword [r13 + 0x58]
cmp eax, 0x3b9aca00
je 0x14009a817
mov rcx, qword [r13 + 0x50]
add rcx, qword [rsi + 0x4e0]
jb 0x14009a817
add eax, dword [rsi + 0x4e8]
cmp eax, 0x3b9aca00
jb 0x140099f8d
inc rcx
je 0x14009a817
add eax, 0xc4653600
mov rdx, qword [rsi + 0x500]
cmp rcx, qword [rdx + 0x10]
jb 0x140099fa9
jne 0x14009a2fb
cmp eax, dword [rdx + 0x18]
ja 0x14009a2fb
lea rcx, [r13 + 0x20]
call fcn.14003fd20
mov byte [rsi + 0x509], 2
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceCounter
test eax, eax
je 0x14009a99d
mov r12, qword [rsp + 0x20]
mov rcx, qword [0x1401a4140]
test rcx, rcx
jne 0x14009a015
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceFrequency
test eax, eax
je 0x14009a99d
mov rcx, qword [rsp + 0x20]
mov qword [0x1401a4140], rcx
test rcx, rcx
je 0x14009a817
mov rax, r12
or rax, rcx
shr rax, 0x20
je 0x14009a03b
mov rax, r12
xor edx, edx
div rcx
jmp 0x14009a042
mov r15, r14
mov r14, r13
mov r13, qword [rsp + 0x58]
jmp 0x140099ecb
mov eax, r12d
xor edx, edx
div ecx
imul r9, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
mov r12, qword [rsp + 0x50]
je 0x14009a06b
xor edx, edx
div rcx
mov r8, rax
jmp 0x14009a072
xor edx, edx
div ecx
mov r8d, eax
add r8, r9
mov rax, r8
shr rax, 9
movabs rcx, 0x44b82fa09b5a53
mul rcx
mov rax, rdx
shr rax, 0xb
mov rdx, qword [rsi + 0x4f0]
add rdx, rax
jb 0x14009a817
imul rax, rax, 0x3b9aca00
sub r8, rax
add r8d, dword [rsi + 0x4f8]
cmp r8d, 0x3b9aca00
jb 0x14009a0ca
inc rdx
je 0x14009a817
add r8d, 0xc4653600
mov rcx, qword [rsi + 0x500]
call fcn.140105ae0
cmp dword [r13 + 0x38], 0x3b9aca00
je 0x14009a699
mov rbx, qword [r13 + 0x60]
lea rcx, [rbx + 0x30]
mov rdx, qword [rdi]
call fcn.14001d390
xor ecx, ecx
mov eax, 3
lock cmpxchg qword [rbx + 0x10], rcx
cmp rax, 3
je 0x14009a17e
cmp rax, 4
je 0x14009a699
cmp dword [rsi + 0x4e8], 0x3b9aca00
je 0x14009a699
cmp byte [rsi + 0x509], 2
jb 0x14009a699
mov r14, qword [rsi + 0x500]
mov rbx, qword [rdi]
xor ecx, ecx
call fcn.140102310
test rax, rax
je 0x14009a282
mov r12, rdi
mov rdi, r15
movzx r15d, byte [rax + 0x4c]
movzx ebp, byte [rax + 0x4d]
test r15b, r15b
je 0x14009a2a6
test bpl, bpl
jne 0x14009a2a6
mov rax, qword [rbx]
mov rcx, qword [rbx + 8]
call qword [rax + 0x10]
mov r15, rdi
mov rdi, r12
jmp 0x14009a699
mov eax, dword [r13 + 0x38]
cmp eax, 0x3b9aca00
je 0x14009a817
shr r12, 0xb
imul ecx, r12d, 0x3b9aca00
sub r14d, ecx
mov rcx, qword [r13 + 0x30]
mov dword [r13 + 0x38], 0x3b9aca00
mov qword [rsp + 0x60], r12
mov dword [rsp + 0x68], r14d
mov qword [rsp + 0x20], rcx
mov dword [rsp + 0x28], eax
lea rcx, [rsp + 0x60]
lea rdx, [rsp + 0x20]
call fcn.1400f0810
mov r9, rax
mov ebp, edx
xor ebx, ebx
cmp edx, 0x3b9aca00
cmovne ebx, edx
cmp dword [rsi + 0x4e8], 0x3b9aca00
je 0x14009a45c
mov r8d, 0x3b9aca00
cmp dword [r13 + 0x58], 0x3b9aca00
je 0x14009a3d0
mov qword [rsp + 0x50], r9
mov dword [rsp + 0x58], ebx
mov rbx, r12
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceCounter
test eax, eax
je 0x14009a99d
mov r12, qword [rsp + 0x20]
mov rcx, qword [0x1401a4140]
test rcx, rcx
jne 0x14009a265
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
call sub.KERNEL32.dll_QueryPerformanceFrequency
test eax, eax
je 0x14009a99d
mov rcx, qword [rsp + 0x20]
mov qword [0x1401a4140], rcx
test rcx, rcx
je 0x14009a817
mov rax, r12
or rax, rcx
shr rax, 0x20
je 0x14009a366
mov rax, r12
xor edx, edx
div rcx
jmp 0x14009a36d
mov rcx, r14
mov rdx, rdi
call fcn.1401026a0
test al, al
je 0x14009a322
movzx eax, al
cmp eax, 4
je 0x14009a699
jmp 0x14009a817
xor ecx, ecx
mov edx, ebp
sub dl, 1
movzx edx, dl
cmovb edx, ecx
test r15b, r15b
movzx ecx, bpl
cmovne ecx, edx
mov byte [rax + 0x4d], cl
mov rcx, r14
mov rdx, r12
call fcn.1401026a0
test r15b, r15b
je 0x14009a81b
cmp al, 4
mov r15, rdi
mov rdi, r12
jne 0x14009a28d
xor ecx, ecx
call fcn.140102310
test rax, rax
je 0x14009a699
mov byte [rax + 0x4c], 1
mov byte [rax + 0x4d], bpl
jmp 0x14009a699
mov byte [rsi + 0x509], 0
mov rax, qword [rdi]
mov rdx, qword [rax]
mov rcx, qword [rax + 8]
call qword [rdx + 0x10]
cmp dword [r13 + 0x38], 0x3b9aca00
jne 0x14009a0e4
jmp 0x14009a699
cmp dword [rsi + 0x4e8], 0x3b9aca00
je 0x14009a859
mov rdi, qword [rsi + 0x500]
mov rcx, rdi
call fcn.1401028c0
lea rcx, [rdi + 8]
cmp qword [rdi], 0
je 0x14009a826
mov rax, qword [rcx]
lock dec qword [rax]
jne 0x14009a834
call fcn.14003a1d0
jmp 0x14009a834
mov eax, r12d
xor edx, edx
div ecx
imul r9, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
mov r12, rbx
je 0x14009a394
xor edx, edx
div rcx
mov r8, rax
jmp 0x14009a39b
xor edx, edx
div ecx
mov r8d, eax
mov ebx, dword [rsp + 0x58]
add r8, r9
mov rax, r8
shr rax, 9
movabs rcx, 0x44b82fa09b5a53
mul rcx
shr rdx, 0xb
imul eax, edx, 0x3b9aca00
sub r8d, eax
mov qword [r13 + 0x50], rdx
mov dword [r13 + 0x58], r8d
mov r9, qword [rsp + 0x50]
movzx eax, byte [rsi + 0x509]
test rax, rax
je 0x14009a3ed
cmp eax, 1
je 0x14009a45c
cmp dword [r13 + 0x38], 0x3b9aca00
je 0x14009a401
jmp 0x14009a45c
cmp qword [rsp + 0x88], 2
ja 0x14009a401
cmp byte [rsi + 0x508], 0
je 0x14009a45c
mov byte [rsi + 0x509], 1
cmp r8d, 0x3b9aca00
je 0x14009a817
mov rdx, qword [r13 + 0x50]
add rdx, qword [rsi + 0x4e0]
jb 0x14009a817
add r8d, dword [rsi + 0x4e8]
cmp r8d, 0x3b9aca00
mov qword [rsp + 0x50], r9
jb 0x14009a44b
inc rdx
je 0x14009a817
add r8d, 0xc4653600
mov rcx, qword [rsi + 0x500]
call fcn.140105ae0
mov r9, qword [rsp + 0x50]
cmp dword [rsi + 0x4c0], 0x3b9aca00
je 0x14009a699
cmp qword [r13 + 0x20], 0
je 0x14009a817
mov rcx, qword [r13 + 0x28]
mov qword [r13 + 0x20], 1
mov qword [r13 + 0x28], 0
mov eax, dword [rsi + 0x4d8]
cmp rax, 0x1000000
je 0x14009a575
xorpd xmm0, xmm0
xorpd xmm1, xmm1
cmp ebp, 0x3b9aca00
je 0x14009a4ce
movq xmm2, r9
punpckldq xmm2, xmmword [0x140127af0]
subpd xmm2, xmmword [0x140127b00]
movapd xmm1, xmm2
unpckhpd xmm1, xmm2
addsd xmm1, xmm2
mov edx, ebx
xorps xmm2, xmm2
cvtsi2sd xmm2, rdx
divsd xmm2, qword [0x140127b10]
addsd xmm2, xmm1
movsd xmm1, qword [rsi + 0x4d0]
movapd xmm3, xmm2
subsd xmm3, xmm1
mulsd xmm3, qword [0x140127b18]
movsd xmm4, qword [rsi + 0x4c8]
addsd xmm3, xmm1
cmpeqsd xmm0, xmm1
andpd xmm2, xmm0
andnpd xmm0, xmm3
orpd xmm0, xmm2
movlpd qword [rsi + 0x4d0], xmm0
movq xmm2, rcx
punpckldq xmm2, xmmword [0x140127af0]
subpd xmm2, xmmword [0x140127b00]
movapd xmm1, xmm2
unpckhpd xmm1, xmm2
mulsd xmm0, qword [0x140127b20]
addsd xmm1, xmm2
divsd xmm1, xmm0
ucomisd xmm4, xmm1
ja 0x14009a575
movsd qword [rsi + 0x4c8], xmm1
add rax, rax
movabs rdx, 0x5555555555555556
mul rdx
cmp rdx, rcx
jbe 0x14009a7b3
mov rax, qword [rsi + 0x4b8]
mov r9, r12
cmp rax, 9
ja 0x14009a5e7
mov ecx, dword [rsi + 0x4dc]
inc ecx
mov dword [rsi + 0x4dc], ecx
cmp ecx, 2
jb 0x14009a5e7
mov ecx, dword [rsi + 0x4c0]
lea edx, [rcx*4]
mov r8d, edx
shr r8d, 9
imul r8, r8, 0x44b83
shr r8, 0x27
imul r8d, r8d, 0x3b9aca00
sub edx, r8d
imul rcx, rcx, 0x44b82fa1
shr rcx, 0x3a
lea rax, [rcx + rax*4]
mov qword [rsi + 0x4b8], rax
mov dword [rsi + 0x4c0], edx
mov dword [rsi + 0x4dc], 0
xor ecx, ecx
add r9, rax
jb 0x14009a817
add r14d, dword [rsi + 0x4c0]
cmp r14d, 0x3b9aca00
jb 0x14009a612
inc r9
je 0x14009a817
add r14d, 0xc4653600
mov qword [r13 + 0x40], r9
mov dword [r13 + 0x48], r14d
test cl, cl
je 0x14009a699
mov rcx, r15
call fcn.140118b6c
mov rcx, qword [rsi + 0x400]
mov edx, r12d
call fcn.1400bf5b0
cmp dword [rsi + 0x438], 2
jb 0x14009a7a8
mov qword [rsi + 0x438], 0
mov dword [rsi + 0x444], 0
mov dword [rsi + 0x44c], 0
mov dword [rsi + 0x454], 1
mov dword [rsi + 0x458], r12d
mov dword [rsi + 0x45c], 0
mov dword [rsi + 0x464], 0
mov dword [rsi + 0x46c], 0
mov byte [rsi + 0x474], 0
jmp 0x14009a6a1
mov rcx, r15
call fcn.140118b6c
mov rcx, rsi
call fcn.140075a50
lea rcx, [rsp + 0x60]
mov rdx, rsi
mov r8, rdi
call fcn.140075c10
movzx eax, byte [rsp + 0x60]
cmp eax, 4
je 0x14009a72c
cmp eax, 3
je 0x140099cae
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x40], rax
movups xmm0, xmmword [rsp + 0x60]
movupd xmm1, xmmword [rsp + 0x70]
movapd xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
movzx eax, byte [rsp + 0x20]
test rax, rax
je 0x14009a73a
cmp eax, 1
jne 0x14009a74c
mov rdi, qword [rsp + 0x28]
movaps xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x90], xmm0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xa0], rax
mov ebx, dword [rsp + 0x24]
mov bpl, 1
movzx r14d, byte [rsp + 0x21]
jmp 0x14009a775
mov bpl, 6
cmp bpl, 6
je 0x14009a7a1
jmp 0x14009a899
mov ebx, dword [rsp + 0x24]
mov edi, dword [rsp + 0x28]
movzx r14d, byte [rsp + 0x21]
xor ebp, ebp
jmp 0x14009a775
movzx edi, byte [rsp + 0x21]
cmp qword [rsp + 0x28], 0
je 0x14009a76a
lea rdx, [rsp + 0x28]
mov ecx, edi
call fcn.140021640
mov rdi, rax
jmp 0x14009a772
shl rdi, 0x20
or rdi, 3
mov bpl, 4
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xc0], rax
movapd xmm0, xmmword [rsp + 0x90]
movapd xmmword [rsp + 0xb0], xmm0
cmp bpl, 6
jne 0x14009a899
mov al, 2
jmp 0x14009a989
mov bpl, 3
mov r14b, 0xa
jmp 0x14009a899
mov r9, r12
add rcx, rcx
cmp rcx, 0x1000000
mov r12d, 0x1000000
cmovb r12, rcx
mov dword [rsi + 0x4d8], r12d
mov dword [rsi + 0x4dc], 0
mov rcx, qword [rsi + 0x4b8]
mov edx, dword [rsi + 0x4c0]
mov rax, rcx
shr rax, 1
shr edx, 1
lea r8d, [rdx + 0x1dcd6500]
test cl, 1
cmove r8d, edx
mov qword [rsi + 0x4b8], rax
mov dword [rsi + 0x4c0], r8d
mov cl, 1
add r9, rax
jae 0x14009a5f2
ud2
mov r15, rdi
mov rdi, r12
jmp 0x14009a28d
mov rax, qword [rcx]
lock dec qword [rax]
jne 0x14009a834
call fcn.140039fc0
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x14009a844
mov rcx, qword [rdi + 0x50]
call qword [rax + 0x18]
mov r8, qword [rsi + 0x500]
mov rcx, qword [0x1401a4160]
xor edx, edx
call sub.KERNEL32.dll_HeapFree
mov dword [rsi + 0x4e8], 0x3b9aca00
movupd xmm0, xmmword [rsp + 0x20]
movupd xmm1, xmmword [rsp + 0x30]
movupd xmmword [rsi + 0x4ec], xmm0
movupd xmmword [rsi + 0x4fc], xmm1
mov eax, dword [rsp + 0x40]
mov dword [rsi + 0x50c], eax
mov byte [r13 + 0x68], 1
mov rcx, r15
call fcn.140118b6c
mov bpl, 5
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x70], rax
movapd xmm0, xmmword [rsp + 0xb0]
movapd xmmword [rsp + 0x60], xmm0
cmp dword [rsi], 3
je 0x14009a9a6
mov rcx, rsi
call fcn.1400ab5b0
mov qword [rsi], 3
cmp bpl, 5
je 0x14009a982
mov byte [rsp + 0x20], bpl
mov byte [rsp + 0x21], r14b
mov dword [rsp + 0x24], ebx
mov qword [rsp + 0x28], rdi
movapd xmm0, xmmword [rsp + 0x60]
movupd xmmword [rsp + 0x30], xmm0
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x40], rax
movzx eax, bpl
lea ecx, [rax - 2]
cmp ecx, 2
jb 0x14009a982
test eax, eax
je 0x14009a982
cmp eax, 1
jne 0x14009a929
lea rcx, [rsp + 0x40]
mov rdx, qword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
call qword [rdi + 0x10]
jmp 0x14009a982
mov eax, edi
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x14009a982
test rax, rax
je 0x14009a982
lea rsi, [rdi - 1]
mov rbx, qword [rdi - 1]
mov rdi, qword [rdi + 7]
mov rcx, rbx
call qword [rdi]
cmp qword [rdi + 8], 0
je 0x14009a971
cmp qword [rdi + 0x10], 0x11
jb 0x14009a960
mov rbx, qword [rbx - 8]
mov rcx, qword [0x1401a4160]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x1401a4160]
xor edx, edx
mov r8, rsi
call sub.KERNEL32.dll_HeapFree
cmp bpl, 5
setne al
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetLastError
ud2
mov qword [rsi], 3
ud2