Function at 0x403570
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 [0x4094b8]
mov dword [ebp - 0x50], 0
test eax, eax
je 0x4036db
lea esi, [ebp - 0x4c]
jmp 0x4035a6
cmp eax, 2
je 0x403710
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4036d0
mov dword [esp], 1
mov edi, 1
call fcn.00403e00
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 0x4035dc
mov dword [ebp - 0x4c], 0
mov ebx, dword [ebp - 0x4c]
test ebx, ebx
je 0x4036d0
mov dword [esp], 1
lea edi, [ebp - 0x38]
call fcn.00403e00
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 0x403592
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x403732
cmp word [ebp - 0x30], 0
je 0x40359b
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.00403340
mov dword [ebp - 0x5c], 0
mov ebx, eax
mov eax, dword [ebp - 0x28]
test al, 0x1c
je 0x403832
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 0x403846
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4036ac
mov eax, dword [0x4094c8]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x4094c8], eax
cmp ebx, 0xffffffff
je 0x40359b
mov dword [esp], ebx
lea edi, [ebp - 0x34]
mov dword [esp + 4], edi
call fcn.004031f0
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x4035a6
nop
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x403310
mov eax, 1
mov dword [0x4094b8], eax
call fcn.00401280
mov dword [esp], 0x403290
mov eax, 1
mov dword [esp + 4], eax
call sub.KERNEL32.dll_SetConsoleCtrlHandler
sub esp, 8
jmp 0x40358d
mov edx, dword [0x4094b0]
test edx, edx
je 0x40359b
lea eax, [ebp - 0x34]
mov dword [esp], eax
call edx
mov dword [ebp - 0x50], 1
jmp 0x40359b
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x28]
test al, 0x1c
jne 0x403750
test al, 3
je 0x403750
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 0x40378f
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40359b
mov eax, dword [0x4094c8]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x4094c8], eax
jmp 0x40359b
mov edi, dword [ebp - 0x5c]
test edi, edi
jne 0x40359b
mov ebx, dword [0x4094c8]
test ebx, ebx
je 0x40359b
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 0x403852
test dword [ebp - 0x60], 0x200
je 0x4037eb
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x4037f7
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 [0x4094c8]
mov dword [esp], eax
call fcn.004031f0
xor ecx, ecx
mov dword [0x4094c8], ecx
jmp 0x40359b
test al, 3
je 0x403672
mov dword [ebp - 0x5c], 1
jmp 0x403672
cmp ebx, 0xffffffff
je 0x403857
xor eax, eax
jmp 0x4036a7
or edx, 0x10
jmp 0x4037df
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x40359b
mov eax, dword [0x4094c8]
test eax, eax
mov dword [ebp - 0x54], eax
je 0x4036ac
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 0x4038b4
or edx, 0x10
test dword [ebp - 0x60], 0x200
je 0x4038c0
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x4038cc
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 [0x4094c8]
sub esp, 8
lea edx, [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004031f0
xor eax, eax
jmp 0x4036a7