Function at 0x40ce63
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
or edi, dword [0x4999b4]
mov eax, edi
and eax, 0x4000
mov dword [ebp - 0xc], eax
mov eax, edi
and eax, 0x2000
mov dword [ebp - 0x10], eax
mov eax, edi
and eax, 0x1000
mov dword [ebp - 8], eax
mov eax, 0x8000
test eax, edi
je 0x40ceab
call dword [sym.imp.USER32.dll_InSendMessage]
test eax, eax
jne 0x40ceab
xor ebx, ebx
jmp 0x40ceae
push 2
pop ebx
and edi, 0xffff0fff
cmp edi, 1
jne 0x40cf36
cmp byte [0x4999d4], 0
jne 0x40cec9
xor esi, esi
jmp 0x40d0b0
cmp byte [0x4999b0], 0
je 0x40ceda
xor esi, esi
inc esi
jmp 0x40d0b0
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 3
call edi
test al, 1
jne 0x40cf0f
push 0x1b
call edi
test al, 1
je 0x40d0b0
push 0x12
call edi
test ax, ax
jne 0x40cec2
push 0x11
call edi
test ax, ax
jne 0x40cec2
push 0x10
call edi
test ax, ax
jne 0x40cec2
or ebx, 1
push ebx
push 0x20e
push 0xa0
push 0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x40cf12
mov byte [0x4999b0], 1
jmp 0x40ced2
cmp dword [ebp - 8], esi
jne 0x40cf49
call dword [sym.imp.USER32.dll_GetCapture]
test eax, eax
jne 0x40d0ad
xor esi, esi
push ebx
push 0
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40d090
and dword [ebp - 8], 0
cmp dword [0x4999c4], 1
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], edx
jne 0x40ced2
mov eax, edx
sub eax, 0xf
je 0x40cfc9
sub eax, 0x11
je 0x40cfab
sub eax, 0x80
je 0x40cfab
sub eax, 0x61
je 0x40cfa5
sub eax, 0x17
je 0x40cfbc
sub eax, 0xe8
je 0x40cfab
dec eax
sub eax, 1
jne 0x40cfd6
cmp dword [ebp - 0x10], 0
jmp 0x40cfcd
test edi, edi
jne 0x40cfcf
call dword [sym.imp.USER32.dll_GetCapture]
mov edx, dword [ebp - 4]
test eax, eax
jne 0x40cfd6
test edi, edi
jne 0x40cfcf
mov dword [ebp - 8], 1
jmp 0x40cfcf
cmp dword [ebp - 0xc], 0
jne 0x40cfd6
xor ecx, ecx
xor esi, esi
inc ecx
jmp 0x40cfec
lea eax, [edx - 0xa0]
xor ecx, ecx
cmp eax, 0x16e
jbe 0x40d0ad
xor esi, esi
inc esi
cmp dword [ebp - 8], 0
je 0x40d02c
mov eax, ebx
or eax, 1
push eax
push edx
push edx
push dword [ebp - 0x2c]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40d01f
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
test esi, esi
je 0x40cf4b
jmp 0x40d0b0
test ecx, ecx
je 0x40d08c
cmp dword [ebp - 0xc], 0
je 0x40d049
push ebx
push 0xf
push 0xf
push 0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
mov esi, eax
test esi, esi
jne 0x40d07a
xor edi, edi
cmp edi, 0x40
jae 0x40d076
push ebx
push dword [edi + 0x4903f4]
lea eax, [ebp - 0x2c]
push dword [edi + 0x4903f0]
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
mov esi, eax
add edi, 8
test esi, esi
je 0x40d04f
test esi, esi
je 0x40d090
mov eax, dword [ebp - 0x28]
add eax, 0xffffff60
cmp eax, 0x16e
jbe 0x40d0ad
xor esi, esi
inc esi
test esi, esi
jne 0x40d0b0
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 1
call edi
mov ebx, 0x8000
test bx, ax
jne 0x40d0ad
push 2
call edi
test bx, ax
je 0x40d0b0
push 2
pop esi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret