Function at 0x40f540
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x3c
push ebx
push ebp
xor ebp, ebp
push esi
cmp dword [0x4cadc0], ebp
je 0x40f55a
mov al, byte [0x4c9403]
jmp 0x40f67a
cmp dword [0x4ca61c], ebp
je 0x40f56c
mov al, byte [0x4ca4e9]
jmp 0x40f67a
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
mov byte [esp + 0x13], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f58d
mov byte [esp + 0xf], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x40f5a3
or byte [esp + 0xf], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f5b9
or byte [esp + 0xf], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x40f5cf
or byte [esp + 0xf], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f5e5
or byte [esp + 0xf], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x40f5fb
or byte [esp + 0xf], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x40f60e
or byte [esp + 0xf], 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x40f621
or byte [esp + 0xf], 0x80
cmp dword [0x4ca61c], ebp
je 0x40f675
mov bl, byte [esp + 0xf]
not bl
and bl, byte [0x4ca4e9]
je 0x40f675
mov cl, byte [0x4ca4eb]
mov al, bl
not al
and byte [0x4ca4e9], al
and byte [0x4ca4ea], al
and cl, al
mov al, cl
mov byte [0x4ca4eb], cl
mov ecx, 0x4ca510
call fcn.00413a20
mov eax, dword [0x4c93f4]
cmp eax, ebp
je 0x40f675
test byte [eax + 8], bl
je 0x40f675
mov dword [0x4c93f4], ebp
movzx eax, byte [esp + 0xf]
mov ebx, 1
push ebx
push ebp
push ebp
push eax
mov eax, dword [esp + 0x5c]
push eax
mov eax, 0xffc3d44f
call fcn.00413240
add esp, 0x14
cmp dword [0x4cadc0], ebx
jne 0x40f808
mov ecx, dword [0x4c6a44]
movzx edx, byte [ecx + 0xf6]
mov ecx, dword [0x4c9414]
mov esi, 0xffc3d44d
sub esi, edx
cmp ecx, dword [0x4c9410]
jne 0x40f6de
call fcn.00412c50
mov ecx, dword [0x4c9414]
test eax, eax
je 0x40f756
cmp dword [0x4cadc0], ebx
jne 0x40f714
mov edx, dword [0x4c9418]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [edx + eax*4]
xor edx, edx
or byte [0x4c9402], bl
mov word [eax + 4], dx
movzx edx, di
mov dword [eax], ebx
mov word [eax + 6], dx
mov dword [eax + 8], 4
mov dword [eax + 0x10], esi
mov dword [eax + 0xc], ebp
jmp 0x40f74e
mov eax, dword [0x4c9418]
lea eax, [eax + ecx*8]
cmp di, bp
jne 0x40f728
mov dword [eax], ebp
mov dword [eax + 4], esi
jmp 0x40f74e
mov dl, byte [0x4c9403]
test dl, 3
jne 0x40f740
test dl, 0xc
je 0x40f740
mov dword [eax], 0x104
jmp 0x40f746
mov dword [eax], 0x100
mov byte [eax + 6], 0
mov word [eax + 4], di
add ecx, ebx
mov dword [0x4c9414], ecx
mov edx, dword [0x4c6a44]
movzx eax, byte [edx + 0xf6]
mov esi, 0xffc3d44d
sub esi, eax
cmp ecx, dword [0x4c9410]
jne 0x40f785
call fcn.00412c50
test eax, eax
je 0x40f878
mov ecx, dword [0x4c9414]
mov eax, dword [0x4c9418]
cmp dword [0x4cadc0], ebx
jne 0x40f7cf
or byte [0x4c9402], bl
lea edx, [ecx*8]
sub edx, ecx
lea eax, [eax + edx*4]
xor edx, edx
mov word [eax + 4], dx
movzx edx, di
add ecx, ebx
mov dword [eax], ebx
mov word [eax + 6], dx
mov dword [eax + 8], 6
mov dword [eax + 0x10], esi
mov dword [eax + 0xc], ebp
mov dword [0x4c9414], ecx
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
lea eax, [eax + ecx*8]
cmp di, bp
jne 0x40f7eb
add ecx, ebx
mov dword [eax], ebp
mov dword [eax + 4], esi
mov dword [0x4c9414], ecx
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
add ecx, ebx
mov dword [eax], 0x101
mov byte [eax + 6], 0
mov word [eax + 4], di
mov dword [0x4c9414], ecx
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [0x4c6a44]
xor ecx, ecx
mov word [esp + 0x14], cx
mov dword [esp + 0x10], ebx
mov word [esp + 0x16], di
mov dword [esp + 0x18], 4
mov dword [esp + 0x1c], ebp
movzx edx, byte [eax + 0xf6]
mov ecx, 0xffc3d44d
sub ecx, edx
xor edx, edx
mov dword [esp + 0x20], ecx
mov word [esp + 0x30], dx
mov dword [esp + 0x2c], ebx
mov word [esp + 0x32], di
mov dword [esp + 0x34], 6
mov dword [esp + 0x38], ebp
movzx eax, byte [eax + 0xf6]
push 0x1c
lea edx, [esp + 0x14]
mov ecx, 0xffc3d44d
push edx
sub ecx, eax
push 2
mov dword [esp + 0x48], ecx
call dword [sym.imp.USER32.dll_SendInput]
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret