Function at 0x40c530
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
or eax, 0xffffffff
push edi
mov edi, ecx
mov dword [edi + 0x40], eax
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x5c]
xor ebx, ebx
test eax, eax
jle 0x40c5d2
test ebx, ebx
jl 0x40c842
cmp ebx, dword [edi + 0x5c]
jge 0x40c842
mov eax, dword [edi + 0x58]
mov eax, dword [eax + ebx*4]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [edi + 0x24]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
call fcn.0049ba90
fld dword [esp + 0x2c]
fadd dword [edi + 8]
add esp, 0x14
call fcn.004eaa58
fld dword [esp + 0x14]
fadd dword [edi + 0xc]
mov esi, dword [esp + 0x24]
sub esi, eax
call fcn.004eaa58
mov ecx, ebp
sub ecx, eax
mov edx, ecx
mov eax, esi
imul edx, ecx
imul eax, esi
add edx, eax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsqrt
call fcn.004eaa58
cmp eax, 5
jl 0x40c631
mov eax, dword [edi + 0x5c]
inc ebx
cmp ebx, eax
jl 0x40c553
push 0x12
call dword [sym.imp.user32.dll_GetKeyState]
fld dword [edi + 8]
movsx ebx, ax
mov dword [esp + 0x18], ebx
call fcn.004eaa58
mov esi, dword [esp + 0x24]
fld dword [edi + 0xc]
sub esi, eax
call fcn.004eaa58
mov ecx, ebp
sub ecx, eax
mov edx, ecx
mov eax, esi
imul edx, ecx
imul eax, esi
add edx, eax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fsqrt
call fcn.004eaa58
cmp eax, 5
jge 0x40c643
xor eax, eax
test ebx, ebx
setge al
pop edi
pop esi
pop ebp
pop ebx
dec eax
and eax, 5
inc eax
add esp, 0x10
ret 8
mov dword [edi + 0x28], ebx
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x10
ret 8
mov ecx, dword [edi + 0x70]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x10], eax
jg 0x40c660
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esp + 0x10]
mov edi, edi
test eax, eax
jl 0x40c842
cmp eax, dword [edi + 0x70]
jge 0x40c842
mov ecx, dword [edi + 0x6c]
mov esi, dword [ecx + eax*4]
mov edx, dword [edi + 4]
mov eax, dword [esi + 4]
cmp eax, dword [edx + 0x5b4]
mov dword [esp + 0x14], 0
jne 0x40c695
mov dword [esp + 0x14], 1
fld dword [0x54fb38]
fld dword [esi + 0x10]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40c6b9
fld dword [0x54fb38]
fld dword [esi + 0x14]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40c704
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x40c704
fld dword [esi + 8]
fadd dword [esi + 0x10]
call fcn.004eaa58
fld dword [esi + 0x14]
fadd dword [esi + 0xc]
mov ebx, dword [esp + 0x24]
sub ebx, eax
call fcn.004eaa58
mov ecx, ebp
sub ecx, eax
mov edx, ecx
mov eax, ebx
imul edx, ecx
imul eax, ebx
add edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fsqrt
call fcn.004eaa58
cmp eax, 5
jl 0x40c7cd
fld dword [0x54fb38]
fld dword [esi + 0x18]
fucompp
fnstsw ax
test ah, 0x44
jp 0x40c728
fld dword [0x54fb38]
fld dword [esi + 0x1c]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40c773
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x40c773
fld dword [esi + 8]
fadd dword [esi + 0x18]
call fcn.004eaa58
fld dword [esi + 0x1c]
fadd dword [esi + 0xc]
mov ebx, dword [esp + 0x24]
sub ebx, eax
call fcn.004eaa58
mov ecx, ebp
sub ecx, eax
mov edx, ecx
mov eax, ebx
imul edx, ecx
imul eax, ebx
add edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fsqrt
call fcn.004eaa58
cmp eax, 4
jl 0x40c7f8
fld dword [esi + 8]
call fcn.004eaa58
fld dword [esi + 0xc]
mov ebx, dword [esp + 0x24]
sub ebx, eax
call fcn.004eaa58
mov ecx, ebp
sub ecx, eax
mov edx, ecx
mov eax, ebx
imul edx, ecx
imul eax, ebx
add edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fsqrt
call fcn.004eaa58
cmp eax, 4
mov eax, dword [esp + 0x10]
jl 0x40c823
mov ecx, dword [edi + 0x70]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40c65a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40c7dc
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x40], ecx
mov edi, dword [esp + 0x18]
xor eax, eax
test edi, edi
setge al
pop edi
pop esi
pop ebp
pop ebx
dec eax
and eax, 3
add eax, 4
add esp, 0x10
ret 8
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40c807
mov edx, dword [esp + 0x10]
mov dword [edi + 0x40], edx
mov edi, dword [esp + 0x18]
xor eax, eax
test edi, edi
setge al
pop edi
pop esi
pop ebp
pop ebx
dec eax
and eax, 3
add eax, 5
add esp, 0x10
ret 8
mov dword [edi + 0x40], eax
mov edi, dword [esp + 0x18]
xor eax, eax
test edi, edi
setge al
pop edi
pop esi
pop ebp
pop ebx
dec eax
and eax, 0xfffffffd
add eax, 9
add esp, 0x10
ret 8
call fcn.004fd76e
int3