Function at 0x401c86
Capabilities:
Log keystrokes
Log keystrokes via polling
Terminate process

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
xor esi, esi
push 0xff
lea eax, [esp + 0x21]
push esi
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov byte [esp + 0x28], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x40
pop eax
cmp dword [0x406144], eax
jle 0x401cc2
mov dword [0x406144], eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
or byte [esp + 0x2d], 0x80
push esi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
cmp ebx, esi
jne 0x401cee
mov eax, dword [0x406130]
mov ebx, dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebx, ebp
je 0x401d08
push 1
push ebp
push ebx
call dword [sym.imp.USER32.dll_AttachThreadInput]
push dword [0x40603c]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
test eax, eax
jne 0x401d24
push dword [0x40603c]
call dword [sym.imp.USER32.dll_SetActiveWindow]
push dword [0x40603c]
call dword [sym.imp.USER32.dll_SetFocus]
push 0x64
push dword [0x40603c]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
cmp dword [0x406144], esi
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.USER32.dll_PostMessageA]
jle 0x401e55
mov ebp, 0x176
push dword [0x40603c]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x401e51
inc dword [esp + 0x14]
push ebp
push ebp
push dword [0x40603c]
call fcn.00401a28
fld1
add esp, 0xc
push dword [0x406110]
mov dword [0x406050], eax
sub esp, 0x10
fstp qword [esp + 8]
fld qword [0x405268]
fstp qword [esp]
call fcn.00401000
add esp, 0x14
push eax
call esi
push 0
push 0x73
push 0x100
push dword [0x406050]
call edi
fld1
push dword [0x406078]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [0x405268]
fstp qword [esp]
call fcn.00401000
add esp, 0x14
push eax
call esi
push 0
push 0x73
push 0x101
push dword [0x406050]
call edi
fld1
push dword [0x406100]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [0x405268]
fstp qword [esp]
call fcn.00401000
add esp, 0x14
push eax
call esi
fld1
push dword [0x406110]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [0x405268]
fstp qword [esp]
call fcn.00401000
add esp, 0x14
push eax
call esi
mov eax, dword [esp + 0x14]
cmp eax, dword [0x406144]
jl 0x401d66
mov ebp, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x31], 0
call dword [sym.imp.USER32.dll_SetKeyboardState]
cmp ebx, ebp
je 0x401e73
push 0
push ebp
push ebx
call dword [sym.imp.USER32.dll_AttachThreadInput]
xor ebx, ebx
push ebx
push ebx
push 0x10
pop ebp
push ebp
push dword [0x40603c]
call edi
test eax, eax
jne 0x401e8f
mov dword [esp + 0x10], 0xd
push dword [0x406120]
call esi
mov eax, dword [0x406130]
push ebx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x401eb7
cmp dword [esp + 0x10], ebx
je 0x401eb7
mov dword [esp + 0x10], 0xe
mov eax, dword [0x406130]
push dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
test eax, eax
jne 0x401ed2
mov dword [esp + 0x10], 0xf
mov eax, dword [0x406130]
push dword [eax + 4]
call edi
test eax, eax
jne 0x401ee4
mov dword [esp + 0x10], ebp
push dword [0x406158]
call esi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret