Function at 0x40bd80
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x1c
mov eax, dword [0x41e3e0]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov dword [0x420c64], eax
mov dword [0x420c60], eax
mov eax, dword [0x4230a0]
push str.Loading_MOTOROLA_HEX_File
push ebp
push 0x401
push eax
mov dword [esp + 0x24], ebp
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [esp + 0x3c]
jmp 0x40bdbd
mov ebp, dword [esp + 0x18]
push 0x1b
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x40c003
call fcn.0040ba70
test eax, eax
jl 0x40c003
inc ebp
cmp eax, 0x53
je 0x40bde6
cmp eax, 0x73
jne 0x40bdce
mov byte [0x421880], al
mov esi, 0x421881
call fcn.0040ba70
test eax, eax
jl 0x40c003
inc ebp
cmp eax, 0xd
mov dword [esp + 0x18], ebp
je 0x40be11
cmp eax, 0xa
je 0x40be11
mov byte [esi], al
inc esi
jmp 0x40bdf0
mov ecx, dword [esp + 0x30]
mov dword [0x422fb8], ebp
push ecx
call fcn.00413220
mov al, byte [0x421881]
add esp, 4
xor edi, edi
cmp al, 0x39
je 0x40c003
cmp al, 0x38
je 0x40c003
cmp al, 0x37
je 0x40c003
cmp al, 0x31
je 0x40be53
cmp al, 0x32
je 0x40be53
cmp al, 0x33
jne 0x40bdbd
mov dl, byte [0x421882]
mov al, byte [0x421883]
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], dl
push ecx
mov byte [esp + 0x25], al
mov byte [esp + 0x26], 0
call fcn.00413350
mov dl, byte [0x421884]
mov cl, byte [0x421886]
mov si, ax
mov al, byte [0x421885]
mov byte [esp + 0x25], al
xor eax, eax
mov al, byte [0x421881]
mov byte [esp + 0x24], dl
mov dl, byte [0x421887]
add esp, 4
and esi, 0xffff
sub eax, 0x31
mov byte [esp + 0x22], cl
mov byte [esp + 0x23], dl
je 0x40bf12
dec eax
je 0x40beef
dec eax
jne 0x40bf1f
mov al, byte [0x421888]
mov cl, byte [0x421889]
mov dl, byte [0x42188a]
mov byte [esp + 0x24], al
mov al, byte [0x42188b]
sub esi, 5
mov byte [esp + 0x25], cl
mov byte [esp + 0x26], dl
mov byte [esp + 0x27], al
mov byte [esp + 0x28], 0
mov edi, 0xc
jmp 0x40bf1f
mov cl, byte [0x421888]
mov dl, byte [0x421889]
sub esi, 4
mov byte [esp + 0x24], cl
mov byte [esp + 0x25], dl
mov byte [esp + 0x26], 0
mov edi, 0xa
jmp 0x40bf1f
sub esi, 3
mov byte [esp + 0x24], 0
mov edi, 8
lea eax, [esp + 0x20]
push eax
call fcn.004133e0
add esp, 4
xor ecx, ecx
test esi, esi
mov dword [0x41fa40], ecx
jle 0x40bdbd
mov edx, dword [0x41f960]
mov ebp, eax
mov eax, dword [esp + 0x14]
lea edi, [edi + 0x421881]
add eax, esi
mov dword [esp + 0x14], eax
cmp ebp, dword [esp + 0x34]
jb 0x40bfd9
cmp ebp, dword [esp + 0x38]
ja 0x40bfd9
mov cl, byte [edi - 1]
mov dl, byte [edi]
lea eax, [esp + 0x10]
mov byte [esp + 0x10], cl
push eax
mov byte [esp + 0x15], dl
mov byte [esp + 0x16], 0
call fcn.00413350
mov ecx, dword [0x41fa40]
add esp, 4
and eax, 0xffff
test ecx, ecx
jne 0x40bf98
mov edx, ebp
mov dword [0x41f960], edx
jmp 0x40bf9e
mov edx, dword [0x41f960]
cmp dword [0x41f820], 0
jne 0x40bfcc
mov ebx, dword [0x422f50]
sub ebx, dword [esp + 0x34]
add ebx, edx
add ebx, ecx
mov ecx, ebx
mov ebx, dword [esp + 0x3c]
mov byte [ecx + ebx], al
mov ecx, dword [0x41fa40]
mov edx, dword [0x41f960]
jmp 0x40bfd2
mov byte [ecx + 0x421e40], al
inc ecx
mov dword [0x41fa40], ecx
add edi, 2
inc ebp
dec esi
jne 0x40bf54
test ecx, ecx
je 0x40bdb9
mov edi, dword [esp + 0x34]
push ecx
sub edx, edi
add edx, ebx
push edx
call fcn.004152f0
add esp, 8
jmp 0x40bdb9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c
ret