Function at 0x401520
Capabilities:
Check for foreground window switch
Execute command
Log keystrokes via polling

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x30
call sym.___main
mov dword [esp + 4], 0x404044
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov ecx, sym.imp.libstdc_6.dll_std::cin
call sym.std::istream::operator___int_
sub esp, 4
mov dword [esp], 0x404049
call sym._system
mov dword [esp + 4], 0x40404d
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], str.Active
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp + 4], 0x404058
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], str.Desactive
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov dword [esp + 4], str.CPS:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov ecx, sym.imp.libstdc_6.dll_std::cout
call sym.std::ostream::operator___int_
sub esp, 4
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov byte [ebp - 9], 1
mov ebx, dword [ebp - 0x20]
mov eax, 0x7d0
cdq
idiv ebx
mov dword [ebp - 0x10], eax
cmp byte [ebp - 0x11], 0
je 0x401712
movzx eax, byte [ebp - 9]
cmp eax, 1
jne 0x401712
mov dword [esp], 1
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
test ax, ax
setne al
test al, al
je 0x401712
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x18], eax
mov dword [esp + 4], 0
mov dword [esp], str.LWJGL
mov eax, dword [sym.imp.USER32.dll_FindWindowA]
call eax
sub esp, 8
mov ebx, eax
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
cmp ebx, eax
sete al
test al, al
je 0x401712
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x201
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_SendMessageW]
call eax
sub esp, 0x10
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x202
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_SendMessageW]
call eax
sub esp, 0x10
call sym._rand
cdq
idiv dword [ebp - 0x10]
mov eax, edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
movzx eax, byte [ebp - 9]
test eax, eax
jne 0x4017b2
mov dword [esp], 1
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
test ax, ax
setne al
test al, al
je 0x4017b2
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0
mov dword [esp], str.LWJGL
mov eax, dword [sym.imp.USER32.dll_FindWindowA]
call eax
sub esp, 8
mov ebx, eax
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
cmp ebx, eax
sete al
test al, al
je 0x4017b2
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x201
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_SendMessageW]
call eax
sub esp, 0x10
call sym._rand
cdq
idiv dword [ebp - 0x10]
mov eax, edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov dword [esp], 0x56
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
test ax, ax
setne al
test al, al
je 0x4017eb
movzx eax, byte [ebp - 9]
cmp eax, 1
jne 0x4017da
mov byte [ebp - 9], 0
mov dword [esp], 0xc8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov dword [esp], 0x47
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
test ax, ax
setne al
test al, al
je 0x401629
movzx eax, byte [ebp - 9]
test eax, eax
jne 0x401816
mov byte [ebp - 9], 1
mov dword [esp], 0xc8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
jmp 0x401629