Function at 0x781d6c
Capabilities:
Check for foreground window switch

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x7826f0
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
push ebp
push 0x7826d0
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x730], 0
jne 0x781db2
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x7826da
mov eax, dword [ebp - 4]
mov byte [eax + 0x794], 0
mov eax, dword [ebp - 4]
add eax, 0xfa0
call fcn.00404bbc
mov eax, dword [ebp - 4]
cmp dword [eax + 0x698], 0
jne 0x78244a
xor ecx, ecx
push ebp
push 0x782443
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov eax, dword [ebp - 4]
mov dword [eax + 0x698], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x740]
cmp dword [eax + 0xf4], 3
jne 0x781e4f
mov eax, dword [0x849e48]
mov eax, dword [eax + 0x740]
mov eax, dword [eax + 0x1f4]
xor edx, edx
call fcn.00405678
je 0x781e45
lea edx, [ebp - 0xc]
mov eax, dword [0x849e48]
mov eax, dword [eax + 0x740]
mov eax, dword [eax + 0x1f4]
call fcn.00816ab8
mov eax, dword [ebp - 0xc]
call fcn.0081115c
test al, al
jne 0x781e4f
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00783c84
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x740]
mov eax, dword [edx + 0xf4]
test eax, eax
jne 0x781e6f
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
dec eax
jne 0x781eb9
cmp byte [edx + 0x50], 0
je 0x781e9e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 4
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
xor edx, edx
call fcn.007f63b0
jmp 0x78242a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x740]
mov eax, dword [edx + 0xf4]
cmp eax, 2
je 0x781ed6
cmp eax, 3
jne 0x781fd2
cmp byte [edx + 0x50], 0
je 0x781f2d
cmp eax, 2
jne 0x781f07
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 5
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 6
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x781f53
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
xor eax, eax
push ebp
push 0x781fb9
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x781fa8
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, dword [ebp - 4]
call fcn.007eabbc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x781faf
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 0
ret
cmp eax, 4
jne 0x7820ac
cmp byte [edx + 0x50], 0
je 0x782007
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 7
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x78202d
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
xor eax, eax
push ebp
push 0x782093
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x782082
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, dword [ebp - 4]
call fcn.007fc228
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x782089
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 0
ret
cmp eax, 5
jne 0x7821a6
cmp byte [edx + 0x50], 0
je 0x7820e1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 8
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
xor eax, eax
push ebp
push 0x78218d
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x78217c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 1
mov eax, dword [0x83fa38]
mov eax, dword [eax]
cmp dword [eax + 0x44], 0
je 0x782135
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [0x83fa38]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, dword [ebp - 4]
call fcn.007e66b8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
cmp byte [eax + 0xace], 0
jne 0x782107
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x782183
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 0
ret
cmp eax, 6
jne 0x782218
cmp byte [edx + 0x50], 0
je 0x7821d7
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 1
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x7821fd
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
xor edx, edx
call fcn.007f6858
jmp 0x78242a
cmp eax, 0xa
jne 0x78228a
cmp byte [edx + 0x50], 0
je 0x782249
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 9
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x78226f
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
xor edx, edx
call fcn.007f6974
jmp 0x78242a
cmp eax, 7
jne 0x7822fc
cmp byte [edx + 0x50], 0
je 0x7822bb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 2
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x7822e1
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
xor edx, edx
call fcn.007f6a90
jmp 0x78242a
cmp eax, 9
jne 0x7823c4
xor eax, eax
push ebp
push 0x7823ae
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x782339
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov byte [eax + 0x147c], 0
xor eax, eax
push ebp
push 0x782389
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
xor edx, edx
call fcn.007e60b4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x782390
mov eax, dword [ebp - 4]
mov byte [eax + 0x147d], 0
ret
cmp byte [edx + 0x50], 0
je 0x7823ed
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, 3
call fcn.007decac
mov eax, dword [ebp - 4]
call fcn.00773c80
jmp 0x78242a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73d], 0
je 0x782413
mov eax, dword [0x83fa38]
mov eax, dword [eax]
call fcn.00471454
mov eax, dword [ebp - 4]
call fcn.00455ff8
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov edx, dword [ebp - 4]
call fcn.007f6bac
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x78244a
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x698], edx
ret
xor eax, eax
push ebp
push 0x78247a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
mov eax, dword [eax + 0x2f8]
mov al, byte [eax + 0xad0]
mov byte [ebp - 5], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x782484
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73c], 0
je 0x7824e9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x740]
cmp dword [eax + 0xf4], 5
je 0x7824ae
mov eax, dword [ebp - 4]
cmp byte [eax + 0x794], 0
je 0x7824e9
xor eax, eax
push ebp
push 0x7824d4
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.user32.dll_GetForegroundWindow
mov edx, dword [ebp - 4]
mov dword [edx + 0x78c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x7824e9
xor eax, eax
push ebp
push 0x782568
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp - 5], 0
je 0x78255e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x740]
mov ebx, dword [eax + 0xf4]
cmp ebx, 6
je 0x78251b
cmp ebx, 0xa
je 0x78251b
cmp ebx, 7
jne 0x78255e
mov eax, dword [ebp - 4]
cmp dword [eax + 0x78c], 0
jbe 0x78255e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78c]
push eax
call sub.user32.dll_IsWindow
test eax, eax
je 0x78255e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78c]
push eax
call sub.user32.dll_IsIconic
test eax, eax
je 0x78255e
push 9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78c]
push eax
call sub.user32.dll_ShowWindow
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x782572
mov eax, dword [ebp - 4]
cmp byte [eax + 0x794], 0
je 0x782596
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73c], 0
je 0x7825ba
mov eax, dword [ebp - 4]
cmp byte [eax + 0x794], 0
je 0x7825ba
mov eax, dword [ebp - 4]
cmp dword [eax + 0x78c], 0
jbe 0x7825ba
call sub.user32.dll_GetForegroundWindow
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x78c]
je 0x7825ba
mov eax, dword [ebp - 4]
call fcn.00781cf8
xor eax, eax
push ebp
push 0x7825e0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x730]
call fcn.00403db0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x7825ea
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x730], edx
mov eax, dword [0x83fb5c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73c], 0
je 0x782614
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00780e04
mov eax, dword [ebp - 4]
mov byte [eax + 0x74b], 0
mov eax, dword [ebp - 4]
call fcn.0077d4b8
mov eax, dword [ebp - 4]
cmp byte [eax + 0x794], 0
je 0x78264a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x73c], 0
je 0x78268d
mov eax, dword [ebp - 4]
cmp byte [eax + 0x794], 0
je 0x78268d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x740]
cmp dword [eax + 0xf4], 1
jne 0x782669
cmp byte [eax + 0x50], 0
jne 0x782669
push 0x64
call sub.kernel32.dll_Sleep_1
mov eax, dword [ebp - 4]
cmp dword [eax + 0x78c], 0
jbe 0x78268d
call sub.user32.dll_GetForegroundWindow
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x78c]
je 0x78268d
mov eax, dword [ebp - 4]
call fcn.00781cf8
mov eax, dword [ebp - 4]
call fcn.007717d0
mov eax, dword [ebp - 4]
cmp dword [eax + 0xfa0], 0
je 0x7826be
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xfa0]
xor eax, eax
call fcn.00817d98
mov eax, dword [ebp - 4]
add eax, 0xfa0
call fcn.00404bbc
mov eax, dword [ebp - 4]
call fcn.0077d850
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x7826da
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7826f7
lea eax, [ebp - 0xc]
call fcn.004052f0
ret