Function at 0x497430
Capabilities:
Get graphical window text
Log keystrokes via polling

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
sub rsp, 0xe0
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov rdi, r8
mov rsi, rcx
xor ebp, ebp
mov dword [rax + 0x10], ebp
cmp edx, 0x102
jne 0x49748b
cmp r8, 9
jne 0x49748b
lea ecx, [rbp + 0x10]
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
seta dl
mov rcx, rsi
call fcn.0049808c
xor eax, eax
jmp 0x497704
mov rcx, qword [rcx + 0x7b8]
test rcx, rcx
je 0x4974c2
call fcn.005a1568
cmp byte [rax + 0x311f], bpl
jne 0x4974ba
mov rcx, qword [rax + 0x30]
test rcx, rcx
je 0x4974ba
mov edx, 0x327
call fcn.0041024c
jmp 0x4974f0
mov al, byte [rax + 0x2d40]
jmp 0x4974f0
mov rax, qword [0x00862cb8]
cmp byte [rax + 0x31a7], bpl
jne 0x4974ea
mov rcx, qword [rax + 0xb8]
test rcx, rcx
je 0x4974ea
mov edx, 0x327
call fcn.0041024c
jmp 0x4974f0
mov al, byte [rax + 0x2dc8]
test al, al
je 0x4974fe
cmp rdi, 0xd
jne 0x4976f7
mov rcx, qword [rsi + 0x1438]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
mov rdi, 0xffffffffffffffff
cmovo rax, rdi
mov rcx, rax
call fcn.006a43c4
mov rbx, rax
mov qword [rsp + 0x28], rax
mov rcx, qword [rsi + 0x1438]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea r8d, [rax + 1]
mov rdx, rbx
mov rcx, qword [rsi + 0x1438]
call qword [sym.imp.USER32.dll_GetWindowTextW]
xor eax, eax
mov rcx, rdi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rbx + rcx*2 - 2]
mov rdx, rbx
lea rcx, [rsi + 0x1530]
call fcn.00406d38
mov rdi, qword [rsi + 0x1580]
test rdi, rdi
je 0x497592
mov rcx, rdi
call fcn.00583350
mov rcx, rdi
call fcn.006a4944
and qword [rsi + 0x1580], 0
mov rax, qword [rsi + 0x1578]
cmp rax, qword [rsi + 0x1570]
je 0x4976d5
mov ecx, 0x50
call fcn.006a494c
mov rdi, rax
mov qword [rsp + 0x20], rax
test rax, rax
je 0x497612
lea r8, [rsp + 0x108]
lea rdx, [0x0078dc30]
lea rcx, [rsp + 0x38]
call fcn.004023b4
nop
lea rdx, [rsi + 0x1530]
lea rcx, [rsp + 0x88]
call fcn.0057b9c0
nop
mov ebp, 7
mov dword [rsp + 0x108], ebp
lea r8, [rsp + 0x38]
mov rdx, rax
mov rcx, rdi
call fcn.005831b8
jmp 0x497614
xor eax, eax
mov qword [rsi + 0x1580], rax
mov edi, 0x100
test bpl, 4
je 0x49766e
and ebp, 0xfffffffb
mov dword [rsp + 0x108], ebp
lea rax, [rsp + 0x88]
mov rcx, qword [rsp + 0xd0]
cmp rcx, rax
je 0x49766e
test rcx, rcx
je 0x49766e
mov rax, qword [rsp + 0x88]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, rdi
jbe 0x497668
call fcn.006a4944
jmp 0x49766e
call fcn.006a3610
nop
test bpl, 2
je 0x4976ab
lea rax, [rsp + 0x38]
mov rcx, qword [rsp + 0x80]
cmp rcx, rax
je 0x4976ab
test rcx, rcx
je 0x4976ab
mov rax, qword [rsp + 0x38]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, rdi
jbe 0x4976a6
call fcn.006a4944
jmp 0x4976ab
call fcn.006a3610
mov rdi, qword [rsi + 0x1580]
cmp dword [rdi + 0x48], 0
jne 0x4976d5
test rdi, rdi
je 0x4976cd
mov rcx, rdi
call fcn.00583350
mov rcx, rdi
call fcn.006a4944
and qword [rsi + 0x1580], 0
and qword [rsp + 0x20], 0
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.00497d38
mov byte [rsi + 0x1618], 1
mov rcx, rbx
call fcn.006a5088
mov rax, qword [rsp + 0x120]
and dword [rax], 0
xor eax, eax
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret