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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r14
sub rsp, 0x60
mov ebx, 1
movzx r14d, dl
mov rdi, rcx
cmp dword [0x14011a3bc], ebx
jne 0x14001919d
mov rcx, qword [0x1401198e8]
mov r8, qword [0x1401198f0]
xor al, al
mov qword [rsp + 0x80], rsi
test rcx, rcx
movzx esi, al
cmovne esi, ebx
test r8, r8
je 0x140018f1f
or sil, 2
xor ebp, ebp
test sil, sil
je 0x140019013
mov qword [rsp + 0x88], r12
movzx r12d, byte [0x1401185ee]
movzx eax, al
not r12b
and r12b, sil
test rcx, rcx
cmovne eax, ebx
test r8, r8
je 0x140018f50
or al, 2
cmp r12b, al
je 0x14001900b
mov qword [rsp + 0x90], r13
mov edi, ebp
movzx r13d, r12b
nop word [rax + rax]
mov ecx, dword [0x1401185d8]
xor r9d, r9d
mov r8, r13
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x140018f9b
lea ecx, [rax + 0xa]
call qword [sym.imp.KERNEL32.DLL_Sleep]
inc edi
cmp edi, 0x32
jl 0x140018f70
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
mov r13, qword [rsp + 0x90]
mov edi, eax
nop dword [rax + rax]
test r12b, r12b
je 0x140019127
mov r9d, 0x417
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, r9d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140019134
cmp qword [rsp + 0x40], rbp
je 0x14001900b
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 [0x140114474], ebp
mov qword [rsp + 0x20], rbp
call fcn.1400b3f10
mov dword [0x140114474], ebx
mov r12, qword [rsp + 0x88]
mov rdx, qword [0x140118608]
mov ecx, dword [0x140118600]
mov r8d, 0x28
call qword [sym.imp.USER32.dll_SendInput]
test sil, sil
je 0x140019184
movzx eax, byte [0x1401185ee]
and al, sil
test bl, al
je 0x140019082
movzx ecx, bl
call fcn.140019f40
movzx edx, al
mov byte [0x140119792], al
mov byte [0x140119791], al
xor dl, r14b
movzx ecx, dl
and dl, al
and cl, r14b
not cl
and cl, byte [0x140119793]
or cl, dl
mov byte [0x140119793], cl
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [0x140118380], rax
xor al, al
cmp qword [0x1401198e8], rbp
movzx eax, al
cmovne eax, ebx
cmp qword [0x1401198f0], rbp
je 0x14001909c
or al, 2
cmp sil, al
je 0x140019184
mov edi, ebp
movzx esi, sil
nop dword [rax + rax]
mov ecx, dword [0x1401185d8]
xor r9d, r9d
mov r8, rsi
mov edx, 0x417
call qword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x1400190db
lea ecx, [rax + 0xa]
call qword [sym.imp.KERNEL32.DLL_Sleep]
inc edi
cmp edi, 0x32
jl 0x1400190b0
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edi, eax
nop word [rax + rax]
mov r9d, 0x417
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, r9d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x140019154
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, edi
cmp eax, 0x1f4
ja 0x140019184
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x1400190f0
call fcn.14000c110
test al, al
je 0x14001900b
call qword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, edi
cmp eax, 0x1f4
ja 0x14001900b
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x140018fb0
cmp qword [rsp + 0x40], rbp
je 0x140019184
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 [0x140114474], ebp
mov qword [rsp + 0x20], rbp
call fcn.1400b3f10
mov dword [0x140114474], ebx
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rdi
pop rbp
ret
mov r8, qword [0x140119788]
lea rdx, [0x140016fb0]
xor ebp, ebp
xor r9d, r9d
mov ecx, ebx
mov dword [0x1401185f8], ebp
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x1401198f8], rax
test rax, rax
je 0x14001918c
mov byte [0x140119797], bl
mov edx, ebx
mov ecx, 0x8000012f
mov dword [0x140114474], ebp
call fcn.140001a70
cmp qword [0x1401198f8], rbp
mov dword [0x140114474], ebx
jne 0x1400191d0
mov ecx, dword [0x140118600]
mov rax, qword [0x140118608]
mov byte [0x140119797], bpl
dec ecx
cmp dword [rax + rcx*8], ebp
jne 0x14001918c
mov eax, dword [rax + rcx*8 + 4]
mov rbx, qword [rsp + 0x98]
mov dword [rdi], eax
add rsp, 0x60
pop r14
pop rdi
pop rbp
ret