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

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov r15d, dword [rsp + 0x60]
mov esi, r9d
mov ebp, r8d
mov r14d, edx
mov rdi, rcx
cmp r15d, 0x200
jne 0x1400218cd
cmp dword [rcx + 0xd704], edx
jne 0x140021836
cmp dword [rcx + 0xd708], r8d
jne 0x140021836
cmp dword [rcx + 0xd70c], r9d
jne 0x140021836
mov rax, qword [rcx + 0xd748]
cmp byte [rax + 0x349], 0
je 0x1400218d2
xor al, al
jmp 0x140021a02
mov dword [rcx + 0xd704], r14d
mov dword [rcx + 0xd708], ebp
mov dword [rcx + 0xd70c], esi
mov qword [rsp + 0x40], rbx
mov ebx, dword [rcx + 0x1320]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rdi + 0x1324]
mov edx, ebx
shr edx, 1
mov ecx, esi
and cl, 0x73
cmove edx, ebx
mov rbx, qword [rsp + 0x40]
cmp eax, edx
jae 0x1400218b8
mov r8d, dword [rdi + 0x1320]
xor r9d, r9d
mov rcx, qword [rdi + 0x12b8]
mov edx, 0xcf
mov dword [rdi + 0x1328], r14d
mov dword [rdi + 0x132c], ebp
mov dword [rdi + 0x1330], esi
mov byte [rdi + 0x1334], 1
call qword [sym.imp.USER32.dll_SetTimer]
mov dword [rdi + 0x52dc], eax
xor al, al
jmp 0x140021a02
mov byte [rdi + 0x1334], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rdi + 0x1324], eax
jmp 0x1400218d2
call fcn.140021ac0
mov rax, qword [rdi + 0xd748]
cmp byte [rax + 0x34a], 0
je 0x1400219ef
cmp byte [rdi + 0x52c9], 0
je 0x1400219d9
cmp r15d, 0x202
je 0x140021990
cmp r15d, 0x205
je 0x140021990
mov ecx, dword [rax + 0x350]
mov eax, r14d
sub eax, dword [rdi + 0x52d4]
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
jg 0x140021990
mov eax, ebp
sub eax, dword [rdi + 0x52d8]
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
jg 0x140021990
cmp r15d, 0x201
jne 0x14002195e
test byte [rdi + 0x52d0], 2
jne 0x140021970
mov r9d, dword [rdi + 0x52d0]
and r9d, 3
not r9d
and r9d, esi
jmp 0x1400219f2
cmp r15d, 0x204
jne 0x140021948
test byte [rdi + 0x52d0], 1
je 0x140021948
and esi, 0xfffffffc
mov r8d, ebp
or esi, 0x10
mov edx, r14d
mov r9d, esi
mov rcx, rdi
call fcn.140021b40
mov byte [rdi + 0x52ca], 1
jmp 0x1400219bd
mov r9d, dword [rdi + 0x52d0]
mov rcx, rdi
mov r8d, dword [rdi + 0x52d8]
mov edx, dword [rdi + 0x52d4]
call fcn.140021b40
mov r9d, esi
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.140021b40
mov edx, dword [rdi + 0x52cc]
mov rcx, qword [rdi + 0x12b8]
call qword [sym.imp.USER32.dll_KillTimer]
mov byte [rdi + 0x52c9], 0
jmp 0x140021a00
cmp byte [rdi + 0x52ca], 0
je 0x140021a1e
test sil, 3
jne 0x140021a16
mov byte [rdi + 0x52ca], 0
mov r9d, esi
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.140021b40
mov al, 1
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
and esi, 0xfffffffc
or esi, 0x10
jmp 0x1400219ef
cmp r15d, 0x201
jne 0x140021a2f
test sil, 2
je 0x140021a3e
jmp 0x1400219ef
cmp r15d, 0x204
jne 0x1400219ef
test sil, 1
jne 0x1400219ef
mov r8d, dword [rax + 0x34c]
xor r9d, r9d
mov rcx, qword [rdi + 0x12b8]
mov edx, 0x8c
call qword [sym.imp.USER32.dll_SetTimer]
mov dword [rdi + 0x52cc], eax
test eax, eax
jne 0x140021a98
lea r8, str.Failed_to_create_timer_for_emulating_3_buttons
xor edx, edx
lea rcx, vtable.Log.0
call fcn.1400153f0
mov rcx, qword [rdi + 0xd760]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 + 0xf]
call qword [sym.imp.USER32.dll_PostMessageA]
jmp 0x140021a00
mov byte [rdi + 0x52c9], 1
mov dword [rdi + 0x52d0], esi
mov dword [rdi + 0x52d4], r14d
mov dword [rdi + 0x52d8], ebp
jmp 0x140021a00