Function at 0x40c440
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d93a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x154
push esi
mov dword [ebp - 0x10], ecx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
cmp dword [0x52fda0], esi
je 0x40c73b
push edi
mov dword [0x52fda0], esi
mov dword [ebp - 0x1c], 0
cmp esi, dword [0x52fe14]
je 0x40c49d
mov eax, dword [0x5306c8]
test eax, eax
je 0x40c499
cmp esi, eax
je 0x40c49d
xor edi, edi
jmp 0x40c4a2
mov edi, 1
push 1
call dword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
and ax, cx
mov edx, ecx
xor ecx, ecx
cmp ax, dx
sete cl
mov dword [ebp - 0x14], ecx
test edi, edi
jne 0x40c72d
test esi, esi
je 0x40c73a
lea edx, [ebp - 0x1c]
push edx
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push 0x2c
lea eax, [ebp - 0x5c]
push edi
push eax
mov dword [ebp - 0x60], 0x30
call fcn.004c9b50
add esp, 0xc
lea ecx, [ebp - 0x60]
push ecx
push edi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
mov edx, dword [0x52fe30]
cmp byte [edx + 0x1236], 0
je 0x40c73a
mov edi, dword [ebp - 0x10]
mov eax, dword [edi + 0x47ec]
test eax, eax
je 0x40c73a
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [edi + 0x47f0]
jne 0x40c73a
cmp esi, eax
je 0x40c5d3
push 0x7f
lea edx, [ebp - 0x160]
push edx
push esi
call dword [sym.imp.USER32.dll_GetClassNameW]
test eax, eax
jne 0x40c551
mov word [ebp - 0x160], ax
mov edx, str.WorkerW
lea ecx, [ebp - 0x160]
lea esp, [esp]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x40c586
test ax, ax
je 0x40c582
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x40c586
add ecx, 4
add edx, 4
test ax, ax
jne 0x40c560
xor eax, eax
jmp 0x40c58b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40c5d3
mov ecx, str.Progman
lea eax, [ebp - 0x160]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c5c6
test dx, dx
je 0x40c5c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c5c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40c5a0
xor eax, eax
jmp 0x40c5cb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40c73a
lea ecx, [ebp - 0x28]
call fcn.004bc8c0
cmp dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
je 0x40c613
lea ecx, [ebp - 0x28]
mov dword [edi + 0x47f4], 0
mov dword [ebp - 4], 0xffffffff
call fcn.004bc960
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x47f4], 0
je 0x40c70c
lea ecx, [ebp - 0x28]
push 0
push ecx
call fcn.004b69a0
add esp, 8
test eax, eax
jl 0x40c70c
lea edx, [ebp - 0x10]
push edx
lea ecx, [ebp - 0x28]
call fcn.004bc9d0
mov ecx, eax
call fcn.004bf6b0
mov ecx, dword [ebp - 0x10]
test cx, cx
jl 0x40c70c
mov ax, word [ebp - 0xe]
test ax, ax
jl 0x40c70c
cwde
movsx ecx, cx
push eax
push ecx
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x28]
call fcn.004bc9d0
mov ecx, eax
call fcn.004bf300
push 1
lea eax, [ebp - 0x18]
push eax
push 0
lea ecx, [ebp - 0x28]
call fcn.004bc9d0
mov ecx, eax
add ecx, 8
call fcn.004b32e0
push eax
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push ecx
push edx
call dword [sym.imp.USER32.dll_WindowFromPoint]
cmp eax, dword [0x52fe14]
jne 0x40c70c
lea eax, [ebp - 0x30]
push eax
mov dword [edi + 0x4190], 1
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov esi, dword [sym.imp.USER32.dll_SetCursorPos]
push ecx
push edx
call esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov edi, dword [sym.imp.USER32.dll_mouse_event]
push 0
push 0
push eax
push ecx
push 0x8002
call edi
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push 0
push 0
push edx
push eax
push 0x8004
call edi
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
push ecx
push edx
call esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.004bc960
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x47f4], 1
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4