Function at 0x140160b40
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, 0x78
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x140297028]
xor rax, rsp
mov qword [rsp + 0x70], rax
movabs rdx, 0x7fffffffffffffff
cmp byte [r8], 0
je 0x140160cb2
mov r13, qword [r8 + 8]
mov r12, qword [r8 + 0x10]
mov ebp, dword [r8 + 0x18]
mov r15d, dword [r8 + 0x1c]
cmp byte [rsi], 0
jne 0x140160bf4
mov r14, rdx
mov rax, qword [fcn.1401038f0]
lea rcx, [0x14017e8a0]
cmp rax, rcx
jne 0x140160e1e
lea rbx, [rsp + 0x20]
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 0x140160f1e
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402ac9c8]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
mov rdx, r14
jne 0x140160bf8
mov byte [rsi], 1
jmp 0x140160bf8
mov rax, qword [rsi + 8]
mov rcx, r13
cmp r15d, 1
je 0x140160e73
cmp rax, rcx
jge 0x140160cc7
cmp qword [rdi + 0x230], 0
jne 0x140160cb2
mov al, 1
mov r14, r13
test r13, r13
je 0x140160cc7
mov rdi, qword [rdi + 0x30]
mov byte [rsp + 0x48], al
mov eax, 0xaaaaaaaa
mov dword [rsp + 0x49], eax
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], r12
mov dword [rsp + 0x60], ebp
mov dword [rsp + 0x64], r15d
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x68], rax
mov rax, qword [rdi]
mov rax, qword [rax + 0x20]
lea rcx, [0x14017fae0]
cmp rax, rcx
jne 0x140160e5d
cmp qword [rdi + 0x198], r14
je 0x140160c93
mov qword [rdi + 0x198], r14
mov eax, dword [rdi + 0x1c0]
cmp eax, 4
je 0x140160cda
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1401830b0
nop
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor r15d, r15d
xor ebp, ebp
xor r12d, r12d
xor r13d, r13d
mov r14, rdx
xor eax, eax
jmp 0x140160c2a
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x1401e9be0.0]
jmp 0x140160c93
mov al, byte [rsi]
cmp r14, rdx
je 0x140160da7
test al, al
je 0x140160d40
mov rax, qword [rsi + 8]
movabs rcx, 0x141dd76000
lea rdx, [rax + rcx]
sar rdx, 0x3f
btc rdx, 0x3f
add rcx, rax
cmovo rcx, rdx
cmp rcx, r14
cmovge rcx, r14
mov rdi, qword [rdi + 0x248]
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x20]
mov qword [rdx + 8], rax
mov byte [rdx + 0x10], 0
mov rax, qword [rdi]
mov rax, qword [rax + 0x20]
mov rcx, rdi
call qword [case.0x1401e9be0.0]
jmp 0x140160c93
mov rax, qword [fcn.1401038f0]
lea rcx, [0x14017e8a0]
cmp rax, rcx
jne 0x140160e34
lea rbx, [rsp + 0x20]
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 0x140160ed0
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402ac9c8]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
jne 0x140160ced
mov byte [rsi], 1
jmp 0x140160ced
mov rdi, qword [rdi + 0x248]
mov qword [rsp + 0x20], rdx
test al, al
jne 0x140160ec7
mov rax, qword [fcn.1401038f0]
lea rcx, [0x14017e8a0]
cmp rax, rcx
jne 0x140160e4a
lea rbx, [rsp + 0x40]
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 0x140160ef7
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402ac9c8]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
jne 0x140160d1e
mov byte [rsi], 1
jmp 0x140160d1e
lea rbx, [rsp + 0x40]
mov rcx, rbx
call qword [case.0x1401e9be0.0]
mov rax, qword [rbx]
jmp 0x140160be3
lea rbx, [rsp + 0x40]
mov rcx, rbx
call qword [case.0x1401e9be0.0]
mov rax, qword [rbx]
jmp 0x140160d92
lea rbx, [rsp + 0x38]
mov rcx, rbx
call qword [case.0x1401e9be0.0]
mov rax, qword [rbx]
jmp 0x140160e09
lea r8, [rsp + 0x48]
mov rcx, rdi
mov rdx, rsi
call qword [case.0x1401e9be0.0]
jmp 0x140160c93
mov r8, rdx
lea rcx, [rdx + r12]
add rcx, 2
cmp rcx, 2
jae 0x140160ea0
cmp r13, r12
je 0x140160f45
mov rdx, r8
lea rcx, [r8 + 1]
test r12, r12
cmovs rcx, r8
jmp 0x140160c05
xor ecx, ecx
cmp r13, r12
setns cl
movabs rdx, 0x7fffffffffffffff
add rdx, rcx
mov rcx, r13
sub rcx, r12
cmovo rcx, rdx
mov rdx, r8
jmp 0x140160c05
mov rax, qword [rsi + 8]
jmp 0x140160d1e
mov rcx, qword [0x1402ac9c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140160d92
mov rcx, qword [0x1402ac9c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140160e09
mov rcx, qword [0x1402ac9c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140160be3
int3