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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov eax, dword [0x40ee60]
mov dword [ebp - 0x50], 0
test eax, eax
je 0x406bbb
lea esi, [ebp - 0x4c]
jmp 0x406a86
cmp eax, 2
je 0x406bf0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x406bb0
mov dword [esp], 1
mov edi, 1
call fcn.004073d0
mov dword [esp], eax
lea edx, [ebp - 0x38]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], edx
call sub.KERNEL32.dll_PeekConsoleInputA
sub esp, 0x10
test eax, eax
jne 0x406abc
mov dword [ebp - 0x4c], 0
mov ebx, dword [ebp - 0x4c]
test ebx, ebx
je 0x406bb0
mov dword [esp], 1
lea edi, [ebp - 0x38]
call fcn.004073d0
mov dword [esp], eax
mov ecx, 1
mov dword [esp + 0xc], esi
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
call sub.KERNEL32.dll_ReadConsoleInputA
movzx eax, word [ebp - 0x38]
sub esp, 0x10
cmp eax, 1
jne 0x406a72
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x406c12
cmp word [ebp - 0x30], 0
je 0x406a7b
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.00406820
mov dword [ebp - 0x5c], 0
mov ebx, eax
mov eax, dword [ebp - 0x28]
test al, 0x1c
je 0x406d12
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 0x406d26
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406b8c
mov eax, dword [0x40ee70]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x40ee70], eax
cmp ebx, 0xffffffff
je 0x406a7b
mov dword [esp], ebx
lea edi, [ebp - 0x34]
mov dword [esp + 4], edi
call fcn.004066d0
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x406a86
nop
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x4067f0
mov eax, 1
mov dword [0x40ee60], eax
call fcn.00401280
mov dword [esp], 0x406770
mov eax, 1
mov dword [esp + 4], eax
call sub.KERNEL32.dll_SetConsoleCtrlHandler
sub esp, 8
jmp 0x406a6d
mov edx, dword [0x416040]
test edx, edx
je 0x406a7b
lea eax, [ebp - 0x34]
mov dword [esp], eax
call edx
mov dword [ebp - 0x50], 1
jmp 0x406a7b
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x28]
test al, 0x1c
jne 0x406c30
test al, 3
je 0x406c30
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 0x406c6f
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406a7b
mov eax, dword [0x40ee70]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x40ee70], eax
jmp 0x406a7b
mov edi, dword [ebp - 0x5c]
test edi, edi
jne 0x406a7b
mov ebx, dword [0x40ee70]
test ebx, ebx
je 0x406a7b
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 0x406d32
test dword [ebp - 0x60], 0x200
je 0x406ccb
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x406cd7
or edx, 2
mov dword [esp], ecx
xor ebx, ebx
mov dword [ebp - 0x3c], edx
mov dword [esp + 4], ebx
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 [0x40ee70]
mov dword [esp], eax
call fcn.004066d0
xor ecx, ecx
mov dword [0x40ee70], ecx
jmp 0x406a7b
test al, 3
je 0x406b52
mov dword [ebp - 0x5c], 1
jmp 0x406b52
cmp ebx, 0xffffffff
je 0x406d37
xor eax, eax
jmp 0x406b87
or edx, 0x10
jmp 0x406cbf
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x406a7b
mov eax, dword [0x40ee70]
test eax, eax
mov dword [ebp - 0x54], eax
je 0x406b8c
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 0x406d94
or edx, 0x10
test dword [ebp - 0x60], 0x200
je 0x406da0
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x406dac
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
movzx eax, byte [0x40ee70]
sub esp, 8
lea edx, [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004066d0
xor eax, eax
jmp 0x406b87