Function at 0x502ed0
Capabilities:
Log keystrokes via polling

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
lea eax, [ebp - 8]
push eax
mov ebx, ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x190]
test al, 1
je 0x5030bb
cmp byte [ebx + 0x140], 0
mov esi, dword [sym.imp.USER32.dll_GetCapture]
jne 0x502f1d
call esi
push eax
call fcn.0048917a
cmp eax, ebx
je 0x502f3b
cmp byte [ebx + 0x140], 0
je 0x502f29
call esi
push eax
call fcn.0048917a
cmp eax, ebx
jne 0x502f3b
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
test cx, ax
jne 0x502f58
cmp dword [ebx + 0x32c], 0
jne 0x502f58
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov byte [ebx + 0x140], 0
mov byte [ebx + 0x294], 0
cmp byte [ebx + 0x294], 0
je 0x5030e4
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetWindowRect]
cmp byte [ebx + 0x295], 0
jne 0x502f98
push dword [ebp - 4]
lea eax, [ebp - 0x30]
push dword [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
dec eax
neg eax
sbb al, al
inc al
mov byte [ebx + 0x295], al
mov esi, dword [ebp - 8]
mov ecx, dword [ebx + 0x160]
mov edx, dword [ebx + 0x164]
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x20], eax
mov eax, ecx
sub eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x138]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x13c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebx + 0x20]
mov dword [ebx + 0x160], esi
mov dword [ebx + 0x164], ecx
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [ebp - 0x1c]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
push dword [ebp - 0x20]
sub esi, dword [ebp - 0x10]
sub edi, dword [ebp - 0xc]
mov ecx, ebx
call fcn.004cbb9d
push esi
call fcn.00583569
cmp eax, dword [0x630350]
pop ecx
jg 0x50301e
push edi
call fcn.00583569
cmp eax, dword [0x630354]
pop ecx
jle 0x50310d
cmp byte [ebx + 0x295], 0
je 0x50310d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x144]
test eax, eax
je 0x50306b
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0048917a
push eax
push 0x5e2f7c
call fcn.0048d0e0
pop ecx
pop ecx
test eax, eax
je 0x5030ab
mov edx, dword [eax]
push 0
push 0xffffffffffffffff
push 1
mov ecx, eax
call dword [edx + 0x178]
jmp 0x5030ab
mov eax, dword [ebx]
push 1
push 1
sub esp, 0x10
mov edi, esp
lea esi, [ebx + 0x1b8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, ebx
movsd dword es:[edi], dword [esi]
call dword [eax + 0x1d4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x174]
mov esi, 0x628284
push eax
mov ecx, esi
call fcn.0051bf93
push 0
push 0
push eax
mov ecx, esi
call fcn.0051c173
mov byte [ebx + 0x294], 0
mov byte [ebx + 0x295], 0
jmp 0x50310d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x190]
test al, 2
je 0x5030e4
cmp byte [ebx + 0x294], 0
je 0x5030e4
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004cc08d
jmp 0x50310d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [ebp - 0x14]
mov eax, dword [ebx]
push dword [ebp - 0x18]
mov ecx, ebx
call dword [eax + 0x368]
pop edi
pop esi
pop ebx
leave
ret 0xc