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

Disassembly:
push rbx
push rsi
push r13
push r14
sub rsp, 0x68
xor al, al
movzx r14d, dl
cmp qword [0x14012be68], 0
mov r13d, 1
movzx esi, al
cmovne esi, r13d
movzx ebx, cl
cmp qword [0x14012be60], 0
je 0x140016cd7
or sil, 2
cmp bl, sil
je 0x140016fde
mov qword [rsp + 0xa8], r12
xor r12d, r12d
test sil, sil
jne 0x140016d3a
test dl, dl
jne 0x140016d3a
lea rax, [0x14012bfc0]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea r8, [0x140017060]
mov edx, 0x2000
mov dword [rsp + 0x20], r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14012e088], rax
test rax, rax
je 0x140016e3e
mov edx, reloc.WSOCK32.dll_ntohs
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov qword [rsp + 0x98], rbp
mov rbp, r14
mov qword [rsp + 0xa0], rdi
xor rbp, r13
mov qword [rsp + 0x60], r15
mov edi, r12d
nop dword [rax + rax]
mov ecx, dword [0x14012bfc0]
mov r9, rbp
mov r8, rbx
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x140016d8d
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x140016d60
xor dil, dil
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r15, qword [rsp + 0x60]
mov ebp, eax
nop dword [rax]
test bl, bl
je 0x140016e48
mov r9d, 0x417
mov dword [rsp + 0x20], r13d
mov r8d, r9d
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140016e22
cmp qword [rsp + 0x40], r12
je 0x140016e72
xor al, al
movzx edi, r13b
cmp qword [0x14012be68], r12
movzx eax, al
cmovne eax, r13d
cmp qword [0x14012be60], r12
je 0x140016df1
or al, 2
test al, al
jne 0x140016e72
test r14b, r14b
jne 0x140016f9c
xor bl, bl
mov rcx, qword [0x14012e088]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x90], 0x103
jne 0x140016e80
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1f4
ja 0x140016e72
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140016da0
call fcn.140017480
jmp 0x140016fd6
test r14b, r14b
je 0x140016e00
xor al, al
cmp qword [0x14012be68], r12
movzx eax, al
cmovne eax, r13d
cmp qword [0x14012be60], r12
je 0x140016e68
or al, 2
test al, al
je 0x140016f97
jmp 0x140016e22
test r14b, r14b
jne 0x140016f97
jmp 0x140016f0c
mov rcx, qword [0x14012e088]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14012e0a8]
mov qword [0x14012e088], r12
test rcx, rcx
je 0x140016eac
call fcn.1400bf9ac
mov qword [0x14012e0a8], r12
mov rcx, qword [0x14012e0b0]
test rcx, rcx
je 0x140016ec4
call fcn.1400bf9ac
mov qword [0x14012e0b0], r12
mov rcx, qword [0x14012e090]
test rcx, rcx
je 0x140016edc
call fcn.1400bf9ac
mov qword [0x14012e090], r12
mov rcx, qword [0x14012e098]
test rcx, rcx
je 0x140016ef4
call fcn.1400bf9ac
mov qword [0x14012e098], r12
mov rcx, qword [0x14012e0a0]
test rcx, rcx
je 0x140016f0c
call fcn.1400c5910
mov qword [0x14012e0a0], r12
movzx eax, sil
and al, r13b
cmp qword [0x14012be68], r12
je 0x140016f3a
test al, al
jne 0x140016f52
lea r8, str.AHK_Keybd
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012e078], rax
jmp 0x140016f52
test al, al
je 0x140016f52
mov rcx, qword [0x14012e078]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012e078], r12
and sil, 2
cmp qword [0x14012be60], r12
je 0x140016f7e
test sil, sil
jne 0x140016f97
lea r8, str.AHK_Mouse
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012e080], rax
jmp 0x140016f97
test sil, sil
je 0x140016f97
mov rcx, qword [0x14012e080]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012e080], r12
test dil, dil
je 0x140016fc6
xorps xmm3, xmm3
mov dword [0x1401251d0], r12d
xor r8d, r8d
mov qword [rsp + 0x20], r12
mov edx, 0x10000
lea rcx, str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
call fcn.1400a9200
mov dword [0x1401251d0], r13d
mov rdi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x98]
mov r12, qword [rsp + 0xa8]
add rsp, 0x68
pop r14
pop r13
pop rsi
pop rbx
ret