Function at 0x4f18f0
Capabilities:
Check for foreground window switch

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov byte [ebp - 1], al
push 0
mov ecx, 0x4f1b4c
mov dl, 1
mov eax, dword [0x4f0f98]
call fcn.00456640
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4f1b31
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, byte [ebp - 1]
mov eax, dword [ebp - 8]
call fcn.004f6550
mov eax, dword [ebp - 8]
call fcn.004f71c0
cmp byte [ebp - 1], 0
jne 0x4f195a
mov eax, dword [ebp - 8]
cmp byte [eax + 0x14c], 0
je 0x4f194c
mov eax, dword [ebp - 8]
call fcn.004f87f0
jmp 0x4f195a
mov byte [ebp - 2], 1
call fcn.00405de4
jmp 0x4f1b38
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.00457b70
mov eax, dword [0x591088]
mov eax, dword [eax]
cmp byte [eax + 0xe4], 0
jne 0x4f1aca
mov eax, dword [0x591088]
mov eax, dword [eax]
call fcn.00479a30
test al, al
jne 0x4f1aca
mov eax, dword [0x591088]
mov eax, dword [eax]
cmp dword [eax + 0x58], 0
jne 0x4f1aca
mov eax, dword [ebp - 8]
call fcn.004581d0
mov eax, dword [ebp - 8]
call fcn.004581b0
mov dword [ebp - 0x10], 1
mov eax, dword [0x5913d4]
mov eax, dword [eax]
call fcn.00453120
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd9], 0
jne 0x4f19f7
lea eax, [ebp - 0xc]
push eax
call sub.user32.dll_GetForegroundWindow
push eax
call sub.user32.dll_GetWindowThreadProcessId
call sub.kernel32.dll_GetCurrentProcessId
cmp eax, dword [ebp - 0xc]
je 0x4f19f7
push 6
call sub.kernel32.dll_Sleep_2
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x65
jne 0x4f19b6
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd9], 0
je 0x4f1a0f
mov eax, dword [ebp - 8]
cmp byte [eax + 0xda], 3
je 0x4f1a3c
mov eax, dword [0x591088]
mov eax, dword [eax]
cmp byte [eax + 0xe6], 0
jne 0x4f1a3c
push 0
push 8
mov eax, dword [0x591088]
mov eax, dword [eax]
mov edx, dword [eax + 0x1ac]
xor ecx, ecx
mov eax, 0x4f1b64
call fcn.00443fa0
mov dword [ebp - 0x10], 1
mov eax, dword [0x5913d4]
mov eax, dword [eax]
call fcn.00453120
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd9], 0
jne 0x4f1aae
lea eax, [ebp - 0xc]
push eax
call sub.user32.dll_GetForegroundWindow
push eax
call sub.user32.dll_GetWindowThreadProcessId
call sub.kernel32.dll_GetCurrentProcessId
cmp eax, dword [ebp - 0xc]
je 0x4f1a9e
call sub.user32.dll_GetForegroundWindow
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x4f1a9e
call sub.user32.dll_GetForegroundWindow
push eax
call sub.user32.dll_IsIconic
test eax, eax
jne 0x4f1a9e
push 0x190
call sub.kernel32.dll_Sleep_2
jmp 0x4f1aae
push 0x3c
call sub.kernel32.dll_Sleep_2
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x65
jne 0x4f1a43
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd9], 0
jne 0x4f1ac2
mov eax, dword [ebp - 8]
call fcn.004581d0
mov eax, dword [ebp - 8]
call fcn.00458190
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd9], 0
je 0x4f1ae6
mov eax, dword [ebp - 8]
cmp byte [eax + 0xda], 3
setne byte [ebp - 2]
jmp 0x4f1b1b
mov eax, dword [ebp - 8]
call fcn.00457f20
cmp al, 3
setne byte [ebp - 2]
cmp byte [ebp - 2], 0
je 0x4f1b1b
mov eax, dword [ebp - 8]
cmp dword [eax + 0x108], 0
je 0x4f1b1b
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x108]
mov eax, dword [0x591088]
mov eax, dword [eax]
call fcn.0047d600
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f1b38
lea eax, [ebp - 8]
call fcn.00424d7c
ret
mov al, byte [ebp - 2]
mov esp, ebp
pop ebp
ret