Function at 0x401940
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x482230]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x482e88], 0
mov eax, dword [0x482198]
mov dword [ebp - 0xc], eax
mov eax, dword [0x48219c]
mov dword [ebp - 0x14], 0x40
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], eax
jne 0x401ca5
lea eax, [ebp - 0xf4]
mov ecx, 0x485d68
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00415240
push 0
lea eax, [ebp - 0xe4]
mov ecx, 0x486b80
push eax
call fcn.0040d310
lea eax, [ebp - 0xec]
mov ecx, 0x485d90
push eax
lea eax, [ebp - 0xe8]
push eax
call fcn.0040d0e0
push 9
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x4019dc
mov eax, dword [0x48219c]
add eax, 0xfffffff8
mov dword [ebp - 0xec], eax
call fcn.00414d50
mov ecx, dword [ebp - 0xe8]
cmp ecx, 0x40
jl 0x401ca5
push esi
mov esi, dword [0x48219c]
push edi
mov edi, dword [ebp - 0xec]
test edi, edi
js 0x401b08
lea eax, [esi - 0xa0]
cmp edi, eax
jge 0x401b08
lea eax, [ecx - 0x40]
mov esi, 0x5f
cdq
push ebx
mov ebx, dword [0x4852a8]
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 0x401a85
mov eax, 0x10
cdq
idiv ebx
push edx
push eax
push esi
push ecx
mov ecx, 0x486b80
call fcn.0040dcd0
mov ecx, dword [ebp - 0xe8]
mov esi, dword [ebp - 0xec]
test eax, eax
jle 0x401a85
sub ecx, eax
mov dword [ebp - 0xe8], ecx
push esi
push ecx
mov ecx, 0x486b80
call fcn.0040d1a0
pop ebx
test eax, eax
jne 0x401ad7
call fcn.00414970
movsx eax, byte [0x2488660]
mov ecx, 0x486b80
push eax
push dword [ebp - 0xec]
push dword [ebp - 0xe8]
call fcn.0040dae0
test eax, eax
js 0x401ad7
movsx ecx, byte [0x2488660]
cmp eax, ecx
je 0x401ad7
push eax
push dword [0x485d5c]
call fcn.00409700
add esp, 8
mov ecx, 0x486b80
call fcn.0040bb60
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x485d5c]
call dword [sym.imp.USER32.dll_RedrawWindow]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041aab7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0x9c]
cmp edi, eax
jl 0x401bae
lea eax, [esi - 0x5a]
cmp edi, eax
jge 0x401bae
lea eax, [ecx - 0x40]
sub esi, edi
cdq
sub esi, 0x5c
idiv dword [0x4852a8]
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, 0x486b80
mov dword [ebp - 0xec], eax
call fcn.0040d230
test eax, eax
jne 0x401b69
call fcn.00414970
mov ecx, 0x486b80
call fcn.0040bb60
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x485d5c]
call dword [sym.imp.USER32.dll_RedrawWindow]
pop edi
mov dword [0x481010], 0xfffe7961
mov dword [0x481014], 0xfffe7961
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041aab7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0x53]
cmp edi, eax
jl 0x401c44
lea eax, [esi - 0x14]
cmp edi, eax
jge 0x401c44
lea eax, [ecx - 0x40]
sub esi, edi
cdq
mov ecx, 0x486b80
idiv dword [0x4852a8]
add eax, dword [ebp - 0xf0]
mov dword [ebp - 0xe8], eax
lea eax, [esi*4 - 0x50]
mov dword [ebp - 0xec], eax
call fcn.0040bb60
push 0x201
push 0
lea eax, [ebp - 0x14]
mov dword [0x481010], 0xfffe7961
push eax
push dword [0x485d5c]
mov dword [0x481014], 0xfffe7961
call dword [sym.imp.USER32.dll_RedrawWindow]
mov eax, dword [ebp - 0xe8]
mov dword [0x481008], eax
mov eax, dword [ebp - 0xec]
pop edi
mov dword [0x48100c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041aab7
mov esp, ebp
pop ebp
ret
lea eax, [esi - 0xd]
cmp edi, eax
jl 0x401ca3
lea eax, [esi - 2]
cmp edi, eax
jg 0x401ca3
mov ecx, 0x486b80
mov dword [0x4810dc], 0xffffff00
call fcn.0040bb60
push 0x201
push 0
lea eax, [ebp - 0x14]
push eax
push dword [0x485d5c]
call dword [sym.imp.USER32.dll_RedrawWindow]
push 0x470370
call fcn.004054f0
add esp, 4
mov dword [0x481010], 0xfffe7961
mov dword [0x481014], 0xfffe7961
call fcn.00405530
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041aab7
mov esp, ebp
pop ebp
ret