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

Disassembly:
push rbp
push rsi
push rdi
push r15
sub rsp, 0x68
xor al, al
cmp qword [0x14012ac08], 0
mov r15d, 1
movzx edi, al
movzx esi, dl
movzx ebp, cl
cmovne edi, r15d
cmp qword [0x14012ac10], 0
je 0x140014055
or dil, 2
cmp bpl, dil
je 0x1400142b3
mov qword [rsp + 0x60], r14
xor r14d, r14d
test dil, dil
jne 0x1400140b5
test sil, sil
jne 0x1400140b5
lea rax, [0x1401298f8]
lea r8, [0x140014330]
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 [0x14012b668], rax
test rax, rax
je 0x140014166
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 [0x1401298f8]
mov r9, r12
mov r8, r13
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x14001410b
lea ecx, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x1400140e0
xor bl, bl
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r13, qword [rsp + 0xa8]
mov r12d, eax
nop
test bpl, bpl
je 0x14001417a
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 0x1400141b5
cmp qword [rsp + 0x40], r14
je 0x140014188
movzx ebx, r15b
call fcn.140014750
test al, al
jne 0x140014188
test sil, sil
jne 0x140014273
xor bpl, bpl
jmp 0x140014120
call fcn.140014780
mov r14, qword [rsp + 0x60]
add rsp, 0x68
pop r15
pop rdi
pop rsi
pop rbp
ret
test sil, sil
je 0x140014193
call fcn.140014750
test al, al
jne 0x1400141b5
test sil, sil
jne 0x14001426f
jmp 0x1400141eb
mov rcx, qword [0x14012b668]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x90], 0x103
jne 0x1400141d2
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, 0x1f4
ja 0x140014188
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140014120
mov rcx, qword [0x14012b668]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b668], r14
call fcn.140014780
cmp qword [0x14012ac08], r14
je 0x140014213
test r15b, dil
jne 0x14001422c
lea r8, str.AHK_Keybd
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012b658], rax
jmp 0x14001422c
test r15b, dil
je 0x14001422c
mov rcx, qword [0x14012b658]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b658], r14
cmp qword [0x14012ac10], r14
je 0x140014255
test dil, 2
jne 0x14001426f
lea r8, str.AHK_Mouse
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x14012b660], rax
jmp 0x14001426f
test dil, 2
je 0x14001426f
mov rcx, qword [0x14012b660]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14012b660], r14
test bl, bl
je 0x14001429e
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.1400c0050
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