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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov ecx, dword [0x407440]
test ecx, ecx
je 0x402208
mov dword [ebp - 0x5c], 0
lea ebx, [ebp - 0x1c]
lea esi, [ebp - 0x50]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x70], eax
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x6c], edx
mov dword [esp], 1
call fcn.00402500
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.KERNEL32.dll_PeekConsoleInputA
sub esp, 0x10
test eax, eax
jne 0x402034
mov eax, dword [ebp - 0x5c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x402026
mov dword [esp], 1
call fcn.00402500
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.KERNEL32.dll_ReadConsoleInputA
sub esp, 0x10
mov eax, dword [ebp - 0x50]
cmp ax, 1
je 0x402084
cmp ax, 2
je 0x402154
mov edi, dword [ebp - 0x1c]
test edi, edi
jne 0x401ffb
jmp 0x402026
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x402178
mov eax, dword [ebp - 0x40]
test al, 0x1c
je 0x40223c
xor edx, edx
test edx, edx
jne 0x402075
mov eax, dword [0x407444]
mov dword [ebp - 0x60], eax
test eax, eax
je 0x402075
movsx eax, byte [ebp - 0x60]
mov dword [esp], eax
call sub.USER32.dll_VkKeyScanA
push edx
mov edx, eax
mov edi, dword [ebp - 0x70]
mov ecx, 0x10
xor eax, eax
rep stosb byte es:[edi], al
mov al, byte [ebp - 0x60]
mov byte [ebp - 0x32], al
movzx ecx, dl
mov word [ebp - 0x36], cx
movsx edx, dx
mov eax, edx
and eax, 0x100
cmp eax, 1
sbb eax, eax
not eax
mov edi, edx
and edi, 0x200
cmp edi, 1
sbb edi, edi
not edi
and edi, 8
and edx, 0x400
cmp edx, 1
sbb edx, edx
not edx
and edx, 2
and eax, 0x10
or eax, edi
or eax, edx
mov dword [ebp - 0x30], eax
mov dword [esp + 4], 0
movzx ecx, cx
mov dword [esp], ecx
call sub.USER32.dll_MapVirtualKeyA
sub esp, 8
mov word [ebp - 0x34], ax
lea edx, [ebp - 0x3c]
mov dword [esp + 4], edx
mov eax, dword [0x407444]
and eax, 0xff
mov dword [esp], eax
call fcn.00401ee4
mov dword [0x407444], 0
jmp 0x402075
mov eax, dword [0x40e5b4]
test eax, eax
je 0x402075
lea edx, [ebp - 0x4c]
mov dword [esp], edx
call eax
mov dword [ebp - 0x5c], 1
jmp 0x402075
cmp word [ebp - 0x48], 0
je 0x402075
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x46]
mov dword [esp + 8], eax
movzx eax, word [ebp - 0x44]
mov dword [esp + 4], eax
movsx eax, byte [ebp - 0x42]
mov dword [esp], eax
call fcn.00401cc0
mov edx, dword [ebp - 0x40]
test dl, 0x1c
je 0x402259
xor edi, edi
mov dx, word [ebp - 0x46]
lea ecx, [edx - 0x60]
cmp cx, 9
ja 0x402248
test edi, edi
je 0x402248
mov edi, dword [ebp - 0x4c]
test edi, edi
je 0x4021ea
movzx edx, dx
mov ecx, dword [0x407444]
lea ecx, [ecx + ecx*4]
lea edx, [edx + ecx*2 - 0x60]
mov dword [0x407444], edx
cmp eax, 0xffffffff
je 0x402075
lea edx, [ebp - 0x4c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401ee4
jmp 0x402075
mov dword [0x407440], 1
mov dword [esp], 0x401eb4
call section..text
mov dword [esp + 4], 1
mov dword [esp], 0x401f4c
call sub.KERNEL32.dll_SetConsoleCtrlHandler
sub esp, 8
jmp 0x401fe2
xor edx, edx
test al, 3
setne dl
jmp 0x40209c
cmp eax, 0xffffffff
je 0x402267
mov dword [0x407444], 0
jmp 0x4021f3
and edx, 3
setne dl
movzx edi, dl
jmp 0x4021bc
test edi, edi
jne 0x402075
mov eax, dword [0x407444]
mov dword [ebp - 0x60], eax
test eax, eax
je 0x402075
movsx eax, byte [ebp - 0x60]
mov dword [esp], eax
call sub.USER32.dll_VkKeyScanA
push ecx
mov edx, eax
mov edi, dword [ebp - 0x6c]
mov ecx, 0x10
xor eax, eax
rep stosb byte es:[edi], al
mov al, byte [ebp - 0x60]
mov byte [ebp - 0x22], al
movzx ecx, dl
mov word [ebp - 0x26], cx
movsx edx, dx
mov eax, edx
and eax, 0x100
cmp eax, 1
sbb eax, eax
not eax
mov edi, edx
and edi, 0x200
cmp edi, 1
sbb edi, edi
not edi
and edi, 8
and edx, 0x400
cmp edx, 1
sbb edx, edx
not edx
and edx, 2
and eax, 0x10
or eax, edi
or eax, edx
mov dword [ebp - 0x20], eax
mov dword [esp + 4], 0
movzx ecx, cx
mov dword [esp], ecx
call sub.USER32.dll_MapVirtualKeyA
sub esp, 8
mov word [ebp - 0x24], ax
lea edx, [ebp - 0x2c]
jmp 0x40212e