Function at 0x408980
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4beae8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14c
push esi
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
cmp dword [0x50b320], esi
je 0x408c7b
push edi
mov dword [0x50b320], esi
mov dword [ebp - 0x20], 0
cmp esi, dword [0x50b384]
je 0x4089dd
mov eax, dword [0x50bb90]
test eax, eax
je 0x4089d9
cmp esi, eax
je 0x4089dd
xor edi, edi
jmp 0x4089e2
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 - 0x10], ecx
test edi, edi
jne 0x408c6d
test esi, esi
je 0x408c7a
lea edx, [ebp - 0x20]
push edx
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push 0x2c
lea eax, [ebp - 0x54]
push edi
push eax
mov dword [ebp - 0x58], 0x30
call fcn.004b03e0
add esp, 0xc
lea ecx, [ebp - 0x58]
push ecx
push edi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
mov edx, dword [0x50b3a0]
cmp byte [edx + 0x1236], 0
je 0x408c7a
mov edi, dword [ebp - 0x1c]
mov eax, dword [edi + 0x4350]
test eax, eax
je 0x408c7a
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [edi + 0x4354]
jne 0x408c7a
cmp esi, eax
je 0x408b13
push 0x7f
lea edx, [ebp - 0x158]
push edx
push esi
call dword [sym.imp.USER32.dll_GetClassNameW]
test eax, eax
jne 0x408a91
mov word [ebp - 0x158], ax
mov edx, str.WorkerW
lea ecx, [ebp - 0x158]
lea esp, [esp]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x408ac6
test ax, ax
je 0x408ac2
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x408ac6
add ecx, 4
add edx, 4
test ax, ax
jne 0x408aa0
xor eax, eax
jmp 0x408acb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408b13
mov ecx, str.Progman
lea eax, [ebp - 0x158]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408b06
test dx, dx
je 0x408b02
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408b06
add eax, 4
add ecx, 4
test dx, dx
jne 0x408ae0
xor eax, eax
jmp 0x408b0b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x408c7a
lea ecx, [ebp - 0x18]
call fcn.004a4720
cmp dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
je 0x408b53
lea ecx, [ebp - 0x18]
mov dword [edi + 0x4358], 0
mov dword [ebp - 4], 0xffffffff
call fcn.004a4770
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x4358], 0
je 0x408c4c
lea ecx, [ebp - 0x18]
push 0
push ecx
call fcn.0049f8f0
add esp, 8
test eax, eax
jl 0x408c4c
lea edx, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x18]
call fcn.004a4800
mov ecx, eax
call fcn.004a6af0
mov ecx, dword [ebp - 0x1c]
test cx, cx
jl 0x408c4c
mov ax, word [ebp - 0x1a]
test ax, ax
jl 0x408c4c
cwde
movsx ecx, cx
push eax
push ecx
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x18]
call fcn.004a4800
mov ecx, eax
call fcn.004a6740
push 1
lea eax, [ebp - 0x14]
push eax
push 0
lea ecx, [ebp - 0x18]
call fcn.004a4800
mov ecx, eax
add ecx, 8
call fcn.0049ca00
push eax
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
push ecx
push edx
call dword [sym.imp.USER32.dll_WindowFromPoint]
cmp eax, dword [0x50b384]
jne 0x408c4c
lea eax, [ebp - 0x28]
push eax
mov dword [edi + 0x4300], 1
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov esi, dword [sym.imp.USER32.dll_SetCursorPos]
push ecx
push edx
call esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
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 - 0x10]
mov eax, dword [ebp - 0x14]
push 0
push 0
push edx
push eax
push 0x8004
call edi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
push ecx
push edx
call esi
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004a4770
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 - 0x1c]
mov dword [eax + 0x4358], 1
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4