Function at 0x140013170
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
sub rsp, 0x30
mov r13d, dword [rsp + 0x88]
mov r14d, r9d
mov rdi, rdx
mov rbx, rcx
test r13d, r13d
jne 0x1400131c1
lea rcx, [0x14012f2f8]
call fcn.1400dd2e0
lea r8, [0x1401295d4]
lea rcx, [0x1401712e0]
mov rdx, rax
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rbx
jmp fcn.1400a5580
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsi]
lea r12, [0x1401295d4]
mov ecx, dword [rbp + 0x10]
test ecx, ecx
je 0x14001320f
dec ecx
je 0x1400131f5
dec ecx
je 0x1400131f5
sub ecx, 2
je 0x1400131fa
dec ecx
je 0x14001320f
mov rbp, r12
jmp 0x140013213
mov rcx, qword [rbp]
xor r8d, r8d
lea edx, [r8 + 1]
call fcn.140001550
mov rbp, rax
jmp 0x140013213
mov rbp, qword [rbp]
test r14b, 2
je 0x1400133d1
lea rdx, str.Start
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x1400132a7
cmp dword [rbx + 0x10], 1
lea rdi, [rbx + 0x10]
je 0x140013395
mov rax, qword [rbx + 0x28]
xor esi, esi
mov dword [rbx + 0x30], esi
mov word [rax], si
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x140013259
mov rax, qword [rcx]
call qword [rax + VariantCopy]
cmp dword [rdi + 0x54], esi
jle 0x140013266
mov rcx, rdi
call fcn.140044ca0
mov rax, qword [0x1401703d8]
or byte [0x140170440], 1
cmp qword [0x14016f9b0], rsi
mov qword [rdi + 8], rax
mov dword [rdi], 1
mov qword [0x1401703d8], rdi
jne 0x14001329d
mov rax, qword [0x140169c40]
movzx ecx, word [rax]
call fcn.140009cf0
mov eax, 1
jmp 0x1400138a2
lea rdx, str.Wait
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x140013353
cmp r13d, 1
jle 0x1400132e8
mov rcx, qword [rsi + 8]
cmp dword [rcx + 0x10], 3
je 0x1400132e8
lea edx, [rax + 1]
xor r8d, r8d
call fcn.1400708b0
mulsd xmm0, qword [0x140153230]
cvttsd2si rsi, xmm0
jmp 0x1400132eb
or esi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rbx + 0x10], 1
mov ebp, eax
jne 0x140013321
nop dword [rax]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, esi
jae 0x140013321
mov edx, 1
mov ecx, 0x8000012f
call fcn.140001760
cmp dword [rbx + 0x10], 1
je 0x140013300
xor esi, esi
mov dword [rdi + 0x10], esi
mov eax, dword [rbx + 0x10]
cmp eax, 6
ja 0x140013346
lea rcx, [rbx + 0x10]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], eax
call fcn.140045390
mov r12, rax
mov qword [rdi], r12
mov eax, 1
jmp 0x1400138a2
lea rdx, str.Stop
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x14001339f
cmp dword [rbx + 0x10], 1
lea r8, [rbx + 0x10]
jne 0x140013395
movzx eax, byte [0x14016f85d]
mov rcx, qword [0x14016f860]
xor esi, esi
xor r9d, r9d
mov edx, 0x41b
mov dword [r8], esi
mov byte [r8 + 0x6c], al
call qword [sym.imp.USER32.dll_PostMessageW]
mov eax, 1
jmp 0x1400138a2
lea rdx, str.KeyOpt
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x1400133c7
lea r8d, [r13 - 1]
lea rdx, [rsi + 8]
mov rcx, rbx
call fcn.1400138c0
jmp 0x1400138a2
mov eax, 4
jmp 0x1400138a2
mov qword [rsp + 0x70], r15
mov r15d, r14d
mov esi, 0
and r15d, 1
mov eax, esi
setne al
inc eax
cmp r13d, eax
je 0x1400133fa
lea rcx, [0x14012f2f8]
jmp 0x1400136b2
test r14b, 3
jne 0x14001359a
lea rdx, str.Input
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x14001342f
mov dword [rdi + 0x10], esi
movsxd r8, dword [rbx + 0x30]
mov rdx, qword [rbx + 0x28]
mov rcx, rdi
call fcn.140070e30
jmp 0x14001389d
lea rdx, str.InProgress
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x14001345e
mov dword [rdi + 0x10], 1
cmp dword [rbx + 0x10], 1
mov eax, 1
sete sil
mov qword [rdi], rsi
jmp 0x14001389d
lea rdx, str.EndReason
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x1400134a0
lea rcx, [rbx + 0x10]
mov dword [rdi + 0x10], esi
mov eax, dword [rcx]
cmp eax, 6
ja 0x140013493
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], eax
call fcn.140045390
mov r12, rax
mov qword [rdi], r12
mov eax, 1
jmp 0x14001389d
lea rdx, str.EndKey
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x1400134e9
lea rcx, [rbx + 0x10]
mov dword [rdi + 0x10], esi
cmp dword [rcx], 4
jne 0x140013493
mov rdx, qword [rdi + 8]
mov qword [rdi], rdx
mov eax, dword [rcx]
cmp eax, 6
ja 0x140013496
xor r9d, r9d
mov r8d, pe_nt_image_headers64
mov dword [rsp + 0x20], eax
call fcn.140045390
mov eax, 1
jmp 0x14001389d
lea rdx, str.EndMods
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x140013554
mov rcx, qword [rdi + 8]
mov dword [rdi + 0x10], esi
mov edx, 1
lea r8, str.__________
lea r9, [0x14012f3aa]
lea r10d, [rax + 8]
mov qword [rdi], rcx
nop dword [rax]
test byte [rbx + 0x7c], dl
je 0x140013539
movzx eax, word [r8]
add rcx, 4
mov word [rcx - 4], ax
movzx eax, word [r9]
mov word [rcx - 2], ax
rol edx, 1
add r8, 4
add r9, 4
dec r10
jne 0x140013520
mov word [rcx], si
lea eax, [r10 + 1]
jmp 0x14001389d
lea rdx, str.Match
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x14001359a
mov dword [rdi + 0x10], esi
cmp dword [rbx + 0x10], 3
jne 0x140013493
mov eax, dword [rbx + 0x80]
cmp eax, dword [rbx + 0x50]
jae 0x140013493
mov ecx, eax
mov rax, qword [rbx + 0x48]
mov rcx, qword [rax + rcx*8]
mov eax, 1
mov qword [rdi], rcx
jmp 0x14001389d
lea rdx, [0x14012e7c4]
mov r8d, 2
mov rcx, rbp
call fcn.140108e4c
test eax, eax
jne 0x1400136ce
add rbp, 4
lea rdx, [0x14012f3e0]
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x1400135d7
add rbx, 0x388
jmp 0x14001363d
lea rcx, [0x14012f3e8]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x1400135fb
add rbx, 0x390
jmp 0x14001363d
lea rcx, [0x14012f408]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x14001361f
add rbx, 0x3a0
jmp 0x14001363d
lea rdx, str.Char
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x140013898
add rbx, 0x398
test r15d, r15d
je 0x140013675
mov rbp, qword [rsp + 0x80]
mov rcx, qword [rbp + 8]
call fcn.140070ce0
mov rsi, rax
test rax, rax
je 0x14001369e
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + VariantCopy]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140013672
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov qword [rbx], rsi
mov rcx, qword [rbx]
test rcx, rcx
je 0x140013891
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov r11, qword [rbx]
mov dword [rdi + 0x10], 6
mov qword [rdi], r11
mov eax, 1
jmp 0x14001389d
mov rcx, qword [rbp + 8]
call fcn.140070710
test eax, eax
jne 0x140013664
lea rcx, [0x14012f438]
call fcn.1400dd2e0
lea rcx, [0x1401712e0]
mov r8, r12
mov rdx, rax
call fcn.1400a5580
jmp 0x14001389d
lea rcx, [0x14012f468]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x14001371c
test r15d, r15d
je 0x140013704
mov rbp, qword [rsp + 0x80]
xor edx, edx
mov rcx, qword [rbp + 8]
call fcn.140070810
mov byte [rbx + 0x6c], al
movzx eax, byte [rbx + 0x6c]
mov dword [rdi + 0x10], 1
mov qword [rdi], rax
mov eax, 1
jmp 0x14001389d
lea rdx, str.Timeout
mov rcx, rbp
call fcn.140108424
test eax, eax
jne 0x140013793
test r15d, r15d
je 0x14001376d
mov rbp, qword [rsp + 0x80]
lea edx, [rax + 1]
xor r8d, r8d
mov rcx, qword [rbp + 8]
call fcn.1400708b0
cmp dword [rbx + 0x10], 1
lea rcx, [rbx + 0x10]
mulsd xmm0, qword [0x140153230]
cvttsd2si eax, xmm0
mov dword [rbx + 0x64], eax
jne 0x14001376d
test eax, eax
jle 0x14001376d
call fcn.140044ca0
movd xmm0, dword [rbx + 0x64]
mov eax, 1
mov dword [rdi + 0x10], 2
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x140153230]
movsd qword [rdi], xmm0
jmp 0x14001389d
lea rcx, [0x14012f498]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x1400137b7
add rbx, 0x6d
jmp 0x14001385d
lea rcx, [0x14012f4c8]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x1400137db
add rbx, 0x6e
jmp 0x14001385d
lea rcx, [0x14012f4f8]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x1400137fc
add rbx, 0x73
jmp 0x14001385d
lea rcx, [0x14012f528]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x14001381d
add rbx, 0x70
jmp 0x14001385d
lea rcx, str._f3_386_
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x14001383e
add rbx, 0x71
jmp 0x14001385d
lea rcx, [0x14012f580]
call fcn.1400dd2e0
mov rcx, rbp
mov rdx, rax
call fcn.140108424
test eax, eax
jne 0x140013898
add rbx, 0x72
test rbx, rbx
je 0x140013898
test r15d, r15d
je 0x140013884
mov rbp, qword [rsp + 0x80]
mov edx, 0x41
mov rcx, qword [rbp + 8]
call fcn.1400703c0
test eax, eax
setne al
mov byte [rbx], al
movzx eax, byte [rbx]
mov dword [rdi + 0x10], 1
mov qword [rdi], rax
mov eax, 1
jmp 0x14001389d
mov eax, 4
mov r15, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret