Function at 0x408649
Capabilities:
Log keystrokes via polling

Disassembly:
push 0xffffffffffffffff
push 0x4e3a40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x70]
mov ecx, dword [eax + 0xf0]
xor ebp, ebp
cmp ecx, ebp
mov dword [esp + 0x14], esi
jg 0x408919
push ebx
push edi
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x3c], ebp
call fcn.004c36f4
lea eax, [esp + 0x20]
push eax
mov ecx, esi
mov byte [esp + 0x40], 1
call fcn.00407370
mov ebx, eax
cmp ebx, ebp
jg 0x4086b2
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 0
call fcn.004c3746
lea eax, [edi - 0x10]
jmp 0x4088f8
mov eax, dword [0x517e3c]
inc eax
mov dword [0x517e3c], eax
push 0x10
mov byte [esp + 0x40], 2
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, ah
jns 0x4086d3
mov ebp, 0x10
mov eax, dword [esi + 0x60]
movzx eax, word [eax]
and eax, 0xffdf
cmp ax, 0x41
jb 0x40877c
cmp ax, 0x5a
ja 0x40877c
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
xor esi, esi
test eax, eax
mov byte [esp + 0x3c], 3
mov edi, eax
jle 0x408758
jmp 0x408720
mov eax, dword [esp + 0x28]
lea esp, [esp]
test esi, esi
jl 0x40892a
cmp esi, eax
jge 0x40892a
mov eax, dword [esp + 0x24]
mov eax, dword [eax + esi*4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402300
push 0x4ec420
lea ecx, [esp + 0x18]
call fcn.00403bc0
inc esi
cmp esi, edi
jl 0x408718
or ebp, 0x200
push ebp
push 3
lea ecx, [esp + 0x1c]
push 0
push ecx
call fcn.00409420
mov eax, dword [esp + 0x24]
add esp, 0x10
add eax, 0xfffffff0
jmp 0x4088a2
test ebp, ebp
jne 0x408814
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [0x518334]
push ebx
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0x48], 4
call fcn.004023c0
mov edx, dword [0x51833c]
mov eax, dword [esp + 0x20]
add esp, 0xc
push 4
push edx
push eax
mov ecx, esi
call fcn.004c5399
cmp eax, 6
lea ecx, [esp + 0x14]
je 0x40880a
call fcn.00401320
mov ecx, dword [0x517e3c]
dec ecx
mov dword [0x517e3c], ecx
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 0
call fcn.004c3746
lea ecx, [esp + 0x18]
call fcn.00401320
pop edi
pop ebx
pop esi
pop ebp
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
mov byte [esp + 0x3c], 2
call fcn.00401320
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov byte [esp + 0x3c], 5
call fcn.004ddbe9
mov edi, dword [eax + 8]
xor esi, esi
test ebx, ebx
jle 0x40889f
lea ebx, [ebx]
test esi, esi
jl 0x40892a
cmp esi, dword [esp + 0x28]
jge 0x40892a
mov eax, dword [esp + 0x24]
mov eax, dword [eax + esi*4]
push eax
push edi
call fcn.0040a070
add esp, 8
test eax, eax
jne 0x40889a
cmp esi, dword [esp + 0x28]
jge 0x40892a
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + esi*4]
mov eax, dword [0x51831c]
push edx
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.004023c0
mov ebp, dword [esp + 0x20]
add esp, 0xc
push 0
push 0
push ebp
call fcn.004d7335
inc esi
cmp esi, ebx
jl 0x408840
lea eax, [ebp - 0x10]
mov byte [esp + 0x3c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4088be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 0x1c]
push 0
mov ecx, esi
call fcn.00406fe0
mov ecx, dword [esi + 0x6c]
push 0xffffffffffffffff
add ecx, 0x5c
call fcn.00404f80
mov eax, dword [0x517e3c]
dec eax
lea ecx, [esp + 0x20]
mov dword [0x517e3c], eax
mov byte [esp + 0x3c], 0
call fcn.004c3746
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408917
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop ebx
mov ecx, dword [esp + 0x2c]
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x30
ret
jmp fcn.004c22a0