Function at 0x40fd80
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x487a20
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x4a4100]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
xor ecx, ecx
mov dword [esp + 0x1c], esi
cmp esi, ecx
je 0x40fdbf
inc dword [esi + 4]
movsx edi, ax
shr eax, 0x10
push 0x38
movsx ebx, ax
push ecx
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x1c], ecx
call fcn.00474b70
mov edx, dword [esi + 0xec]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push edx
mov dword [esp + 0x28], 0x3c
call dword [sym.imp.USER32.dll_GetWindowInfo]
push ebx
push edi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
je 0x40fe90
push ebx
push edi
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
jne 0x40fe90
mov eax, dword [esi + 0x20]
sub edi, dword [esp + 0x24]
sub ebx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
test eax, eax
jle 0x40fe90
jmp 0x40fe40
mov edx, dword [esi + 0x24]
mov eax, dword [esp + 0x14]
mov esi, dword [edx + eax*4]
mov edx, dword [esi + 4]
mov eax, edi
sub eax, dword [esi + 0x1c]
mov ecx, ebx
sub ecx, dword [esi + 0x20]
and edx, 0x18000000
cmp edx, 0x10000000
jne 0x40fe75
push ecx
push eax
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
jne 0x40fe89
mov eax, dword [esp + 0x14]
mov esi, dword [ebp + 8]
inc eax
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
jl 0x40fe40
jmp 0x40fe90
mov dword [esp + 0x10], esi
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
xor edx, edx
mov dword [esp + 0x14], ecx
cmp ecx, edx
je 0x40fea1
inc dword [ecx + 0x34]
mov byte [esp + 0x68], 1
mov eax, dword [esi + 0xf4]
cmp eax, edx
je 0x40feec
cmp ecx, eax
je 0x40feec
push edx
mov dword [esi + 0xf4], edx
cmp ecx, edx
mov dword [esp + 0x1c], edx
mov esi, eax
push 0x2a3
lea ecx, [esp + 0x20]
je 0x40ffb4
xor edx, edx
call fcn.00413590
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x24], 0
je 0x40ffbf
mov esi, dword [ebp + 8]
mov ecx, eax
test ecx, ecx
je 0x40ffd5
push 1
xor esi, esi
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x40ff08
mov esi, 1
push 2
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x40ff18
or esi, 2
push 4
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x40ff28
or esi, 0x10
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x40ff38
or esi, 4
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x40ff48
or esi, 8
mov eax, dword [esp + 0x10]
sub ebx, dword [eax + 0x20]
sub edi, dword [eax + 0x1c]
movzx edx, bx
movzx ecx, di
shl edx, 0x10
or edx, ecx
mov ecx, dword [ebp + 0xc]
push esi
add ecx, 0x160
push ecx
mov ecx, dword [ebp + 0x14]
mov esi, eax
call fcn.00413590
mov edi, eax
or ebx, 0xffffffff
mov eax, esi
add dword [eax + 0x34], ebx
jne 0x40ff87
push eax
call fcn.0046f011
add esp, 4
mov esi, dword [ebp + 8]
add dword [esi + 4], ebx
jne 0x40ff9d
call fcn.00412bb0
push esi
call fcn.0046f011
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor edx, edx
call fcn.00413590
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40ffd2
add dword [eax + 0x34], 0xffffffff
jne 0x40ffd2
push eax
call fcn.0046f011
add esp, 4
mov esi, dword [ebp + 8]
add dword [esi + 4], 0xffffffff
jne 0x40ffec
call fcn.00412bb0
mov edx, dword [ebp + 8]
push edx
call fcn.0046f011
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10