Function at 0x140016090
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
push rbp
push rsi
push rdi
push r15
sub rsp, 0x68
xor al, al
cmp qword [0x14013f848], 0
mov r15d, 1
movzx edi, al
movzx esi, dl
movzx ebp, cl
cmovne edi, r15d
cmp qword [0x14013f850], 0
je 0x1400160c5
or dil, 2
cmp bpl, dil
je 0x140016323
mov qword [rsp + 0x60], r14
xor r14d, r14d
test dil, dil
jne 0x140016125
test sil, sil
jne 0x140016125
lea rax, [0x14013e470]
lea r8, [0x1400163a0]
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 [0x1401404e0], rax
test rax, rax
je 0x1400161d6
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 [0x14013e470]
mov r9, r12
mov r8, r13
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x14001617b
lea ecx, [rax + 0xa]
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x140016150
xor bl, bl
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r13, qword [rsp + 0xa8]
mov r12d, eax
nop
test bpl, bpl
je 0x1400161ea
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 0x140016225
cmp qword [rsp + 0x40], r14
je 0x1400161f8
movzx ebx, r15b
call fcn.140016770
test al, al
jne 0x1400161f8
test sil, sil
jne 0x1400162e3
xor bpl, bpl
jmp 0x140016190
call fcn.1400167a0
mov r14, qword [rsp + 0x60]
add rsp, 0x68
pop r15
pop rdi
pop rsi
pop rbp
ret
test sil, sil
je 0x140016203
call fcn.140016770
test al, al
jne 0x140016225
test sil, sil
jne 0x1400162df
jmp 0x14001625b
mov rcx, qword [0x1401404e0]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x90], 0x103
jne 0x140016242
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r12d
cmp eax, 0x1f4
ja 0x1400161f8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140016190
mov rcx, qword [0x1401404e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1401404e0], r14
call fcn.1400167a0
cmp qword [0x14013f848], r14
je 0x140016283
test r15b, dil
jne 0x14001629c
lea r8, str.AHK_Keybd
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1401404d0], rax
jmp 0x14001629c
test r15b, dil
je 0x14001629c
mov rcx, qword [0x1401404d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1401404d0], r14
cmp qword [0x14013f850], r14
je 0x1400162c5
test dil, 2
jne 0x1400162df
lea r8, str.AHK_Mouse
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1401404d8], rax
jmp 0x1400162df
test dil, 2
je 0x1400162df
mov rcx, qword [0x1401404d8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1401404d8], r14
test bl, bl
je 0x14001630e
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 [0x14013b0c8], r14d
mov qword [rsp + 0x20], r14
call fcn.1400e9900
mov dword [0x14013b0c8], 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