Function at 0x405c70
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 [0x40b460]
test ecx, ecx
je 0x405eb0
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.004061a8
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 0x405cdc
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 0x405cce
mov dword [esp], 1
call fcn.004061a8
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 0x405d2c
cmp ax, 2
je 0x405dfc
mov edi, dword [ebp - 0x1c]
test edi, edi
jne 0x405ca3
jmp 0x405cce
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x405e20
mov eax, dword [ebp - 0x40]
test al, 0x1c
je 0x405ee4
xor edx, edx
test edx, edx
jne 0x405d1d
mov eax, dword [0x40b464]
mov dword [ebp - 0x60], eax
test eax, eax
je 0x405d1d
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 [0x40b464]
and eax, 0xff
mov dword [esp], eax
call fcn.00405b8c
mov dword [0x40b464], 0
jmp 0x405d1d
mov eax, dword [0x4125d4]
test eax, eax
je 0x405d1d
lea edx, [ebp - 0x4c]
mov dword [esp], edx
call eax
mov dword [ebp - 0x5c], 1
jmp 0x405d1d
cmp word [ebp - 0x48], 0
je 0x405d1d
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.00405968
mov edx, dword [ebp - 0x40]
test dl, 0x1c
je 0x405f01
xor edi, edi
mov dx, word [ebp - 0x46]
lea ecx, [edx - 0x60]
cmp cx, 9
ja 0x405ef0
test edi, edi
je 0x405ef0
mov edi, dword [ebp - 0x4c]
test edi, edi
je 0x405e92
movzx edx, dx
mov ecx, dword [0x40b464]
lea ecx, [ecx + ecx*4]
lea edx, [edx + ecx*2 - 0x60]
mov dword [0x40b464], edx
cmp eax, 0xffffffff
je 0x405d1d
lea edx, [ebp - 0x4c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00405b8c
jmp 0x405d1d
mov dword [0x40b460], 1
mov dword [esp], 0x405b5c
call section..text
mov dword [esp + 4], 1
mov dword [esp], 0x405bf4
call sub.KERNEL32.dll_SetConsoleCtrlHandler
sub esp, 8
jmp 0x405c8a
xor edx, edx
test al, 3
setne dl
jmp 0x405d44
cmp eax, 0xffffffff
je 0x405f0f
mov dword [0x40b464], 0
jmp 0x405e9b
and edx, 3
setne dl
movzx edi, dl
jmp 0x405e64
test edi, edi
jne 0x405d1d
mov eax, dword [0x40b464]
mov dword [ebp - 0x60], eax
test eax, eax
je 0x405d1d
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 0x405dd6