Function at 0x140021a00
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 0x140021afd
cmp dword [rcx + 0xd704], edx
jne 0x140021a66
cmp dword [rcx + 0xd708], r8d
jne 0x140021a66
cmp dword [rcx + 0xd70c], r9d
jne 0x140021a66
mov rax, qword [rcx + 0xd748]
cmp byte [rax + 0x349], 0
je 0x140021b02
xor al, al
jmp 0x140021c32
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 0x140021ae8
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 0x140021c32
mov byte [rdi + 0x1334], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rdi + 0x1324], eax
jmp 0x140021b02
call fcn.140021cf0
mov rax, qword [rdi + 0xd748]
cmp byte [rax + 0x34a], 0
je 0x140021c1f
cmp byte [rdi + 0x52c9], 0
je 0x140021c09
cmp r15d, 0x202
je 0x140021bc0
cmp r15d, 0x205
je 0x140021bc0
mov ecx, dword [rax + 0x350]
mov eax, r14d
sub eax, dword [rdi + 0x52d4]
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
jg 0x140021bc0
mov eax, ebp
sub eax, dword [rdi + 0x52d8]
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
jg 0x140021bc0
cmp r15d, 0x201
jne 0x140021b8e
test byte [rdi + 0x52d0], 2
jne 0x140021ba0
mov r9d, dword [rdi + 0x52d0]
and r9d, 3
not r9d
and r9d, esi
jmp 0x140021c22
cmp r15d, 0x204
jne 0x140021b78
test byte [rdi + 0x52d0], 1
je 0x140021b78
and esi, 0xfffffffc
mov r8d, ebp
or esi, 0x10
mov edx, r14d
mov r9d, esi
mov rcx, rdi
call fcn.140021d70
mov byte [rdi + 0x52ca], 1
jmp 0x140021bed
mov r9d, dword [rdi + 0x52d0]
mov rcx, rdi
mov r8d, dword [rdi + 0x52d8]
mov edx, dword [rdi + 0x52d4]
call fcn.140021d70
mov r9d, esi
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.140021d70
mov edx, dword [rdi + 0x52cc]
mov rcx, qword [rdi + 0x12b8]
call qword [sym.imp.USER32.dll_KillTimer]
mov byte [rdi + 0x52c9], 0
jmp 0x140021c30
cmp byte [rdi + 0x52ca], 0
je 0x140021c4e
test sil, 3
jne 0x140021c46
mov byte [rdi + 0x52ca], 0
mov r9d, esi
mov r8d, ebp
mov edx, r14d
mov rcx, rdi
call fcn.140021d70
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 0x140021c1f
cmp r15d, 0x201
jne 0x140021c5f
test sil, 2
je 0x140021c6e
jmp 0x140021c1f
cmp r15d, 0x204
jne 0x140021c1f
test sil, 1
jne 0x140021c1f
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 0x140021cc8
lea r8, str.Failed_to_create_timer_for_emulating_3_buttons
xor edx, edx
lea rcx, vtable.Log.0
call fcn.1400155a0
mov rcx, qword [rdi + 0xd760]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 + 0xf]
call qword [sym.imp.USER32.dll_PostMessageA]
jmp 0x140021c30
mov byte [rdi + 0x52c9], 1
mov dword [rdi + 0x52d0], esi
mov dword [rdi + 0x52d4], r14d
mov dword [rdi + 0x52d8], ebp
jmp 0x140021c30