Function at 0x4924e0
Capabilities:
Check if file exists
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e0dc0
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x522638]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x20]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], ecx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x50], edx
mov byte [ebp - 0x49], 0
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], eax
mov word [ebp - 0x48], cx
push eax
push 0x105
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], eax
call fcn.0040c680
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x49255c
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x38]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x492758
cmp eax, dword [ebp - 0x38]
ja 0x492758
cmp dword [esi + 0x10], 0
je 0x49272b
mov ecx, esi
call fcn.0041fc50
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x49272b
mov ecx, esi
call fcn.0041fc50
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x49272b
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
push eax
push 0x105
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040c680
cmp dword [ebp - 0x50], 0
push 0x38
lea ecx, [ebp - 0x90]
push 0
push ecx
setne byte [ebp - 0x4a]
mov dword [ebp - 0x94], 0x3c
call fcn.004b8020
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x8c], ebx
call fcn.0041fc50
mov ecx, edi
mov dword [ebp - 0x84], eax
call fcn.0041fc50
cmp byte [ebp + 0x24], 0
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x88], str.runas
jne 0x492630
mov dword [ebp - 0x88], str.open
mov bl, byte [ebp - 0x4a]
mov eax, dword [ebp - 0x2c]
movzx edx, bl
neg edx
sbb edx, edx
and edx, 0x40
or edx, dword [ebp + 0x1c]
mov edi, 8
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x90], edx
cmp dword [ebp - 0x18], edi
jae 0x49265d
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x492687
cmp eax, dword [ebp - 0x1c]
ja 0x492687
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x49267c
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x492694
lea ecx, [ebp - 0x2c]
call fcn.00409f90
jmp 0x492730
cmp dword [ebp - 0x18], edi
jb 0x4926a1
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x7c], edx
jmp 0x4926a7
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x7c], eax
lea ecx, [ebp - 0x94]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x492718
mov edx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x54]
mov dword [eax], edx
test bl, bl
je 0x492714
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x50]
mov dword [esi], 0
test eax, eax
je 0x492714
mov edx, dword [ebp - 0x58]
push 1
push 0
push 0x101c01
lea ecx, [ebp - 0x50]
push ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x50], 0
mov edx, dword [ecx]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x49270f
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x492714
mov ecx, dword [ebp - 0x50]
mov dword [esi], ecx
mov byte [ebp - 0x49], 1
cmp dword [ebp - 0x18], edi
jb 0x492730
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00406ca9
add esp, 4
jmp 0x492730
mov edi, 8
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x49273b
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x34], edi
jb 0x492753
mov eax, dword [ebp - 0x48]
push eax
call fcn.00406ca9
add esp, 4
mov al, byte [ebp - 0x49]
jmp 0x49276c
cmp dword [ebp - 0x34], 8
jb 0x49276a
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00406ca9
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret 0x20