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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
cmp byte [r8], 0x1b
mov rbx, rcx
mov rdi, rdx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
je 0x406340
xor esi, esi
mov eax, esi
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movsxd r9, r9d
lea rax, [r8 + 1]
add r9, r8
cmp r9, rax
je 0x406ff0
cmp byte [r8 + 1], 0x5b
jne 0x406320
lea r10, [r8 + 2]
cmp r9, r10
je 0x406ff0
cmp byte [r8 + 2], 0x3c
je 0x406691
cmp r9, r10
mov rax, r10
je 0x406ff0
movsx edx, byte [r8 + 2]
xor r11d, r11d
mov dword [rsp + 0x34], 0
sub edx, 0x30
cmp edx, 9
ja 0x4063e0
mov rdx, rax
sub rdx, r10
cmp rdx, 6
jg 0x4063e0
movsx edx, byte [rax]
lea ecx, [r11 + r11*4]
lea rsi, [rax + 1]
cmp r9, rsi
lea ecx, [rdx + rcx*2]
lea r11d, [rcx - 0x30]
je 0x406ff0
movsx edx, byte [rax + 1]
mov ebp, edx
sub edx, 0x30
cmp edx, 9
ja 0x406600
mov rax, rsi
mov rdx, rax
sub rdx, r10
cmp rdx, 6
jle 0x4063a2
nop
cmp r9, r10
je 0x406ff0
cmp byte [r8 + 2], 0x4d
jne 0x406320
lea rax, [r8 + 3]
cmp r9, rax
je 0x406ff0
movsx eax, byte [r8 + 3]
sub eax, 0x20
and eax, 0xff
mov dword [rsp + 0x34], eax
lea rax, [r8 + 4]
cmp r9, rax
je 0x406ff0
movsx ax, byte [r8 + 4]
sub eax, 0x21
and ax, 0xff
mov word [rsp + 0x38], ax
lea rax, [r8 + 5]
cmp r9, rax
je 0x406ff0
movsx ax, byte [r8 + 5]
mov byte [rsp + 0x30], 0
mov esi, 6
sub eax, 0x21
and ax, 0xff
mov word [rsp + 0x3a], ax
nop word [rax + rax]
call fcn.00414460
test al, al
jne 0x406830
movzx eax, word [rbx + 0xf0]
movzx r8d, word [rbx + 0xec]
mov r9d, 2
mov qword [rsp + 0x80], 0
mov edx, dword [rsp + 0x34]
mov word [rsp + 0x80], r9w
movsx r9d, word [rsp + 0x38]
movsx r10d, word [rsp + 0x3a]
mov qword [rsp + 0x88], 0
add eax, 1
mov ecx, edx
mov dword [rsp + 0x90], 0
sub eax, r8d
and ecx, 3
cwde
mov ebp, r9d
sub eax, 1
mov r12d, r10d
cmp eax, r9d
cmovg eax, r9d
xor r9d, r9d
test eax, eax
cmovs eax, r9d
add eax, r8d
movzx r8d, word [rbx + 0xee]
mov word [rsp + 0x84], ax
movzx eax, word [rbx + 0xf2]
add eax, 1
sub eax, r8d
cwde
sub eax, 1
cmp eax, r10d
cmovg eax, r10d
test eax, eax
cmovs eax, r9d
add eax, r8d
test dl, 4
mov word [rsp + 0x86], ax
je 0x40652f
mov dword [rsp + 0x8c], 0x10
test dl, 8
je 0x40653c
or dword [rsp + 0x8c], 2
test dl, 0x10
je 0x406549
or dword [rsp + 0x8c], 8
test dl, 0x40
je 0x406710
test ecx, ecx
mov dword [rsp + 0x90], 4
jne 0x406ba0
mov eax, dword [rbx + 0xd4]
or eax, 0x780000
cmp byte [rbx + 0xe9], 0
mov dword [rsp + 0x88], eax
je 0x406322
cmp byte [rbx + 0xea], 0
jne 0x406322
call fcn.00414460
test al, al
je 0x4065b8
movzx eax, byte [0x004de050]
test al, al
je 0x406ea0
movzx ebx, byte [0x004de058]
test bl, bl
jne 0x406e50
mov rax, qword [rdi + 8]
cmp rax, qword [rdi + 0x10]
je 0x406ffa
test rax, rax
je 0x4065ec
mov rdx, qword [rsp + 0x80]
mov qword [rax], rdx
mov rdx, qword [rsp + 0x88]
mov qword [rax + 8], rdx
mov edx, dword [rsp + 0x90]
mov dword [rax + 0x10], edx
add rax, 0x14
mov qword [rdi + 8], rax
jmp 0x406322
sub ecx, 0x50
cmp bpl, 0x3b
mov dword [rsp + 0x34], ecx
jne 0x4063e0
lea rdx, [rax + 2]
cmp r9, rdx
je 0x406ff0
movzx ecx, byte [rsi + 1]
xor r12d, r12d
cmp cl, 0x2d
je 0x407037
movsx eax, cl
sub eax, 0x30
cmp eax, 9
ja 0x4063e0
mov r13, rdx
mov rcx, rdx
xor eax, eax
sub rcx, r13
cmp rcx, 6
jg 0x4063e0
lea ecx, [rax + rax*4]
movsx eax, byte [rdx]
lea r11, [rdx + 1]
cmp r9, r11
lea ebp, [rax + rcx*2]
lea eax, [rbp - 0x30]
je 0x406ff0
movsx ecx, byte [rdx + 1]
mov esi, ecx
sub ecx, 0x30
cmp ecx, 9
ja 0x406c90
mov rdx, r11
mov rcx, rdx
sub rcx, r13
cmp rcx, 6
jle 0x406652
jmp 0x4063e0
lea rax, [r8 + 3]
cmp r9, rax
je 0x406ff0
movsx edx, byte [r8 + 3]
sub edx, 0x30
cmp edx, 9
ja 0x406372
mov rbp, rax
mov rdx, rax
mov ecx, dword [rsp + 0x34]
sub rdx, rbp
cmp rdx, 6
jg 0x406372
nop word cs:[rax + rax]
movsx edx, byte [rax]
lea r11, [rax + 1]
lea ecx, [rcx + rcx*4]
cmp r9, r11
lea ecx, [rdx + rcx*2 - 0x30]
je 0x406ff0
movsx edx, byte [rax + 1]
mov esi, edx
sub edx, 0x30
cmp edx, 9
ja 0x4067a0
mov rax, r11
mov rdx, rax
sub rdx, rbp
cmp rdx, 6
jle 0x4066d0
jmp 0x406372
and edx, 0x20
je 0x406720
mov dword [rsp + 0x90], 1
cmp ecx, 3
je 0x406c20
test ecx, ecx
mov r13d, 1
je 0x406742
xor r13d, r13d
cmp ecx, 1
sete r13b
lea r13d, [r13 + r13 + 2]
cmp byte [rsp + 0x30], 0
je 0x406bc0
mov eax, r13d
not eax
and eax, dword [rbx + 0xd4]
cmp r13d, dword [rbx + 0xd8]
mov dword [rbx + 0xd4], eax
je 0x406c80
xor ecx, ecx
xor r8d, r8d
mov dword [rbx + 0xd8], 0
mov word [rbx + 0xdc], cx
mov word [rbx + 0xde], r8w
mov dword [rbx + 0xe0], 0
mov byte [rbx + 0xe4], 0
jmp 0x406570
cmp sil, 0x3b
mov dword [rsp + 0x34], ecx
jne 0x406372
lea rdx, [rax + 2]
cmp r9, rdx
je 0x406ff0
movzx ecx, byte [r11 + 1]
xor r12d, r12d
cmp cl, 0x2d
je 0x40704f
movsx eax, cl
sub eax, 0x30
cmp eax, 9
ja 0x406372
mov r13, rdx
mov rcx, rdx
xor eax, eax
sub rcx, r13
cmp rcx, 6
jg 0x406372
lea ecx, [rax + rax*4]
movsx eax, byte [rdx]
lea r11, [rdx + 1]
cmp r9, r11
lea ebp, [rax + rcx*2]
lea eax, [rbp - 0x30]
je 0x406ff0
movsx ecx, byte [rdx + 1]
mov esi, ecx
sub ecx, 0x30
cmp ecx, 9
ja 0x406d53
mov rdx, r11
mov rcx, rdx
sub rcx, r13
cmp rcx, 6
jle 0x4067f0
jmp 0x406372
movzx eax, byte [0x004de060]
test al, al
je 0x406c40
movzx ebp, byte [0x004de068]
test bpl, bpl
je 0x40646d
lea rbp, [rsp + 0x80]
mov edx, 0x28
mov qword [rsp + 0x88], 0
mov byte [rsp + 0x90], 0
lea rax, [rbp + 0x10]
mov rcx, rbp
mov qword [rsp + 0x80], rax
call fcn.00499ba0
mov r8d, dword [rsp + 0x34]
mov ecx, 0x1c
xor r9d, r9d
mov eax, r8d
shr eax, cl
test al, 0xf
jne 0x406fa0
add r9d, 1
sub ecx, 4
cmp r9d, 7
jne 0x406891
shr r8d, cl
lea rax, str.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0
lea r12, [rsp + 0xa0]
and r8d, 0xf
movzx eax, byte [rax + r8]
mov byte [rsp + 0xa0], al
lea rax, [r12 + 1]
mov byte [rax], 0
sub rax, r12
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xb8], rax
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
movzx r13d, word [rsp + 0x3a]
movzx r14d, word [rsp + 0x38]
cmp rax, 3
jbe 0x40712a
lea rdx, [0x004b10a0]
mov r8d, 4
mov rcx, rbp
call fcn.00499d20
mov eax, r14d
lea r9, [rsp + 0x40]
mov byte [rsp + 0x47], 0
sar ax, 0xf
mov ecx, eax
lea r8, [r9 + 7]
xor ecx, r14d
sub ecx, eax
jmp 0x406953
mov r8, rdx
movzx eax, cx
imul eax, eax, 0xcccd
shr eax, 0x13
mov edx, eax
lea eax, [rdx*4]
add eax, edx
add eax, eax
sub ecx, eax
mov eax, ecx
mov ecx, edx
lea rdx, [r8 - 1]
add eax, 0x30
test cx, cx
mov byte [r8 - 1], al
jne 0x406950
test r14w, r14w
jns 0x406990
mov byte [rdx - 1], 0x2d
lea rdx, [r8 - 2]
mov rax, rdx
sub rax, r9
sub r9, rdx
mov qword [rsp + 0x48], rax
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
lea r8, [r9 + 7]
mov qword [rsp + 0x50], r8
cmp r8, rax
ja 0x4070ef
mov rcx, rbp
call fcn.00499d20
mov rdx, qword [rsp + 0x80]
lea rax, [rbp + 0x10]
mov r14, qword [rsp + 0x88]
cmp rdx, rax
mov eax, 0xf
cmovne rax, qword [rsp + 0x90]
lea r15, [r14 + 1]
cmp r15, rax
ja 0x406e20
mov byte [rdx + r14], 0x2c
mov rax, qword [rsp + 0x80]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x88], r15
lea r8, [r9 + 7]
mov byte [rax + r14 + 1], 0
mov eax, r13d
mov byte [rsp + 0x67], 0
sar ax, 0xf
mov ecx, eax
xor ecx, r13d
sub ecx, eax
jmp 0x406a38
mov r8, rdx
movzx eax, cx
imul eax, eax, 0xcccd
shr eax, 0x13
mov edx, eax
lea eax, [rdx*4]
add eax, edx
add eax, eax
sub ecx, eax
mov eax, ecx
mov ecx, edx
lea rdx, [r8 - 1]
add eax, 0x30
test cx, cx
mov byte [r8 - 1], al
jne 0x406a35
test r13w, r13w
jns 0x406a75
mov byte [rdx - 1], 0x2d
lea rdx, [r8 - 2]
mov rax, rdx
sub rax, r9
sub r9, rdx
mov qword [rsp + 0x68], rax
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
lea r8, [r9 + 7]
mov qword [rsp + 0x70], r8
cmp r8, rax
ja 0x4070ca
mov rcx, rbp
call fcn.00499d20
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
cmp rax, 8
jbe 0x4070be
lea rdx, str._flags0x
mov r8d, 9
mov rcx, rbp
call fcn.00499d20
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
mov r8, qword [rsp + 0xb8]
mov rdx, r12
add rdx, qword [rsp + 0xb0]
cmp r8, rax
ja 0x407091
mov rcx, rbp
call fcn.00499d20
cmp byte [rsp + 0x30], 0
jne 0x406f60
mov rdx, qword [rsp + 0x80]
lea rax, [r12 + 0x10]
add rbp, 0x10
mov qword [rsp + 0xa0], rax
cmp rdx, rbp
je 0x40700f
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x88]
lea rcx, str.mouse_input:__s
mov qword [rsp + 0xa8], rax
call fcn.00413ac0
mov rcx, qword [rsp + 0xa0]
add r12, 0x10
cmp rcx, r12
je 0x40646d
call fcn.004aaf10
jmp 0x40646d
cmp ecx, 1
jne 0x406322
mov eax, dword [rbx + 0xd4]
or eax, 0xff880000
jmp 0x406570
mov eax, dword [rbx + 0xd4]
test r13d, eax
jne 0x406570
or eax, r13d
cmp r13d, dword [rbx + 0xd8]
mov r14, qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0xd4], eax
je 0x406ee0
mov dword [rbx + 0xd8], r13d
mov word [rbx + 0xdc], bp
mov word [rbx + 0xde], r12w
call r14
mov dword [rbx + 0xe0], eax
mov eax, dword [rbx + 0xd4]
or eax, dword [rsp + 0x88]
jmp 0x406570
mov dword [rbx + 0xd4], 0
mov byte [rbx + 0xe4], 1
xor eax, eax
jmp 0x406570
lea rcx, [0x004de060]
call fcn.004ab580
test eax, eax
je 0x40683f
lea rcx, str.input
call fcn.00413d90
lea rcx, [0x004de060]
mov ebp, eax
mov byte [0x004de068], al
call fcn.004ab690
jmp 0x406846
mov byte [rbx + 0xe4], 1
jmp 0x406570
mov ecx, 0x30
sub ecx, ebp
test r12b, r12b
cmovne eax, ecx
sub eax, 1
cmp sil, 0x3b
mov word [rsp + 0x38], ax
jne 0x4063e0
lea rax, [rdx + 2]
cmp r9, rax
je 0x406ff0
xor ebp, ebp
cmp byte [r11 + 1], 0x2d
je 0x407067
movsx edx, byte [rax]
sub edx, 0x30
cmp edx, 9
ja 0x4063e0
mov r12, rax
xor edx, edx
mov rcx, rax
sub rcx, r12
cmp rcx, 6
jg 0x4063e0
lea ecx, [rdx + rdx*4]
movsx edx, byte [rax]
add rax, 1
cmp r9, rax
lea esi, [rdx + rcx*2]
lea edx, [rsi - 0x30]
je 0x406ff0
movsx ecx, byte [rax]
mov r11d, ecx
sub ecx, 0x30
cmp ecx, 9
jbe 0x406cdd
mov ecx, 0x30
sub ecx, esi
test bpl, bpl
cmovne edx, ecx
sub edx, 1
cmp r11b, 0x4d
mov word [rsp + 0x3a], dx
jne 0x4063e0
sub rax, r8
mov byte [rsp + 0x30], 0
mov esi, eax
add esi, 1
je 0x4063e0
test esi, esi
jg 0x406460
jmp 0x406322
mov ecx, 0x30
sub ecx, ebp
test r12b, r12b
cmovne eax, ecx
sub eax, 1
cmp sil, 0x3b
mov word [rsp + 0x38], ax
jne 0x406372
lea rax, [rdx + 2]
cmp r9, rax
je 0x406ff0
xor ebp, ebp
cmp byte [r11 + 1], 0x2d
je 0x40707a
movsx edx, byte [rax]
sub edx, 0x30
cmp edx, 9
ja 0x406372
mov r12, rax
xor edx, edx
mov rcx, rax
sub rcx, r12
cmp rcx, 6
jg 0x406372
lea ecx, [rdx + rdx*4]
movsx edx, byte [rax]
add rax, 1
cmp r9, rax
lea esi, [rdx + rcx*2]
lea edx, [rsi - 0x30]
je 0x406ff0
movsx ecx, byte [rax]
mov r11d, ecx
sub ecx, 0x30
cmp ecx, 9
jbe 0x406da0
mov ecx, 0x30
sub ecx, esi
test bpl, bpl
cmovne edx, ecx
sub edx, 1
mov word [rsp + 0x3a], dx
mov edx, r11d
and edx, 0xffffffdf
cmp dl, 0x4d
jne 0x406372
cmp r11b, 0x6d
sete byte [rsp + 0x30]
sub rax, r8
mov esi, eax
add esi, 1
jne 0x406d46
jmp 0x406372
mov qword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rbp
call fcn.00499ee0
mov rdx, qword [rsp + 0x80]
jmp 0x4069fc
lea r12, [rsp + 0xa0]
lea rdx, [rsp + 0x84]
mov rcx, r12
call fcn.004098a0
mov rdx, qword [rsp + 0xa0]
lea rcx, str.mouse_event:__s
call fcn.00413ac0
mov rcx, qword [rsp + 0xa0]
add r12, 0x10
cmp rcx, r12
je 0x4065b8
call fcn.004aaf10
jmp 0x4065b8
lea rcx, [0x004de050]
call fcn.004ab580
test eax, eax
je 0x4065a9
lea rcx, str.input
call fcn.00413d90
lea rcx, [0x004de050]
mov ebx, eax
mov byte [0x004de058], al
call fcn.004ab690
jmp 0x4065b0
cmp bp, word [rbx + 0xdc]
jne 0x406bec
cmp r12w, word [rbx + 0xde]
jne 0x406bec
call r14
sub eax, dword [rbx + 0xe0]
mov r15d, eax
call qword [sym.imp.USER32.dll_GetDoubleClickTime]
cmp r15d, eax
jae 0x406bec
xor eax, eax
xor edx, edx
or dword [rsp + 0x90], 2
mov word [rbx + 0xdc], ax
mov dword [rbx + 0xd8], 0
mov eax, dword [rsp + 0x88]
mov word [rbx + 0xde], dx
mov dword [rbx + 0xe0], 0
mov byte [rbx + 0xe4], 0
or eax, dword [rbx + 0xd4]
jmp 0x406570
movabs rax, 0x7fffffffffffffff
sub rax, qword [rsp + 0x88]
cmp rax, 7
jbe 0x407136
lea rdx, str._release
mov r8d, 8
mov rcx, rbp
call fcn.00499d20
jmp 0x406b21
lea r12, [rsp + 0xa0]
lea r11d, [rcx + r9*4 - 0x20]
lea r10, str.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0
mov rdx, r12
nop word [rax + rax]
mov eax, r8d
add rdx, 1
shr eax, cl
sub ecx, 4
and eax, 0xf
movzx eax, byte [r10 + rax]
mov byte [rdx - 1], al
cmp r11d, ecx
jne 0x406fc0
mov eax, 7
sub eax, r9d
lea rax, [r12 + rax + 1]
jmp 0x4068d2
mov esi, 0xffffffff
jmp 0x406322
lea rdx, [rsp + 0x80]
mov rcx, rdi
call fcn.00496640
jmp 0x406322
mov r9, qword [rsp + 0x90]
mov r10, qword [rsp + 0x98]
mov rdx, rax
mov qword [rsp + 0xb0], r9
mov qword [rsp + 0xb8], r10
jmp 0x406b5b
lea rdx, [rax + 3]
cmp r9, rdx
je 0x406ff0
movzx ecx, byte [rax + 3]
mov r12d, 1
jmp 0x40662e
lea rdx, [rax + 3]
cmp r9, rdx
je 0x406ff0
movzx ecx, byte [rax + 3]
mov r12d, 1
jmp 0x4067cc
lea rax, [rdx + 3]
cmp r9, rax
je 0x406ff0
mov ebp, 1
jmp 0x406cc9
lea rax, [rdx + 3]
cmp r9, rax
je 0x406ff0
mov ebp, 1
jmp 0x406d8c
lea rcx, [0x004b108b]
call fcn.004a50e0
mov rcx, qword [rsp + 0xa0]
add r12, 0x10
mov rbx, rax
cmp rcx, r12
je 0x4070b6
call fcn.004aaf10
mov rcx, rbx
call fcn.00424a70
lea rcx, [0x004b108b]
call fcn.004a50e0
lea rcx, [0x004b108b]
call fcn.004a50e0
jmp 0x40709d
lea rcx, [0x004b108b]
call fcn.004a50e0
mov rcx, qword [rsp + 0x80]
add rbp, 0x10
mov rbx, rax
cmp rcx, rbp
jne 0x4070b1
jmp 0x4070b6
lea rcx, [0x004b108b]
call fcn.004a50e0
lea rcx, [0x004b108b]
call fcn.004a50e0
nop
nop
nop
nop word cs:[rax + rax]