Function at 0x40f530
Capabilities:
Find taskbar
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x499527
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x4bd450]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bd450]
xor eax, esp
push eax
lea eax, [esp + 0x23c]
mov dword fs:[0], eax
push 0x206
xor ebx, ebx
lea ecx, [esp + 0x32]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x38], ax
call fcn.00476ef0
add esp, 0xc
push 0x104
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x40f637
push str.Wtsapi32.dll
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x40f637
lea ecx, [esp + 0x2c]
push ecx
call fcn.004097c0
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ebx
cmp eax, ebx
je 0x40f5dd
push str.WTSQueryUserToken
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebx
call fcn.0040f4b0
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f63e
push 0xb
sub esp, 0x1c
mov edx, str.initredirectrule
mov eax, esp
mov dword [esp + 0x44], esp
call fcn.004028a0
mov dword [esp + 0x264], ebx
sub esp, 0x1c
mov edx, str.initruleerr
mov eax, esp
mov dword [esp + 0x5c], esp
call fcn.004028a0
mov byte [esp + 0x280], 1
mov dword [esp + 0x280], edi
call fcn.00408160
add esp, 0x3c
xor eax, eax
jmp 0x40f7b0
mov ebp, dword [sym.imp.KERNEL32.dll_SleepEx]
xor esi, esi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], ebx
cmp eax, ebx
je 0x40f65e
lea edx, [esp + 0x18]
push edx
push edi
call eax
test eax, eax
jne 0x40f685
push ebx
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowW]
cmp eax, ebx
jne 0x40f697
push ebx
push 0x1f4
inc edi
call ebp
inc esi
cmp esi, 6
jb 0x40f646
or ebp, 0xffffffff
jmp 0x40f701
push 1
call fcn.00403b50
push eax
call fcn.00403bb0
or ebp, 0xffffffff
jmp 0x40f701
lea ecx, [esp + 0x1c]
push ecx
or ebp, 0xffffffff
push eax
mov dword [esp + 0x24], ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [esp + 0x1c]
push edx
push ebx
push SysReAllocString
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x244], 2
cmp esi, ebx
je 0x40f6eb
lea eax, [esp + 0x18]
push eax
push 0xb
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f6eb
mov dword [esp + 0x244], ebp
jmp 0x40f6f6
mov dword [esp + 0x244], ebp
cmp esi, ebx
je 0x40f701
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x20], ebx
cmp dword [esp + 0x24c], ebx
je 0x40f727
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40f727
lea edi, [esp + 0x28]
call fcn.0040f3b0
test eax, eax
je 0x40f727
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40f736
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x18], ebx
jne 0x40f7ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x44], esp
push 9
mov edi, 7
xor edx, edx
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], ebx
push str.loopbreak
mov word [esi + 4], dx
call fcn.00402bd0
mov dword [esp + 0x264], 3
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x5c], esp
push 0xb
xor eax, eax
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], ebx
push str.initruleerr
mov word [esi + 4], ax
call fcn.00402bd0
mov byte [esp + 0x280], 4
mov dword [esp + 0x280], ebp
call fcn.00404570
add esp, 0x3c
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.00471eba
add esp, 0x234
ret