Function at 0x40c400
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 8
mov eax, str.down
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
test ebp, ebp
push edi
jne 0x40c419
mov eax, 0x41c654
mov esi, dword [esp + 0x1c]
push eax
push esi
push 0x41c710
push 9
push 0x41ee48
call fcn.00401950
add esp, 0x14
mov eax, 0x4157a0
cmp dword [eax], esi
je 0x40c6f7
add eax, 4
cmp eax, 0x4157ac
jl 0x40c438
xor ecx, ecx
mov eax, 0x4157b4
cmp dword [eax], esi
je 0x40c541
add eax, 8
inc ecx
cmp eax, 0x415a9c
jl 0x40c451
push esi
call dword [sym.imp.USER32.dll_VkKeyScanA]
xor ebx, ebx
mov dword [esp + 0x10], eax
mov bl, ah
and eax, 0xff
cmp eax, 0xffffffff
je 0x40c6f7
mov ebp, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x14
call ebp
test ah, 0x80
je 0x40c493
xor bl, 1
mov byte [esp + 0x1c], bl
call fcn.00411c30
test eax, eax
je 0x40c5eb
push 0xa0
call ebp
mov si, ax
push 0xa1
shr esi, 0xf
and esi, 1
call ebp
shr eax, 0xf
and eax, 1
push 0
push 0xa1
mov dword [esp + 0x1c], eax
call fcn.0040c360
push 0
push 0xa0
call fcn.0040c360
mov ebx, dword [esp + 0x2c]
and ebx, 0xff
mov edx, ebx
and edx, 1
push edx
push 0x10
call fcn.0040c360
add esp, 0x18
push 0xa2
call ebp
mov di, ax
shr edi, 0xf
and edi, 1
jne 0x40c51c
mov eax, ebx
and eax, 2
push eax
push 0xa2
call fcn.0040c360
add esp, 8
push 0xa4
call ebp
shr eax, 0xf
and eax, 1
mov dword [esp + 0x1c], eax
jne 0x40c64f
and ebx, 4
push ebx
push 0xa4
jmp 0x40c647
mov ebx, dword [ecx*8 + 0x4157b0]
call fcn.00411c30
test eax, eax
je 0x40c598
push 0x41c6b4
push 9
push 0x41ee48
call fcn.00401950
add esp, 0xc
test ebp, ebp
je 0x40c598
cmp ebx, 0x2e
jne 0x40c598
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call edi
mov si, ax
push 0x12
shr esi, 0xf
and esi, 1
call edi
shr eax, 0xf
and eax, 1
test esi, esi
je 0x40c598
test eax, eax
je 0x40c598
call fcn.00411f70
call fcn.00411c20
test eax, eax
je case.0x40c5b3.20
lea eax, [ebx - 0x11]
cmp eax, 0x94
ja case.0x40c5b3.20
xor ecx, ecx
mov cl, byte [eax + 0x40c714]
jmp dword [ecx*4 + 0x40c704]
mov ebx, 0x10
jmp case.0x40c5b3.20
mov ebx, 0x11
jmp case.0x40c5b3.20
mov ebx, 0x12
neg ebp
sbb ebp, ebp
and ebp, 0xfffffffe
add ebp, 2
push ebp
push ebx
call fcn.0040c330
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
push 0x10
call ebp
mov ebx, dword [esp + 0x1c]
mov si, ax
and ebx, 0xff
mov ecx, ebx
and ecx, 1
shr esi, 0xf
push ecx
push 0x10
and esi, 1
call fcn.0040c360
add esp, 8
push 0x11
call ebp
mov di, ax
shr edi, 0xf
and edi, 1
jne 0x40c631
mov edx, ebx
and edx, 2
push edx
push 0x11
call fcn.0040c360
add esp, 8
push 0x12
call ebp
shr eax, 0xf
and eax, 1
mov dword [esp + 0x1c], eax
jne 0x40c64f
and ebx, 4
push ebx
push 0x12
call fcn.0040c360
add esp, 8
push 0x10
call ebp
test ah, 0x80
mov eax, str.down
jne 0x40c662
mov eax, 0x41c654
push eax
push 0x41c658
push 9
push 0x41ee48
call fcn.00401950
mov eax, dword [esp + 0x30]
neg eax
sbb eax, eax
and al, 0xfe
add eax, 2
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.0040c330
add esp, 0x18
call fcn.00411c30
test eax, eax
push esi
je 0x40c6d9
push 0xa0
call fcn.0040c360
mov ecx, dword [esp + 0x1c]
push ecx
push 0xa1
call fcn.0040c360
push edi
push 0xa2
call fcn.0040c360
mov edx, dword [esp + 0x34]
push edx
push 0xa4
call fcn.0040c360
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
push 0x10
call fcn.0040c360
push edi
push 0x11
call fcn.0040c360
mov eax, dword [esp + 0x2c]
push eax
push 0x12
call fcn.0040c360
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8