Function at 0x502556
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5e3f80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x1c]
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x20], edi
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [edi]
mov esi, dword [eax + 0x1b8]
mov ecx, esi
call dword [0x58f988]
mov ecx, edi
call esi
test al, 1
je 0x502791
cmp byte [edi + 0x170], bl
jne 0x5025bc
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.0042dbdc
cmp eax, edi
je 0x5025e8
cmp byte [edi + 0x170], bl
je 0x5025cc
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.0042dbdc
cmp eax, edi
jne 0x5025e8
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]
test ax, ax
js 0x502602
cmp dword [edi + 0x360], ebx
jne 0x502602
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov byte [edi + 0x170], bl
mov byte [edi + 0x2c8], bl
cmp byte [edi + 0x2c8], bl
je 0x5027c3
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push dword [edi + 0x20]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
cmp byte [edi + 0x2c9], bl
jne 0x50264c
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
dec eax
neg eax
sbb al, al
inc al
mov byte [edi + 0x2c9], al
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov ebx, ecx
sub ebx, dword [edi + 0x190]
mov eax, dword [ebp - 0x18]
mov edi, eax
sub edi, dword [edx + 0x194]
mov dword [edx + 0x194], eax
mov eax, dword [edx + 0x168]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [edx + 0x20]
mov dword [edx + 0x190], ecx
mov ecx, dword [edx + 0x16c]
mov dword [ebp - 0x24], ecx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x24]
sub esi, dword [ebp - 0x28]
push edi
push ebx
mov ebx, dword [ebp - 0x20]
mov ecx, ebx
mov dword [ebp - 0x34], eax
call fcn.0045dc2a
push esi
call fcn.00568862
pop ecx
cmp eax, dword [0x5ec1e0]
jg 0x5026cf
push dword [ebp - 0x34]
call fcn.00568862
pop ecx
cmp eax, dword [0x5ec1e4]
jle 0x5027f6
cmp byte [ebx + 0x2c9], 0
je 0x5027f6
mov eax, dword [ebx]
mov esi, dword [eax + 0x16c]
mov ecx, esi
call dword [0x58f988]
mov ecx, ebx
call esi
test eax, eax
je 0x502732
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0042dbdc
push eax
push 0x59afc4
call fcn.00423946
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x502786
mov ecx, dword [edi]
push 0
push 0xffffffffffffffff
push 1
mov esi, dword [ecx + 0x1a0]
mov ecx, esi
call dword [0x58f988]
mov ecx, edi
call esi
jmp 0x502786
mov eax, dword [ebx]
lea esi, [ebx + 0x1e8]
push 1
push 1
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [eax + 0x1fc]
mov ecx, esi
call dword [0x58f988]
mov ecx, ebx
call esi
mov eax, dword [ebx]
mov esi, dword [eax + 0x19c]
mov ecx, esi
call dword [0x58f988]
mov ecx, ebx
call esi
mov esi, 0x5e38e4
push eax
mov ecx, esi
call fcn.004cbc98
push 0
push 0
push eax
mov ecx, esi
call fcn.004cbb94
mov word [ebx + 0x2c8], 0
jmp 0x5027f6
mov eax, dword [edi]
mov esi, dword [eax + 0x1b8]
mov ecx, esi
call dword [0x58f988]
mov ecx, edi
call esi
test al, 2
je 0x5027c3
cmp byte [edi + 0x2c8], bl
je 0x5027c3
push dword [ebp + 0x10]
mov ecx, edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0045cb30
jmp 0x5027f6
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x20]
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [edi]
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
mov esi, dword [eax + 0x388]
mov ecx, esi
call dword [0x58f988]
mov ecx, edi
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00554ea8
leave
ret 0xc