Function at 0x4a2855
Capabilities:
Get graphical window text
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x844
push ebx
push esi
push edi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
movzx edx, word [ecx]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
cmp edx, 9
je 0x4a2897
mov esi, 0x4009
mov eax, edx
cmp dx, si
jne 0x4a28f9
mov ecx, dword [ecx + 8]
test edx, 0x4000
je 0x4a28a4
mov ecx, dword [ecx]
test ecx, ecx
je 0x4a2b68
push 0
push 0
lea edx, [esp + 0x30]
xor eax, eax
push edx
lea edx, [esp + 0x4c]
mov word [esp + 0x34], ax
push edx
push 3
push 0
push 0x556a40
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x18]
mov esi, eax
mov dword [esp + 0x38], esi
test esi, esi
js 0x4a2b71
movzx eax, word [esp + 0x28]
lea ecx, [esp + 0x28]
mov edx, 0x4008
cmp ax, dx
jne 0x4a2918
mov edx, 8
mov word [esp + 0x18], dx
mov eax, dword [ecx + 8]
mov ebx, dword [eax]
mov dword [esp + 0x20], ebx
jmp 0x4a2989
cmp ax, 8
jne 0x4a2931
mov edx, 8
mov word [esp + 0x18], dx
mov ebx, dword [ecx + 8]
mov dword [esp + 0x20], ebx
jmp 0x4a2989
cmp ax, 1
jne 0x4a2941
mov esi, 0x800a005e
jmp 0x4a2b6d
xor eax, eax
mov word [esp + 0x18], ax
mov eax, 0x400c
cmp word [ecx], ax
jne 0x4a295d
lea ecx, [ecx]
mov ecx, dword [ecx + 8]
cmp word [ecx], ax
je 0x4a2955
push 3
push 2
push 0x400
push ecx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayPtrOfIndex]
mov esi, eax
mov dword [esp + 0x38], esi
test esi, esi
js 0x4a2b71
mov ebx, dword [esp + 0x20]
mov dx, word [esp + 0x18]
xor edi, edi
mov dword [esp + 0x38], 0
cmp dx, 8
jne 0x4a2ab8
push ebx
push edi
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
jne 0x4a2b25
test ebx, ebx
je 0x4a2b61
mov eax, dword [ebx - 4]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x10], eax
je 0x4a2b61
push 5
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x4a2a38
push 0x1ff
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, eax
mov eax, dword [esp + 0x10]
cmp ecx, eax
jl 0x4a2a21
push eax
lea eax, [esp + 0x54]
xor edx, edx
push eax
push ebx
mov word [esp + ecx*2 + 0x5c], dx
call fcn.004ba935
add esp, 0xc
test eax, eax
jne 0x4a2a21
mov ecx, esi
call fcn.004a27fb
mov edi, eax
test edi, edi
jne 0x4a2b25
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x4a29db
test edi, edi
jne 0x4a2b25
push 5
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x4a2b61
lea esp, [esp]
push 0x1ff
lea eax, [esp + 0x454]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jl 0x4a2aa7
xor edx, edx
mov word [esp + eax*2 + 0x450], dx
sub eax, ecx
push ecx
lea ecx, [esp + 0x454]
lea eax, [ecx + eax*2]
push eax
push ebx
call fcn.004ba935
add esp, 0xc
test eax, eax
jne 0x4a2aa7
mov ecx, esi
call fcn.004a27fb
mov edi, eax
test edi, edi
jne 0x4a2b25
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x4a2a55
jmp 0x4a2b21
push 5
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x4a2b61
lea esp, [esp]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp dword [esp + 0x10], ebx
jne 0x4a2b12
push esi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
jne 0x4a2b05
push esi
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4a2b12
mov ecx, esi
call fcn.004a27fb
mov edi, eax
test edi, edi
jne 0x4a2b25
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x4a2ad5
test edi, edi
je 0x4a2b61
mov ebx, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea eax, [esp + 0x3c]
push 1
push eax
push edi
call ebx
mov esi, dword [sym.imp.USER32.dll_AttachThreadInput]
push eax
push 0
call esi
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push edi
call dword [sym.imp.USER32.dll_SetFocus]
push 0
lea eax, [esp + 0x40]
push eax
push edi
call ebx
push eax
push 0
call esi
xor esi, esi
jmp 0x4a2b71
mov esi, 0x80004005
jmp 0x4a2b71
mov esi, 0x800a005b
mov dword [esp + 0x38], esi
cmp word [esp + 0x28], 0
je 0x4a2b84
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8