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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2d8
mov qword [rsp + 0xe0], 0xfffffffffffffffe
mov rbp, rcx
mov rcx, qword [rcx + 0x2c0]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
test eax, eax
jne 0x494975
lea ecx, [rax + 0x10]
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
seta dl
mov rcx, rbp
call fcn.0049808c
jmp 0x495016
call qword [sym.imp.USER32.dll_GetFocus]
cmp rax, qword [rbp + 0x2c0]
jne 0x495016
mov ecx, reloc.WS2_32.dll_recv
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
ja 0x495016
mov rcx, qword [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
movsxd rsi, eax
lea edi, [rsi + 1]
movsxd rcx, edi
mov eax, 2
mul rcx
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.006a43c4
mov rbx, rax
mov qword [rsp + 0x28], rax
mov r8d, edi
mov rdx, rax
mov rcx, qword [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov r8, rsi
lea r9, [rsp + 0x328]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.0042100c
nop
mov r8, r14
lea rdx, [0x007996a8]
lea rcx, [rsp + 0x40]
call fcn.0049c8ec
mov r13, rax
lea r12, [rbp + 0x400]
mov rcx, qword [r12 + 0x48]
lea esi, [r14 + 2]
mov edi, 0x100
cmp rcx, qword [r12 + 0x40]
jne 0x494ba5
cmp rax, r14
je 0x494ab1
lea r8, [rax + 1]
mov r9, r14
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x40]
call fcn.00421328
nop
cmp rax, r12
je 0x494a72
mov r8, qword [rax + 0x40]
mov rdx, qword [rax + 0x48]
mov rcx, r12
call fcn.00406d38
nop
lea rax, [rsp + 0x280]
mov rcx, qword [rsp + 0x2c8]
cmp rcx, rax
je 0x494ad3
test rcx, rcx
je 0x494ad3
mov rax, qword [rsp + 0x280]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, rdi
jbe 0x494aaa
call fcn.006a4944
jmp 0x494ad3
call fcn.006a3610
jmp 0x494ad3
lea rax, [rsp + 0x40]
cmp rax, r12
je 0x494ad3
mov r8, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x88]
mov rcx, r12
call fcn.00406d38
mov rax, qword [r12 + 0x48]
cmp rax, qword [r12 + 0x40]
jne 0x494b32
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SetFocus]
nop
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x88]
cmp rcx, rax
je 0x494b25
test rcx, rcx
je 0x494b25
mov rax, qword [rsp + 0x40]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, rdi
jbe 0x494b1f
call fcn.006a4944
jmp 0x494b25
call fcn.006a3610
nop
mov rcx, rbx
call fcn.006a5088
jmp 0x495016
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x494ba5
xor ebx, ebx
mov edi, eax
and dword [rsp + 0x1e0], 0
xor edx, edx
lea r8d, [rdx + 0x44]
lea rcx, [rsp + 0x1e4]
call fcn.006aba40
and dword [rsp + 0x1ec], 0
mov dword [rsp + 0x1f0], 3
lea r9, [rsp + 0x1e0]
mov r8, rbx
mov edx, 0x102b
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
add rbx, rsi
sub rdi, rsi
jne 0x494b52
cmp r13, r14
jne 0x494baf
xor r13d, r13d
jmp 0x494bb2
add r13, rsi
mov r9, rsi
mov r8, r14
mov edx, 0x100c
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
lea r15d, [rsi + rax]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
mov qword [rsp + 0x30], rax
cmp r15d, eax
setl r14b
mov byte [rsp + 0x320], r14b
mov cl, r14b
neg cl
sbb esi, esi
and esi, r15d
test r14b, r14b
jne 0x494c12
cmp esi, r15d
jge 0x494e21
xor edx, edx
lea r8d, [rdx + 0x44]
lea rcx, [rsp + 0xf4]
call fcn.006aba40
mov dword [rsp + 0xf4], esi
mov dword [rsp + 0xf0], 4
lea r9, [rsp + 0xf0]
xor r8d, r8d
mov edx, 0x104b
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
neg eax
sbb rbx, rbx
and rbx, qword [rsp + 0x118]
mov qword [rsp + 0x20], rbx
je 0x494c72
lock add dword [rbx + 8], 1
mov rbx, qword [rsp + 0x20]
xor r8d, r8d
lea rdx, [rsp + 0x90]
mov rcx, rbx
call fcn.005460ec
nop
mov r8, qword [r12 + 0x40]
sub r8, qword [r12 + 0x48]
sar r8, 1
mov rdx, qword [rbp + 0x448]
mov rcx, qword [rsp + 0xd8]
call fcn.006a6b08
test eax, eax
sete al
test al, al
jne 0x494e6c
xor eax, eax
mov rdi, qword [rsp + 0xd8]
cmp word [rdi], 0x5b
jne 0x494d9e
mov edx, 0x5d
mov r8, rax
lea rcx, [rsp + 0x90]
call fcn.00421278
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x494d96
lea rdx, [rdi + rax*2 + 2]
lea r8, [rsp + 0x330]
lea rcx, [rsp + 0x230]
call fcn.004023b4
mov r8, qword [r12 + 0x40]
sub r8, qword [r12 + 0x48]
sar r8, 1
mov rdx, qword [rbp + 0x448]
mov rcx, qword [rsp + 0x278]
call fcn.006a6b08
test eax, eax
sete dil
lea rax, [rsp + 0x230]
mov rcx, qword [rsp + 0x278]
cmp rcx, rax
je 0x494d6c
test rcx, rcx
je 0x494d6c
mov rax, qword [rsp + 0x230]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, 0x100
jbe 0x494d67
call fcn.006a4944
jmp 0x494d6c
call fcn.006a3610
test dil, dil
jne 0x494e6c
lea rax, [r14 + 1]
mov rdi, qword [rsp + 0xd8]
cmp word [rdi + rax*2], 0x5b
je 0x494cc8
mov r14b, byte [rsp + 0x320]
jmp 0x494d9e
mov r14b, byte [rsp + 0x320]
inc esi
cmp esi, dword [rsp + 0x30]
jne 0x494db3
xor r14b, r14b
mov byte [rsp + 0x320], r14b
xor esi, esi
lea rax, [rsp + 0x90]
cmp rdi, rax
je 0x494df3
test rdi, rdi
je 0x494df3
mov rax, qword [rsp + 0x90]
sub rax, rdi
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, 0x100
jbe 0x494dea
mov rcx, rdi
call fcn.006a4944
jmp 0x494df3
mov rcx, rdi
call fcn.006a3610
nop
test rbx, rbx
je 0x494c04
or eax, 0xffffffff
lock xadd dword [rbx + 8], eax
add eax, 0xffffffff
jne 0x494c04
mov rcx, qword [rsp + 0x20]
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
jmp 0x494c04
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x88]
cmp rcx, rax
je 0x494e5d
test rcx, rcx
je 0x494e5d
mov rax, qword [rsp + 0x40]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, 0x100
jbe 0x494e57
call fcn.006a4944
jmp 0x494e5d
call fcn.006a3610
nop
mov rcx, qword [rsp + 0x28]
call fcn.006a5088
jmp 0x495016
lea edi, [r15 - 1]
cmp edi, 0xffffffff
je 0x494ec0
and dword [rsp + 0x140], 0
xor edx, edx
lea r8d, [rdx + 0x44]
lea rcx, [rsp + 0x144]
call fcn.006aba40
and dword [rsp + 0x14c], 0
mov dword [rsp + 0x150], 3
movsxd r8, edi
lea r9, [rsp + 0x140]
mov edx, 0x102b
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
and dword [rsp + 0x190], 0
xor edx, edx
lea r8d, [rdx + 0x44]
lea rcx, [rsp + 0x194]
call fcn.006aba40
mov dword [rsp + 0x19c], 3
mov dword [rsp + 0x1a0], 3
movsxd rdi, esi
lea r9, [rsp + 0x190]
mov r8, rdi
mov edx, 0x102b
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
xor r9d, r9d
mov r8, rdi
mov edx, 0x1013
mov rcx, qword [rbp + 0x1450]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
movsxd r9, eax
movsxd r8, r13d
mov edx, 0xb1
mov rcx, qword [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_SendMessageW]
mov r9, qword [rsp + 0xd8]
xor r8d, r8d
mov edx, 0xc2
mov rcx, qword [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_SendMessageW]
nop
lea rax, [rsp + 0x90]
mov rcx, qword [rsp + 0xd8]
cmp rcx, rax
je 0x494fae
test rcx, rcx
je 0x494fae
mov rax, qword [rsp + 0x90]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, 0x100
jbe 0x494fa8
call fcn.006a4944
jmp 0x494fae
call fcn.006a3610
nop
test rbx, rbx
je 0x494fd0
or eax, 0xffffffff
lock xadd dword [rbx + 8], eax
add eax, 0xffffffff
jne 0x494fd0
mov rcx, qword [rsp + 0x20]
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
nop
lea rax, [rsp + 0x40]
mov rcx, qword [rsp + 0x88]
cmp rcx, rax
je 0x49500c
test rcx, rcx
je 0x49500c
mov rax, qword [rsp + 0x40]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, 0x100
jbe 0x495006
call fcn.006a4944
jmp 0x49500c
call fcn.006a3610
nop
mov rcx, qword [rsp + 0x28]
call fcn.006a5088
add rsp, 0x2d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret