Function at 0x140165b70
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 [0x14029b028]
xor rax, rsp
mov qword [rsp + 0x70], rax
movabs rdx, 0x7fffffffffffffff
cmp byte [r8], 0
je 0x140165ce0
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 0x140165cf5
mov r14, rdx
mov rax, qword [fcn.140105050]
lea rcx, [0x140182e50]
cmp rax, rcx
jne 0x140165e52
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 0x140165ed4
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b0aa0]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
mov rdx, r14
jne 0x140165c26
mov byte [rsi], 1
mov rcx, r13
cmp r15d, 1
je 0x140165ea7
cmp rax, rcx
jge 0x140165cfe
cmp qword [rdi + 0x230], 0
jne 0x140165ce0
mov al, 1
mov r14, r13
test r13, r13
je 0x140165cfe
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, [0x140183e20]
cmp rax, rcx
jne 0x140165e91
cmp qword [rdi + 0x198], r14
je 0x140165cc1
mov qword [rdi + 0x198], r14
mov eax, dword [rdi + 0x1c0]
cmp eax, 4
je 0x140165d11
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1401874c0
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 0x140165c58
mov rax, qword [rsi + 8]
jmp 0x140165c26
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x1401eda70.0]
jmp 0x140165cc1
mov al, byte [rsi]
cmp r14, rdx
je 0x140165ddb
test al, al
jne 0x140165dd5
mov rax, qword [fcn.140105050]
lea rcx, [0x140182e50]
cmp rax, rcx
jne 0x140165e68
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 0x140165f22
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b0aa0]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
jne 0x140165d82
mov byte [rsi], 1
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.0x1401eda70.0]
jmp 0x140165cc1
mov rax, qword [rsi + 8]
jmp 0x140165d82
mov rdi, qword [rdi + 0x248]
mov qword [rsp + 0x20], rdx
test al, al
jne 0x140165f49
mov rax, qword [fcn.140105050]
lea rcx, [0x140182e50]
cmp rax, rcx
jne 0x140165e7e
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 0x140165f52
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b0aa0]
cmp byte [rsi], 0
mov qword [rsi + 8], rax
jne 0x140165db3
mov byte [rsi], 1
jmp 0x140165db3
lea rbx, [rsp + 0x40]
mov rcx, rbx
call qword [case.0x1401eda70.0]
mov rax, qword [rbx]
jmp 0x140165c17
lea rbx, [rsp + 0x40]
mov rcx, rbx
call qword [case.0x1401eda70.0]
mov rax, qword [rbx]
jmp 0x140165d76
lea rbx, [rsp + 0x38]
mov rcx, rbx
call qword [case.0x1401eda70.0]
mov rax, qword [rbx]
jmp 0x140165e3d
lea r8, [rsp + 0x48]
mov rcx, rdi
mov rdx, rsi
call qword [case.0x1401eda70.0]
jmp 0x140165cc1
mov r8, rdx
lea rcx, [rdx + r12]
add rcx, 2
cmp rcx, 2
jae 0x140165efb
cmp r13, r12
je 0x140165f79
mov rdx, r8
lea rcx, [r8 + 1]
test r12, r12
cmovs rcx, r8
jmp 0x140165c33
mov rcx, qword [0x1402b0aa0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140165c17
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 0x140165c33
mov rcx, qword [0x1402b0aa0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140165d76
mov rax, qword [rsi + 8]
jmp 0x140165db3
mov rcx, qword [0x1402b0aa0]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140165e3d
int3