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

Disassembly:
push rbp
push rsi
push rdi
push r15
sub rsp, 0x68
xor al, al
cmp qword [0x14012ab80], 0
mov r15d, 1
movzx edi, al
movzx esi, dl
movzx ebp, cl
cmovne edi, r15d
cmp qword [0x14012ab88], 0
je 0x140014275
or dil, 2
cmp bpl, dil
je 0x1400144d3
mov qword [rsp + 0x60], r14
xor r14d, r14d
test dil, dil
jne 0x1400142d5
test sil, sil
jne 0x1400142d5
lea rax, [0x1401296ec]
lea r8, [0x140014550]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov edx, 0x2000
xor ecx, ecx
mov dword [rsp + 0x20], r14d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14012b5e8], rax
test rax, rax
je 0x140014386
lea edx, [r14 + 0xf]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0xa0], r12
test sil, sil
mov qword [rsp + 0xa8], r13
mov r12, r14
mov ebx, r14d
sete r12b
movzx r13d, bpl
nop
mov ecx, dword [0x1401296ec]
mov r9, r12
mov r8, r13
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x14001432b
lea ecx, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x140014300
xor bl, bl
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r13, qword [rsp + 0xa8]
mov r12d, eax
nop
test bpl, bpl
je 0x14001439a
mov r9d, 0x417
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, r9d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x1400143d5
cmp qword [rsp + 0x40], r14
je 0x1400143a8
movzx ebx, r15b
call fcn.140014960
test al, al
jne 0x1400143a8
test sil, sil
jne 0x140014493
xor bpl, bpl
jmp 0x140014340
call fcn.140014990
mov r14, qword [rsp + 0x60]
add rsp, 0x68
pop r15
pop rdi
pop rsi
pop rbp
ret
test sil, sil
je 0x1400143b3
call fcn.140014960
test al, al
jne 0x1400143d5
test sil, sil
jne 0x14001448f
jmp 0x14001440b
mov rcx, qword [0x14012b5e8]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x90], 0x103
jne 0x1400143f2
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, 0x1f4
ja 0x1400143a8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140014340
mov rcx, qword [0x14012b5e8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b5e8], r14
call fcn.140014990
cmp qword [0x14012ab80], r14
je 0x140014433
test r15b, dil
jne 0x14001444c
lea r8, str.AHK_Keybd
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012b5d8], rax
jmp 0x14001444c
test r15b, dil
je 0x14001444c
mov rcx, qword [0x14012b5d8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b5d8], r14
cmp qword [0x14012ab88], r14
je 0x140014475
test dil, 2
jne 0x14001448f
lea r8, str.AHK_Mouse
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012b5e0], rax
jmp 0x14001448f
test dil, 2
je 0x14001448f
mov rcx, qword [0x14012b5e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b5e0], r14
test bl, bl
je 0x1400144be
xorpd xmm3, xmm3
lea rcx, str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
xor r8d, r8d
mov edx, 0x10000
mov dword [0x140125594], r14d
mov qword [rsp + 0x20], r14
call fcn.1400bf5b0
mov dword [0x140125594], r15d
mov r12, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x98]
mov r14, qword [rsp + 0x60]
add rsp, 0x68
pop r15
pop rdi
pop rsi
pop rbp
ret