Function at 0x401060
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x480230]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x480e88], 0
mov ecx, dword [0x480198]
mov eax, dword [0x48019c]
mov dword [ebp - 0x14], 0x40
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
jne 0x401708
push esi
lea eax, [ebp - 0x104]
mov ecx, 0x483ab0
push eax
lea eax, [ebp - 0x100]
push eax
call fcn.00413b30
lea eax, [ebp - 0xf4]
mov ecx, 0x4848c8
push eax
call fcn.0040cea0
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x12
mov dword [0x47f018], 0xfffe7961
mov dword [0x47f008], 0xfffe7961
mov dword [0x47f01c], 0xfffe7961
call esi
test ax, ax
jns 0x401111
mov ecx, 1
jmp 0x401122
push 0x5d
call esi
xor ecx, ecx
mov edx, 2
test ax, ax
cmovs ecx, edx
push edi
push 9
mov dword [0x480c3c], ecx
call esi
xor ecx, ecx
test ax, ax
lea eax, [ebp - 0xf8]
sets cl
push eax
lea eax, [ebp - 0xfc]
mov dword [0x47f020], ecx
push eax
mov ecx, 0x483ad8
call fcn.0040cc70
cmp dword [0x47f020], 1
mov edi, dword [0x48019c]
mov esi, dword [ebp - 0xf8]
jne 0x401178
lea eax, [edi - 0x10]
cmp esi, eax
jge 0x401178
lea esi, [edi - 8]
mov dword [ebp - 0xf8], esi
mov ecx, dword [ebp - 0xfc]
push ebx
cmp ecx, 0x40
jge 0x4012ea
test ecx, ecx
js 0x401705
mov ebx, dword [sym.imp.USER32.dll_RedrawWindow]
test esi, esi
js 0x401202
lea eax, [edi - 0xa0]
cmp esi, eax
jge 0x401202
mov eax, 0x2aaaaaab
imul esi
mov al, 0x5f
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub al, cl
mov cl, al
sub cl, byte [ebp - 0x104]
movzx eax, cl
push ecx
mov ecx, 0x4848c8
mov dword [0x47f01c], eax
call fcn.0040e4e0
mov ecx, 0x4848c8
call fcn.0040b6f0
push 0x201
push 0
lea eax, [ebp - 0x24]
push eax
push dword [0x483aa4]
call ebx
mov esi, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xfc]
mov edi, dword [0x48019c]
test ecx, ecx
js 0x401705
lea edx, [edi - 0x10]
cmp esi, edx
jl 0x40123a
cmp esi, edi
jge 0x40123a
push 0xffffffffffffffff
call fcn.00412580
add esp, 4
mov ecx, 0x4848c8
call fcn.0040b6f0
mov ecx, dword [0x48019c]
mov dword [ebp - 8], ecx
lea eax, [ecx - 0x10]
mov dword [ebp - 0x10], eax
jmp 0x4012b8
lea eax, [edi - 0xa0]
cmp esi, eax
jl 0x401279
lea eax, [edi - 0x58]
cmp esi, eax
jge 0x401279
mov eax, 1
mov ecx, 0x4848c8
sub eax, dword [0x4825bc]
mov dword [0x4825bc], eax
call fcn.0040b6f0
mov ecx, dword [0x48019c]
lea eax, [ecx - 0xa0]
mov dword [ebp - 0x10], eax
lea eax, [ecx - 0x58]
jmp 0x4012b5
lea eax, [edi - 0x58]
cmp esi, eax
jl 0x401705
cmp esi, edx
jge 0x401705
mov eax, 1
mov ecx, 0x4848c8
sub eax, dword [0x4825c0]
mov dword [0x4825c0], eax
call fcn.0040b6f0
mov ecx, dword [0x48019c]
lea eax, [ecx - 0x58]
mov dword [ebp - 0x10], eax
lea eax, [ecx - 0x10]
mov dword [ebp - 8], eax
push 0x201
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push dword [0x483aa4]
mov dword [ebp - 0xc], 0x40
call ebx
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret
test esi, esi
js 0x40140a
lea eax, [edi - 0xa0]
cmp esi, eax
jge 0x40140a
lea eax, [ecx - 0x40]
mov ecx, 0x5f
cdq
idiv dword [0x482ff0]
add eax, dword [ebp - 0x100]
mov dword [ebp - 0xfc], eax
mov eax, 0x2aaaaaab
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
sub ecx, eax
sub ecx, dword [ebp - 0x104]
mov dword [ebp - 0xf8], ecx
js 0x401705
call fcn.00413640
cmp dword [0x480c38], 0
mov ecx, dword [ebp - 0xfc]
je 0x401367
mov eax, dword [0x47f018]
cmp byte [0x24863a8], 8
cmovl eax, ecx
mov dword [0x47f018], eax
mov esi, dword [0x482ff0]
cmp esi, 0x10
je 0x4013a6
mov eax, 0x10
cdq
idiv esi
push edx
push eax
push dword [ebp - 0xf8]
push ecx
mov ecx, 0x4848c8
call fcn.0040d760
mov ecx, dword [ebp - 0xfc]
mov dword [0x480c40], eax
test eax, eax
jle 0x4013b0
sub ecx, eax
mov dword [ebp - 0xfc], ecx
jmp 0x4013b0
mov dword [0x480c40], 0
push dword [0x480c38]
push dword [ebp - 0xf8]
push ecx
mov ecx, 0x4848c8
call fcn.0040da30
test eax, eax
jne 0x4013d0
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]
mov dword [0x47f010], 0xfffe7961
mov dword [0x47f014], 0xfffe7961
jmp 0x4016ed
lea eax, [edi - 0x9c]
cmp esi, eax
jl 0x4014bd
lea eax, [edi - 0x5a]
cmp esi, eax
jge 0x4014bd
lea eax, [ecx - 0x40]
sub edi, esi
cdq
sub edi, 0x5c
idiv dword [0x482ff0]
mov ecx, dword [ebp - 0x100]
add ecx, eax
mov eax, 0x66666667
imul edi
mov dword [ebp - 0xfc], ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xf8], eax
cmp ecx, dword [section..data]
jne 0x401466
cmp eax, dword [0x47f004]
je 0x401477
call fcn.00413640
mov eax, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xfc]
push eax
push ecx
mov ecx, 0x4848c8
call fcn.0040df30
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]
mov dword [0x47f010], 0xfffe7961
mov dword [0x47f014], 0xfffe7961
jmp 0x4016ed
lea eax, [edi - 0x53]
cmp esi, eax
jl 0x401577
lea eax, [edi - 0x14]
cmp esi, eax
jge 0x401577
lea eax, [ecx - 0x40]
sub edi, esi
cdq
idiv dword [0x482ff0]
lea edi, [edi*4 - 0x50]
add eax, dword [ebp - 0x100]
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0xf8], edi
cmp eax, dword [section..data]
jne 0x401508
cmp edi, dword [0x47f004]
je 0x401519
call fcn.00413640
mov edi, dword [ebp - 0xf8]
mov eax, dword [ebp - 0xfc]
push edi
push eax
mov ecx, 0x4848c8
call fcn.0040e3b0
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]
mov ecx, dword [ebp - 0xfc]
mov esi, dword [ebp - 0xf8]
mov dword [0x47f008], ecx
mov dword [0x47f00c], esi
mov dword [0x47f010], 0xfffe7961
mov dword [0x47f014], 0xfffe7961
jmp 0x4016f9
lea eax, [edi - 0xd]
cmp esi, eax
jl 0x4016f9
lea eax, [edi - 2]
cmp esi, eax
jg 0x4016f9
mov ebx, dword [ebp + 8]
test bl, 4
je 0x40163c
cmp dword [0x47f0dc], 0
jl 0x40163c
lea eax, [ecx - 0x40]
cdq
idiv dword [0x482ff0]
add eax, dword [ebp - 0x100]
cmp eax, dword [0x480c50]
jle 0x4015fd
cmp dword [0x480c6c], 0
jne 0x4015ea
mov ecx, dword [0x480c3c]
cmp ecx, 1
je 0x4015ea
cmp ecx, 2
jne 0x4015e0
push eax
call fcn.00412e30
add esp, 4
mov dword [0x480c54], eax
jmp 0x4016c7
push eax
call fcn.00412de0
add esp, 4
mov dword [0x480c54], eax
jmp 0x4016c7
cmp dword [0x480c6c], 0
jne 0x401629
mov ecx, dword [0x480c3c]
cmp ecx, 1
je 0x401629
cmp ecx, 2
jne 0x401632
push eax
call fcn.00412ee0
add esp, 4
mov dword [0x480c50], eax
jmp 0x4016c7
push eax
call fcn.00412e90
add esp, 4
mov dword [0x480c50], eax
jmp 0x4016c7
lea eax, [ecx - 0x40]
mov dword [0x47f010], ecx
cdq
idiv dword [0x482ff0]
add eax, dword [ebp - 0x100]
cmp dword [0x480c6c], 0
mov dword [0x47f014], eax
jne 0x40168f
mov ecx, dword [0x480c3c]
cmp ecx, 1
je 0x40168f
cmp ecx, 2
jne 0x401688
push eax
call fcn.00412ee0
push dword [0x47f014]
mov dword [0x480c50], eax
call fcn.00412e30
jmp 0x4016a5
mov dword [0x480c50], eax
jmp 0x4016a8
push eax
call fcn.00412e90
push dword [0x47f014]
mov dword [0x480c50], eax
call fcn.00412de0
add esp, 8
mov dword [0x480c54], eax
movsx eax, byte [0x24863a8]
mov dword [0x47f0dc], eax
movzx eax, bl
shr eax, 3
and eax, 1
mov dword [0x480c64], eax
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]
call fcn.004054d0
mov esi, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xfc]
mov dword [section..data], ecx
mov dword [0x47f004], esi
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004192c7
mov esp, ebp
pop ebp
ret