Function at 0x401940
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x480230]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x480e88], 0
mov eax, dword [0x480198]
mov dword [ebp - 0xc], eax
mov eax, dword [0x48019c]
mov dword [ebp - 0x14], 0x40
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], eax
jne 0x401ca3
lea eax, [ebp - 0xf4]
mov ecx, 0x483ab0
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00413b30
lea eax, [ebp - 0xe4]
mov ecx, 0x4848c8
push eax
call fcn.0040cea0
lea eax, [ebp - 0xec]
mov ecx, 0x483ad8
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.0040cc70
push 9
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x4019da
mov eax, dword [0x48019c]
add eax, 0xfffffff8
mov dword [ebp - 0xec], eax
call fcn.00413640
mov ecx, dword [ebp - 0xe8]
cmp ecx, 0x40
jl 0x401ca3
push esi
mov esi, dword [0x48019c]
push edi
mov edi, dword [ebp - 0xec]
test edi, edi
js 0x401b06
lea eax, [esi - 0xa0]
cmp edi, eax
jge 0x401b06
lea eax, [ecx - 0x40]
mov esi, 0x5f
cdq
push ebx
mov ebx, dword [0x482ff0]
idiv ebx
mov ecx, eax
mov eax, 0x2aaaaaab
add ecx, dword [ebp - 0xf0]
imul edi
mov dword [ebp - 0xe8], ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
sub esi, eax
sub esi, dword [ebp - 0xf4]
mov dword [ebp - 0xec], esi
cmp ebx, 0x10
je 0x401a83
mov eax, 0x10
cdq
idiv ebx
push edx
push eax
push esi
push ecx
mov ecx, 0x4848c8
call fcn.0040d760
mov ecx, dword [ebp - 0xe8]
mov esi, dword [ebp - 0xec]
test eax, eax
jle 0x401a83
sub ecx, eax
mov dword [ebp - 0xe8], ecx
push esi
push ecx
mov ecx, 0x4848c8
call fcn.0040cd30
pop ebx
test eax, eax
jne 0x401ad5
call fcn.00413260
movsx eax, byte [0x24863a8]
mov ecx, 0x4848c8
push eax
push dword [ebp - 0xec]
push dword [ebp - 0xe8]
call fcn.0040d570
test eax, eax
js 0x401ad5
movsx ecx, byte [0x24863a8]
cmp eax, ecx
je 0x401ad5
push eax
push dword [0x483aa4]
call fcn.00409300
add esp, 8
mov ecx, 0x4848c8
call fcn.0040b6f0
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x483aa4]
call dword [sym.imp.USER32.dll_RedrawWindow]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0x9c]
cmp edi, eax
jl 0x401bac
lea eax, [esi - 0x5a]
cmp edi, eax
jge 0x401bac
lea eax, [ecx - 0x40]
sub esi, edi
cdq
sub esi, 0x5c
idiv dword [0x482ff0]
mov ecx, eax
mov eax, 0x66666667
add ecx, dword [ebp - 0xf0]
imul esi
mov dword [ebp - 0xe8], ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push ecx
mov ecx, 0x4848c8
mov dword [ebp - 0xec], eax
call fcn.0040cdc0
test eax, eax
jne 0x401b67
call fcn.00413260
mov ecx, 0x4848c8
call fcn.0040b6f0
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x483aa4]
call dword [sym.imp.USER32.dll_RedrawWindow]
pop edi
mov dword [0x47f010], 0xfffe7961
mov dword [0x47f014], 0xfffe7961
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0x53]
cmp edi, eax
jl 0x401c42
lea eax, [esi - 0x14]
cmp edi, eax
jge 0x401c42
lea eax, [ecx - 0x40]
sub esi, edi
cdq
mov ecx, 0x4848c8
idiv dword [0x482ff0]
add eax, dword [ebp - 0xf0]
mov dword [ebp - 0xe8], eax
lea eax, [esi*4 - 0x50]
mov dword [ebp - 0xec], eax
call fcn.0040b6f0
push 0x201
push 0
lea eax, [ebp - 0x14]
mov dword [0x47f010], 0xfffe7961
push eax
push dword [0x483aa4]
mov dword [0x47f014], 0xfffe7961
call dword [sym.imp.USER32.dll_RedrawWindow]
mov eax, dword [ebp - 0xe8]
mov dword [0x47f008], eax
mov eax, dword [ebp - 0xec]
pop edi
mov dword [0x47f00c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0xd]
cmp edi, eax
jl 0x401ca1
lea eax, [esi - 2]
cmp edi, eax
jg 0x401ca1
mov ecx, 0x4848c8
mov dword [0x47f0dc], 0xffffff00
call fcn.0040b6f0
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x483aa4]
call dword [sym.imp.USER32.dll_RedrawWindow]
push 0x46e370
call fcn.00405490
add esp, 4
mov dword [0x47f010], 0xfffe7961
mov dword [0x47f014], 0xfffe7961
call fcn.004054d0
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret