Function at 0x4b0fb0
Capabilities:
Check for foreground window switch
Log keystrokes

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
test esi, esi
je 0x4b1244
mov ebx, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push 0
push esi
call ebx
mov dword [esp + 0x18], eax
cmp eax, dword [0x4fda50]
je 0x4b0fe7
mov ecx, esi
call fcn.004b2300
test al, al
jne 0x4b1244
mov edi, dword [sym.imp.USER32.dll_GetForegroundWindow]
call edi
push esi
mov ebp, eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x4b1005
push 9
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
cmp esi, ebp
jne 0x4b1013
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp byte [0x4fc2c4], 0
jne 0x4b1089
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x4fda50]
mov dword [0x4f8984], 0
cmp eax, dword fs:[0x24]
je 0x4b1045
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4b1052
mov edx, 1
lea ecx, [edx + 9]
call fcn.004018a0
mov dword [0x4f8984], 1
call edi
mov edi, eax
cmp edi, esi
jne 0x4b1070
mov edi, esi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp edi, ebp
je 0x4b1089
push 4
push edi
call dword [sym.imp.USER32.dll_GetWindow]
cmp esi, eax
jne 0x4b1089
test edi, edi
jne 0x4b123a
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
test ebp, ebp
je 0x4b10f4
push 0
push ebp
call ebx
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
je 0x4b10fc
cmp dword [0x4fda50], edi
je 0x4b10d3
mov ecx, ebp
call fcn.004b2300
mov ebx, dword [sym.imp.USER32.dll_AttachThreadInput]
test al, al
jne 0x4b10d9
push 1
push edi
push dword [0x4fda50]
call ebx
test eax, eax
setne byte [esp + 0x12]
jmp 0x4b10d9
mov ebx, dword [sym.imp.USER32.dll_AttachThreadInput]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4b10fc
cmp edi, eax
je 0x4b10fc
push 1
push eax
push edi
call ebx
test eax, eax
setne byte [esp + 0x13]
jmp 0x4b10fc
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
xor ebx, ebx
nop
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x4fda50]
mov dword [0x4f8984], 0
cmp eax, dword fs:[0x24]
je 0x4b1129
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4b1136
mov edx, 1
lea ecx, [edx + 9]
call fcn.004018a0
mov dword [0x4f8984], 1
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
cmp edi, esi
je 0x4b1201
cmp edi, ebp
je 0x4b1169
push 4
push edi
call dword [sym.imp.USER32.dll_GetWindow]
cmp esi, eax
jne 0x4b1169
test edi, edi
jne 0x4b1203
inc ebx
cmp ebx, 5
jl 0x4b1100
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
mov ecx, 2
call fcn.0041a5e0
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
mov ecx, 2
call fcn.0041a5e0
add esp, 0x20
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x4fda50]
mov dword [0x4f8984], 0
cmp eax, dword fs:[0x24]
je 0x4b11c9
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4b11d6
mov edx, 1
lea ecx, [edx + 9]
call fcn.004018a0
mov dword [0x4f8984], 1
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
cmp edi, esi
je 0x4b1201
cmp edi, ebp
je 0x4b11fd
push 4
push edi
call dword [sym.imp.USER32.dll_GetWindow]
cmp esi, eax
je 0x4b1203
xor edi, edi
jmp 0x4b1203
mov edi, esi
cmp byte [esp + 0x12], 0
mov ebx, dword [esp + 0x14]
mov ebp, dword [sym.imp.USER32.dll_AttachThreadInput]
je 0x4b121f
push 0
push ebx
push dword [0x4fda50]
call ebp
cmp byte [esp + 0x13], 0
je 0x4b122f
push 0
push dword [esp + 0x1c]
push ebx
call ebp
test edi, edi
je 0x4b1244
push esi
call dword [sym.imp.USER32.dll_BringWindowToTop]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret