Function at 0x40c140
Capabilities:
Check for time delay via gettickcount
Hide graphical window
Log keystrokes
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5040b8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x541074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0
cmp byte [esi], 0
je 0x40c382
mov eax, dword [esi + 0xc]
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x40c19f
mov edx, dword [eax + 4]
mov ebx, dword [eax + 8]
mov edi, dword [eax]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x40c1f4
push str.restart
push ecx
call fcn.004e1212
add esp, 8
test eax, eax
je 0x40c1f4
push edi
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40c37e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x40c1e6
push 0x1388
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x40c384
test ebx, ebx
je 0x40c2f0
push ebx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40c2f0
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x40c232
mov dword [ebp - 0x14], ebx
lea edx, [ebp - 0x14]
mov dword [ebp - 0x18], edi
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [eax + 8]
call eax
test al, al
je 0x40c232
mov bl, 1
jmp 0x40c384
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, dword [sym.imp.USER32.dll_AttachThreadInput]
mov ebx, eax
push 1
push esi
push ebx
call edi
mov esi, dword [ebp - 0x10]
push 1
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push 3
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
mov esi, dword [sym.imp.USER32.dll_SetWindowPos]
call esi
push 3
push 0
push 0
push 0
push 0
push 0xfffffffffffffffe
push dword [ebp - 0x10]
call esi
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0
push dword [ebp - 0x18]
push ebx
call edi
push 1
push 0
push esi
call dword [sym.imp.USER32.dll_InvalidateRect]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x40c2e9
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c2b5
sub ecx, edi
sar ecx, 1
je 0x40c2e9
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
push 0
push 0x4a
push esi
mov dword [ebp - 0x20], edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov bl, 1
jmp 0x40c384
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x40c30b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [ebx + 0xbb8]
cmp ecx, eax
jb 0x40c30b
mov bl, 1
jmp 0x40c384
test edi, edi
je 0x40c382
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40c382
cmp eax, 1
jne 0x40c351
push edi
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40c35d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x40c348
push 0x1388
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c35d
cmp eax, 2
jne 0x40c35d
mov ecx, edi
call fcn.004092f0
cmp dword [esi + 0xc], 0
je 0x40c37e
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0xc]
mov dword [ecx + 4], eax
add dword [esi + 4], 8
xor bl, bl
jmp 0x40c384
mov bl, byte [esi]
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x40c39c
mov esi, dword [ecx]
lea eax, [ebp + 0x10]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30