Function at 0x404110
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
lea esi, [ebp + 0x7c]
lea edi, [esp + 0xb8]
lea ebx, [esp + 0x10]
call fcn.00402550
mov eax, dword [esp + 0x10]
cmp eax, dword [ebp + 0x84]
je 0x404199
add eax, 0xc
lea esi, [esp + 0x14]
call fcn.00418a30
mov edi, dword [esp + 0x14]
test byte [edi + 0x10], 4
jne 0x404168
mov ebx, dword [esp + 0xb8]
push ebx
call dword [0x43924c]
test eax, eax
jne 0x4041ab
mov esi, dword [esp + 0x18]
test esi, esi
je 0x404199
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x404199
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x404199
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret 0xc
push ebx
call dword [0x4392fc]
mov ecx, dword [ebp + 0x74]
test eax, eax
sete al
mov byte [esp + 0x24], al
test al, al
jne 0x4041d1
cmp dword [ecx + 0xff14], 0
lea eax, [ecx + 0xff14]
jne 0x4041d7
lea eax, [ecx + 0xff0c]
lea esi, [esp + 0x28]
call fcn.00418a30
mov ebp, dword [esp + 0x28]
lea eax, [esp + 0x74]
push eax
push ebx
add ebp, 0x118
mov dword [esp + 0x7c], 0x3c
call dword [0x4392a8]
sub esp, 8
lea eax, [esp + 0x1c]
mov esi, esp
call fcn.00418a30
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x34]
push edx
mov eax, ebp
lea edx, [esp + 0x90]
mov ecx, ebx
call fcn.004026d0
test al, al
jne 0x4042a8
push 0
mov esi, edi
call fcn.0041c6f0
test byte [edi + 0x10], 2
je 0x404284
lea eax, [esp + 0x38]
push eax
push ebx
mov dword [esp + 0x40], 0x3c
call dword [0x4392a8]
mov ecx, dword [edi + 0x18]
mov esi, dword [0x439280]
and dword [edi + 0x10], 0xfffffffd
not ecx
and ecx, dword [esp + 0x5c]
push ecx
push 0xfffffffffffffff0
push ebx
call esi
mov edx, dword [edi + 0x1c]
not edx
and edx, dword [esp + 0x60]
push edx
push 0xffffffffffffffec
push ebx
call esi
lea eax, [esp + 0x28]
call fcn.00402510
lea eax, [esp + 0x14]
call fcn.00402510
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret 0xc
mov esi, dword [esp + 0xb4]
mov ecx, dword [esp + 0xbc]
mov edi, dword [esi + 0x74]
mov esi, dword [edi + 0xff04]
mov eax, ecx
shr ecx, 0x10
xor dl, dl
and eax, 0xffff
cmp ecx, esi
jge 0x4042d7
mov dl, 1
mov dword [esp + 0x10], esi
jmp 0x4042db
mov esi, dword [esp + 0x10]
mov edi, dword [edi + 0xff08]
cmp eax, edi
jl 0x4042ed
test dl, dl
je 0x404306
mov edi, dword [esp + 0x20]
push 0x216
push edi
push esi
push 0
push 0
push 0
push ebx
call dword [0x43930c]
jmp 0x4043a7
push 0x17
call dword [0x439310]
neg eax
sbb eax, eax
neg eax
inc eax
push eax
call dword [0x439290]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
push ecx
push edx
push esi
push edi
test ax, ax
setne al
push ebp
sub esp, 8
mov byte [esp + 0x50], al
lea eax, [esp + 0x30]
mov esi, esp
call fcn.00418a30
push ebx
mov ebx, dword [esp + 0x3c]
mov eax, ebx
call fcn.0041a170
mov eax, dword [esp + 0xb4]
mov ecx, dword [eax + 0x74]
sub esp, 8
lea eax, [esp + 0x1c]
mov esi, esp
mov dword [esp + 0x24], ecx
call fcn.00418a30
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
sub edi, dword [ebp + 4]
sub ebx, dword [ebp + 0x10]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
push edi
push ebx
lea eax, [esp + 0x94]
push eax
mov eax, dword [esp + 0x40]
call fcn.0041a2f0
call dword [0x4391a8]
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x34], eax
lea eax, [esp + 0x28]
call fcn.00402510
lea eax, [esp + 0x14]
call fcn.00402510
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret 0xc