Function at 0x509ac6
Capabilities:
Log keystrokes via polling

Disassembly:
push 0x14
mov eax, 0x58a3b1
call fcn.0056258e
mov ebx, ecx
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
cmp eax, 0x14
je 0x509d58
xor edi, edi
cmp dword [ebx + 0x8c], edi
je 0x509afa
push dword [ebp + 8]
call fcn.00426b02
jmp 0x509d5b
cmp eax, 0x201
jne 0x509b3a
mov edx, dword [ebx + 0x80]
mov dword [ebp - 0x10], edx
cmp dword [edx + 0x1e4], edi
je 0x509b3a
cmp dword [edx + 0xcc], edi
jne 0x509b3a
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 0x20]
cmp dword [ecx], eax
je 0x509b3a
mov eax, dword [edx]
push edi
mov esi, dword [eax + 0x224]
mov ecx, esi
call dword [0x5929e8]
mov ecx, dword [ebp - 0x10]
call esi
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0x200
jne 0x509c9e
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xdc]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
jne 0x509c9b
push 0x17
call dword [sym.imp.USER32.dll_GetSystemMetrics]
xor ecx, ecx
test eax, eax
setne cl
inc ecx
push ecx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
jae 0x509b9e
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call fcn.00424800
cmp eax, ebx
jne 0x509d58
xor edi, edi
cmp dword [ebx + 0x84], edi
jne 0x509be0
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebx + 0x84], 1
mov dword [ebp - 0x20], 0x10
mov dword [ebp - 0x1c], 2
call dword [sym.imp.USER32.dll_TrackMouseEvent]
push 0x105
push edi
push edi
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_RedrawWindow]
cmp dword [ebx + 0x88], edi
jne 0x509c9b
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xa4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
je 0x509c9b
lea eax, [ebp - 0x18]
xor esi, esi
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.USER32.dll_GetCursorPos]
push 0x105
push esi
push esi
push dword [ebx + 0x20]
mov dword [ebx + 0x88], 1
call dword [sym.imp.USER32.dll_RedrawWindow]
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xa4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
lea ecx, [ebp - 0x18]
push ecx
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_ScreenToClient]
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xa4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
movzx ecx, word [ebp - 0x14]
mov edx, eax
movzx eax, word [ebp - 0x18]
shl ecx, 0x10
or ecx, eax
push ecx
push 0
push 0x200
push dword [edx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0x100
jne 0x509fac
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xdc]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
mov eax, dword [ebp + 8]
jne 0x509fac
push dword [eax + 8]
mov ecx, ebx
call fcn.00509fb4
test eax, eax
jne 0x509d58
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
sub eax, 9
je 0x509f87
sub eax, 4
je 0x509e74
sub eax, 0xe
je 0x509daa
sub eax, 6
je 0x509d63
sub eax, 1
je 0x509d63
sub eax, 4
je 0x509d63
dec eax
sub eax, 1
jne 0x509fa9
mov edi, dword [ebx + 0x80]
cmp dword [edi + 0x1dc], eax
je 0x509d63
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
jne 0x509d63
mov edi, dword [ebx + 0x80]
mov edx, dword [edi]
mov esi, dword [edx + 0x298]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
xor eax, eax
inc eax
call fcn.0056255c
ret 4
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
mov eax, dword [ebp + 8]
je 0x509fac
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [0x5f2764]
test eax, eax
je 0x509d9a
mov eax, dword [eax + 0x20]
push ecx
push edx
push 0x100
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x509d58
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
je 0x509ddd
mov ecx, dword [0x5f2764]
test ecx, ecx
je 0x509ddd
xor eax, eax
push eax
push eax
push 0x10
push dword [ecx + 0x20]
jmp 0x509da2
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
jne 0x509e30
push dword [ebx + 0x90]
mov ecx, ebx
call fcn.00459832
mov edi, dword [ebx + 0x80]
push ecx
mov esi, esp
mov dword [ebp - 0x14], esi
mov eax, dword [ebx + 0x90]
sub eax, 0x10
push eax
call fcn.00417b40
pop ecx
add eax, 0x10
mov ecx, edi
mov dword [esi], eax
call fcn.0050a3f0
mov ecx, ebx
call fcn.00424c52
test eax, eax
je 0x509fa9
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
jne 0x509fa9
mov ecx, ebx
call fcn.00424c52
mov ecx, eax
call fcn.0045975c
jmp 0x509d58
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xe4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
jne 0x509fa9
lea ecx, [ebp - 0x10]
call fcn.0041658a
and dword [ebp - 4], 0
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.00424d6a
mov edi, dword [ebx + 0x80]
push ecx
mov esi, esp
mov dword [ebp - 0x14], esi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
push eax
call fcn.00417b40
pop ecx
add eax, 0x10
mov ecx, edi
mov dword [esi], eax
call fcn.0050a3f0
mov ecx, dword [ebx + 0x80]
push 1
call fcn.0047838f
mov eax, dword [ebx + 0x80]
mov eax, dword [eax + 0x94]
test eax, eax
je 0x509f40
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.00424800
test eax, eax
jne 0x509f06
xor ecx, ecx
jmp 0x509f09
mov ecx, dword [eax + 0x20]
mov eax, dword [0x5f2764]
test eax, eax
je 0x509f15
mov eax, dword [eax + 0x20]
cmp ecx, eax
jne 0x509f40
mov eax, dword [ebx + 0x80]
push dword [eax + 0x94]
call fcn.0042f28d
mov edi, eax
pop ecx
mov ecx, dword [edi]
mov esi, dword [ecx + 0x60]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
jmp 0x509f66
mov ecx, ebx
call fcn.00424c52
test eax, eax
je 0x509f76
mov eax, dword [ebx + 0x80]
mov ecx, ebx
and dword [eax + 0x1e8], 0
call fcn.00424c52
mov ecx, eax
call fcn.0045975c
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.004162b0
jmp 0x509d58
mov ecx, dword [ebp - 0x10]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.004162b0
jmp 0x509fa9
mov edi, dword [ebx + 0x80]
mov eax, dword [edi]
mov esi, dword [eax + 0xd4]
mov ecx, esi
call dword [0x5929e8]
mov ecx, edi
call esi
test eax, eax
je 0x509d58
mov eax, dword [ebp + 8]
push eax
mov ecx, ebx
jmp 0x509af0