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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov esi, dword [0x8be308]
mov dword [ebp - 0x50], 0
test esi, esi
je 0x40707b
lea esi, [ebp - 0x4c]
jmp 0x406f57
cmp eax, 2
je 0x4070b0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x407070
mov dword [esp + 0xc], esi
lea eax, [ebp - 0x38]
mov edx, 1
mov dword [esp + 4], eax
mov eax, dword [0x8c4ca0]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.KERNEL32.DLL_PeekConsoleInputA
sub esp, 0x10
test eax, eax
jne 0x406f86
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x407070
mov dword [esp + 0xc], esi
mov eax, 1
lea edi, [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, dword [0x8c4ca0]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.KERNEL32.DLL_ReadConsoleInputA
movzx eax, word [ebp - 0x38]
sub esp, 0x10
cmp eax, 1
jne 0x406f43
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4070d2
cmp word [ebp - 0x30], 0
je 0x406f4c
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x2e]
mov dword [esp + 8], eax
movzx eax, word [ebp - 0x2c]
mov dword [esp + 4], eax
movsx eax, byte [ebp - 0x2a]
mov dword [esp], eax
call fcn.00407550
mov dword [ebp - 0x5c], 0
mov ebx, eax
mov eax, dword [ebp - 0x28]
test al, 0x1c
je 0x4071cc
movzx ecx, word [ebp - 0x2e]
lea eax, [ecx - 0x60]
cmp ax, 9
setbe dl
xor eax, eax
cmp dword [ebp - 0x5c], 0
setne al
test edx, eax
je 0x4071e0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40704b
mov eax, dword [0x8be318]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x8be318], eax
cmp ebx, 0xffffffff
je 0x406f4c
mov dword [esp], ebx
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
call fcn.00406db0
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x406f57
mov esi, esi
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x406ef0
mov ebx, 1
mov dword [0x8be308], ebx
call fcn.00401280
mov dword [esp], 0x406e70
mov ecx, 1
mov dword [esp + 4], ecx
call sub.KERNEL32.DLL_SetConsoleCtrlHandler
sub esp, 8
jmp 0x406f3e
mov edx, dword [0x8be300]
test edx, edx
je 0x406f4c
lea eax, [ebp - 0x34]
mov dword [esp], eax
call edx
mov dword [ebp - 0x50], 1
jmp 0x406f4c
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x28]
test al, 0x1c
jne 0x4070f0
test al, 3
je 0x4070f0
mov dword [ebp - 0x5c], 1
nop
lea esi, [esi]
movzx ecx, word [ebp - 0x2e]
lea eax, [ecx - 0x60]
cmp ax, 9
setbe dl
xor eax, eax
cmp dword [ebp - 0x5c], 0
setne al
test edx, eax
je 0x40712f
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406f4c
mov eax, dword [0x8be318]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x8be318], eax
jmp 0x406f4c
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x406f4c
mov ebx, dword [0x8be318]
test ebx, ebx
je 0x406f4c
movsx eax, bl
lea edi, [ebp - 0x48]
mov dword [esp], eax
call sub.USER32.dll_VkKeyScanA
cld
cwde
mov ecx, 4
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
sub esp, 4
rep stosd dword es:[edi], eax
movzx ecx, byte [ebp - 0x60]
mov byte [ebp - 0x3e], bl
mov edx, dword [ebp - 0x3c]
test dword [ebp - 0x60], 0x100
mov word [ebp - 0x42], cx
jne 0x4071f2
test dword [ebp - 0x60], 0x200
je 0x40718b
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x407197
or edx, 2
mov dword [ebp - 0x3c], edx
xor eax, eax
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.USER32.dll_MapVirtualKeyA
mov word [ebp - 0x40], ax
sub esp, 8
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
movzx eax, byte [0x8be318]
mov dword [esp], eax
call fcn.00406db0
xor eax, eax
jmp 0x407125
test al, 3
je 0x407011
mov dword [ebp - 0x5c], 1
jmp 0x407011
cmp ebx, 0xffffffff
je 0x4071f7
xor edx, edx
mov dword [0x8be318], edx
jmp 0x40704b
or edx, 0x10
jmp 0x40717f
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x406f4c
mov eax, dword [0x8be318]
test eax, eax
mov dword [ebp - 0x54], eax
je 0x40704b
movzx eax, byte [ebp - 0x54]
lea edi, [ebp - 0x48]
movsx eax, al
mov dword [esp], eax
call sub.USER32.dll_VkKeyScanA
cld
cwde
mov ecx, 4
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
sub esp, 4
rep stosd dword es:[edi], eax
movzx ecx, byte [ebp - 0x60]
mov edx, dword [ebp - 0x3c]
movzx eax, byte [ebp - 0x54]
test dword [ebp - 0x60], 0x100
mov word [ebp - 0x42], cx
mov byte [ebp - 0x3e], al
je 0x407254
or edx, 0x10
test dword [ebp - 0x60], 0x200
je 0x407260
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x40726c
or edx, 2
mov dword [ebp - 0x3c], edx
xor edi, edi
mov dword [esp + 4], edi
lea edi, [ebp - 0x48]
mov dword [esp], ecx
call sub.USER32.dll_MapVirtualKeyA
mov word [ebp - 0x40], ax
movzx eax, byte [0x8be318]
sub esp, 8
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00406db0
jmp 0x4071e5