Function at 0x40a890
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x128], 0
je 0x40a8f0
push dword [esi + 0x20]
mov ebx, dword [sym.imp.USER32.dll_GetParent]
call ebx
push eax
call fcn.004715a4
test eax, eax
je 0x40a8f0
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call fcn.004715a4
cmp eax, esi
jne 0x40a8f0
push dword [esi + 0x20]
mov edi, dword [esi + 0x128]
call ebx
push eax
call fcn.004715a4
push dword [ebp + 8]
push edi
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x40ab9a
mov ebx, dword [ebp + 8]
cmp dword [ebx + 4], 0x100
jne 0x40abab
cmp dword [ebx + 8], 9
jne 0x40ab53
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x11
call edi
mov ecx, 0xffffff00
and ax, cx
cmp ax, cx
je 0x40ab53
cmp byte [esi + 0x138], 0
je 0x40ab53
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x1004
push dword [esi + 0x20]
call ebx
mov ecx, esi
mov dword [ebp - 8], eax
call fcn.00477e22
test eax, eax
je 0x40a966
push 0
push 0
push 0x1200
push dword [eax + 0x20]
call ebx
mov ebx, eax
jmp 0x40a9aa
xorps xmm0, xmm0
mov dword [ebp - 0x38], 2
xor ebx, ebx
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x14], xmm0
nop dword [eax + eax]
lea ecx, [ebp - 0x38]
mov eax, ebx
push ecx
push eax
push 0x105f
push dword [esi + 0x20]
inc ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jne 0x40a990
mov eax, dword [esi + 0xc8]
test eax, eax
je 0x40a9e5
mov eax, dword [eax + 8]
test eax, eax
je 0x40a9e5
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x20]
cmp eax, dword [ecx]
jne 0x40a9e5
push dword [ecx + 0xc]
push dword [ecx + 8]
push dword [ecx + 4]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x10
call edi
sar ax, 8
mov word [ebp - 2], ax
cmp ax, 0xffff
mov eax, dword [ebp - 8]
je 0x40aa2f
test eax, eax
jne 0x40aa31
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x168]
test eax, eax
je 0x40aba8
push 0
push 0
push 0x1004
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 8], eax
mov dword [esi + 0xe8], 0
test eax, eax
jle 0x40aba8
test ebx, ebx
jle 0x40aba8
nop
mov edx, dword [esi + 0xe4]
lea edi, [esi + 0xe8]
test edx, edx
js 0x40aab4
mov ecx, dword [edi]
test ecx, ecx
js 0x40aab4
cmp edx, eax
jge 0x40aa97
cmp ecx, ebx
jge 0x40aa97
mov eax, dword [ebp - 8]
xor ecx, ecx
cmp word [ebp - 2], 0xffff
setne cl
lea ecx, [ecx*2 - 1]
mov dword [ebp - 0xc], ecx
add ecx, dword [edi]
mov dword [edi], ecx
js 0x40aa7f
cmp ecx, ebx
jl 0x40aad7
add edx, dword [ebp - 0xc]
lea ecx, [ebx - 1]
cmp word [ebp - 2], 0xffff
mov dword [ebp - 0xc], 0
cmovne ecx, dword [ebp - 0xc]
jmp 0x40aacf
xor ecx, ecx
mov dword [ebp - 0xc], 0
cmp word [ebp - 2], 0xffff
lea edx, [eax - 1]
cmovne edx, ecx
lea ecx, [ebx - 1]
cmovne ecx, dword [ebp - 0xc]
jmp 0x40aacf
xor ecx, ecx
mov dword [ebp - 0xc], 0
cmp word [ebp - 2], 0xffff
lea edx, [eax - 1]
cmovne edx, ecx
lea ecx, [ebx - 1]
cmovne ecx, dword [ebp - 0xc]
mov dword [esi + 0xe4], edx
mov dword [edi], ecx
cmp dword [esi + 0x118], 0
je 0x40ab28
dec eax
cmp edx, eax
jne 0x40aae9
cmp ecx, ebx
jge 0x40aaf0
mov eax, dword [ebp - 8]
cmp edx, eax
jl 0x40ab28
push 1
mov ecx, esi
call fcn.0040a570
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x168]
test eax, eax
je 0x40ab9a
push 0
push 0
push 0x1004
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 8], eax
xor ecx, ecx
mov dword [edi], 0
mov edx, dword [esi + 0xe4]
test edx, edx
js 0x40aba8
cmp edx, eax
jge 0x40aba8
test ecx, ecx
js 0x40aba8
cmp ecx, ebx
jge 0x40aba8
push ecx
push edx
mov ecx, esi
call fcn.0040a040
test eax, eax
jne 0x40ab9a
mov eax, dword [ebp - 8]
jmp 0x40aa40
cmp dword [ebx + 8], 0x2e
jne 0x40abab
cmp dword [esi + 0x108], 0
je 0x40abab
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 2
push 0xffffffffffffffff
push 0x100c
push dword [esi + 0x20]
call edi
test eax, eax
js 0x40ab9a
nop word [eax + eax]
push eax
mov ecx, esi
call fcn.00409950
push 2
push 0xffffffffffffffff
push 0x100c
push dword [esi + 0x20]
call edi
test eax, eax
jns 0x40ab80
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebp + 8]
push ebx
mov ecx, esi
call fcn.004734f7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4