Function at 0x40bad0
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x20
mov eax, dword [0x41e3e0]
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [0x420c64], eax
mov dword [0x420c60], eax
mov eax, dword [0x4230a0]
push str.Loading_Intel_HEX_file
push edi
push 0x401
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [esp + 0x40]
jmp 0x40bb15
mov edi, dword [esp + 0x1c]
push 0x1b
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x40bd6c
call fcn.0040ba70
test eax, eax
jl 0x40bd6c
inc edi
cmp eax, 0x3a
jne 0x40bb26
mov byte [0x421880], al
mov esi, 0x421881
call fcn.0040ba70
test eax, eax
jl 0x40bd6c
inc edi
cmp eax, 0xd
mov dword [esp + 0x1c], edi
je 0x40bb64
cmp eax, 0xa
je 0x40bb64
mov byte [esi], al
inc esi
jmp 0x40bb43
mov ecx, dword [esp + 0x34]
mov dword [0x422fb8], edi
push ecx
call fcn.00413220
mov al, byte [0x421887]
add esp, 4
cmp al, 0x30
jne 0x40bb15
mov al, byte [0x421888]
cmp al, 0x31
je 0x40bd6c
cmp al, 0x32
jne 0x40bbd3
mov al, byte [0x42188a]
mov dl, byte [0x421889]
mov cl, byte [0x42188b]
mov byte [esp + 0x25], al
mov byte [esp + 0x24], dl
mov dl, byte [0x42188c]
lea eax, [esp + 0x24]
mov byte [esp + 0x26], cl
push eax
mov byte [esp + 0x2b], dl
mov byte [esp + 0x2c], 0
call fcn.004133e0
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x40bb15
cmp al, 0x34
jne 0x40bc19
mov dl, byte [0x42188a]
mov cl, byte [0x421889]
mov al, byte [0x42188b]
mov byte [esp + 0x25], dl
mov byte [esp + 0x24], cl
mov cl, byte [0x42188c]
lea edx, [esp + 0x24]
mov byte [esp + 0x26], al
push edx
mov byte [esp + 0x2b], cl
mov byte [esp + 0x2c], 0
call fcn.004133e0
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x40bb15
cmp al, 0x30
jne 0x40bb15
mov al, byte [0x421881]
mov cl, byte [0x421882]
lea edx, [esp + 0x24]
mov byte [esp + 0x24], al
push edx
mov byte [esp + 0x29], cl
mov byte [esp + 0x2a], 0
call fcn.00413350
mov cl, byte [0x421884]
mov dl, byte [0x421885]
mov si, ax
mov al, byte [0x421883]
mov byte [esp + 0x29], cl
mov byte [esp + 0x28], al
mov al, byte [0x421886]
lea ecx, [esp + 0x28]
push ecx
and esi, 0xffff
mov byte [esp + 0x2e], dl
mov byte [esp + 0x2f], al
mov byte [esp + 0x30], 0
call fcn.004133e0
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
shl edx, 0xc
add edx, ebp
add esp, 8
shl edx, 4
add eax, edx
xor ecx, ecx
test esi, esi
mov dword [0x41fa48], ecx
jle 0x40bb15
mov edx, dword [0x41f94c]
mov ebp, eax
mov eax, dword [esp + 0x18]
mov edi, 0x42188a
add eax, esi
mov dword [esp + 0x18], eax
cmp ebp, dword [esp + 0x38]
jb 0x40bd42
cmp ebp, dword [esp + 0x3c]
ja 0x40bd42
mov al, byte [edi - 1]
mov cl, byte [edi]
lea edx, [esp + 0x24]
mov byte [esp + 0x24], al
push edx
mov byte [esp + 0x29], cl
mov byte [esp + 0x2a], 0
call fcn.00413350
mov ecx, dword [0x41fa48]
add esp, 4
and eax, 0xffff
test ecx, ecx
jne 0x40bd01
mov edx, ebp
mov dword [0x41f94c], edx
jmp 0x40bd07
mov edx, dword [0x41f94c]
cmp dword [0x41f820], 0
jne 0x40bd35
mov ebx, dword [0x422f50]
sub ebx, dword [esp + 0x38]
add ebx, edx
add ebx, ecx
mov ecx, ebx
mov ebx, dword [esp + 0x40]
mov byte [ecx + ebx], al
mov ecx, dword [0x41fa48]
mov edx, dword [0x41f94c]
jmp 0x40bd3b
mov byte [ecx + 0x421e40], al
inc ecx
mov dword [0x41fa48], ecx
add edi, 2
inc ebp
dec esi
jne 0x40bcbd
test ecx, ecx
je 0x40bb11
mov edi, dword [esp + 0x38]
push ecx
sub edx, edi
add edx, ebx
push edx
call fcn.004152f0
add esp, 8
jmp 0x40bb11
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret