Function at 0x403660
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 [0x408e20]
mov dword [ebp - 0x50], 0
test eax, eax
je 0x4037cb
lea esi, [ebp - 0x4c]
jmp 0x403696
cmp eax, 2
je 0x403800
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4037c0
mov dword [esp], 1
mov edi, 1
call fcn.00403c40
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 0x4036cc
mov dword [ebp - 0x4c], 0
mov ebx, dword [ebp - 0x4c]
test ebx, ebx
je 0x4037c0
mov dword [esp], 1
lea edi, [ebp - 0x38]
call fcn.00403c40
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 0x403682
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x403822
cmp word [ebp - 0x30], 0
je 0x40368b
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.00403430
mov dword [ebp - 0x5c], 0
mov ebx, eax
mov eax, dword [ebp - 0x28]
test al, 0x1c
je 0x403922
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 0x403936
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40379c
mov eax, dword [0x408e30]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x408e30], eax
cmp ebx, 0xffffffff
je 0x40368b
mov dword [esp], ebx
lea edi, [ebp - 0x34]
mov dword [esp + 4], edi
call fcn.004032e0
mov eax, dword [ebp - 0x4c]
test eax, eax
jne 0x403696
nop
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x403400
mov eax, 1
mov dword [0x408e20], eax
call fcn.00401280
mov dword [esp], 0x403380
mov eax, 1
mov dword [esp + 4], eax
call sub.KERNEL32.DLL_SetConsoleCtrlHandler
sub esp, 8
jmp 0x40367d
mov edx, dword [0x40ffe0]
test edx, edx
je 0x40368b
lea eax, [ebp - 0x34]
mov dword [esp], eax
call edx
mov dword [ebp - 0x50], 1
jmp 0x40368b
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x28]
test al, 0x1c
jne 0x403840
test al, 3
je 0x403840
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 0x40387f
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40368b
mov eax, dword [0x408e30]
movzx edx, cx
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x60]
mov dword [0x408e30], eax
jmp 0x40368b
mov edi, dword [ebp - 0x5c]
test edi, edi
jne 0x40368b
mov ebx, dword [0x408e30]
test ebx, ebx
je 0x40368b
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 0x403942
test dword [ebp - 0x60], 0x200
je 0x4038db
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x4038e7
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 [0x408e30]
mov dword [esp], eax
call fcn.004032e0
xor ecx, ecx
mov dword [0x408e30], ecx
jmp 0x40368b
test al, 3
je 0x403762
mov dword [ebp - 0x5c], 1
jmp 0x403762
cmp ebx, 0xffffffff
je 0x403947
xor eax, eax
jmp 0x403797
or edx, 0x10
jmp 0x4038cf
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x40368b
mov eax, dword [0x408e30]
test eax, eax
mov dword [ebp - 0x54], eax
je 0x40379c
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 0x4039a4
or edx, 0x10
test dword [ebp - 0x60], 0x200
je 0x4039b0
or edx, 8
test dword [ebp - 0x60], 0x400
je 0x4039bc
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 [0x408e30]
sub esp, 8
lea edx, [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004032e0
xor eax, eax
jmp 0x403797