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

Disassembly:
push 0xffffffffffffffff
push 0x4c8e50
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x50b384]
xor eax, esp
mov dword [esp + 0x9c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x50b384]
xor eax, esp
push eax
lea eax, [esp + 0xb4]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc4]
mov ecx, dword [esp + 0xcc]
mov edx, dword [esp + 0xd0]
mov edi, dword [esp + 0xc8]
mov ebp, dword [esp + 0xdc]
mov dword [esp + 0x2c], eax
xor ebx, ebx
mov esi, 7
xor eax, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x30], edx
mov byte [esp + 0x17], bl
mov dword [esp + 0xac], esi
mov dword [esp + 0xa8], ebx
mov word [esp + 0x98], ax
push ebx
push 0x105
lea ecx, [esp + 0x9c]
mov dword [esp + 0xc4], ebx
call fcn.0040d213
cmp dword [esp + 0xac], 8
mov eax, dword [esp + 0x98]
jae 0x466c3e
lea eax, [esp + 0x98]
mov ecx, dword [esp + 0xa8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, ebx
je 0x466edb
cmp eax, dword [esp + 0xa8]
ja 0x466edb
cmp dword [edi + 0x14], ebx
je 0x466dd4
mov ecx, edi
call fcn.0040110c
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x466dd4
mov ecx, edi
call fcn.0040110c
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x466dd4
xor edx, edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x8c], ebx
mov word [esp + 0x7c], dx
push ebx
push 0x105
lea ecx, [esp + 0x80]
mov byte [esp + 0xc4], 1
call fcn.0040d213
mov eax, dword [esp + 0x7c]
mov esi, 8
cmp dword [esp + 0x90], esi
jae 0x466cdc
lea eax, [esp + 0x7c]
mov ecx, dword [esp + 0x8c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebx
je 0x466dcb
cmp eax, dword [esp + 0x8c]
ja 0x466dcb
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x90], esi
jae 0x466d11
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x466dcb
push 0x44
lea edx, [esp + 0x38]
push ebx
push edx
call fcn.0048f0d0
add esp, 0xc
mov dword [esp + 0x34], 0x44
cmp byte [esp + 0xd8], bl
je 0x466d53
mov eax, 1
mov dword [esp + 0x60], 1
mov word [esp + 0x64], ax
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
call fcn.0040110c
push eax
call fcn.00491d23
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x7c]
cmp ebp, ebx
je 0x466e19
cmp dword [esp + 0x90], 8
jae 0x466d93
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0xe0]
push ebx
push eax
push ebx
push ebx
push ebx
push esi
mov ecx, edi
call fcn.0040110c
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x466e52
push esi
call fcn.00490d9c
add esp, 4
lea ecx, [esp + 0x78]
call fcn.0040199c
mov eax, dword [esp + 0x98]
mov esi, 8
cmp dword [esp + 0xac], esi
jae 0x466df0
lea eax, [esp + 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esp + 0xac], esi
jb 0x466e10
mov eax, dword [esp + 0x98]
push eax
call fcn.0048e976
add esp, 4
mov al, byte [esp + 0x17]
jmp 0x466ef7
cmp dword [esp + 0x90], 8
jae 0x466e27
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0xe0]
push ebx
push eax
push ebx
push ebx
push ebx
push esi
mov ecx, edi
call fcn.0040110c
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
jmp 0x466dba
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], ebx
cmp eax, ebx
je 0x466ea2
mov edx, dword [esp + 0x2c]
push 1
push ebx
push 0x101c01
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x28], ebx
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 0x466e9c
mov eax, dword [esp + 0x1c]
push eax
call ebp
jmp 0x466ea2
mov ecx, dword [esp + 0x18]
mov dword [edi], ecx
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x466ead
push eax
call ebp
push esi
mov byte [esp + 0x1b], 1
call fcn.00490d9c
add esp, 4
cmp dword [esp + 0x90], 8
jb 0x466dd4
mov edx, dword [esp + 0x7c]
push edx
call fcn.0048e976
add esp, 4
jmp 0x466dd4
cmp dword [esp + 0xac], 8
jb 0x466ef5
mov ecx, dword [esp + 0x98]
push ecx
call fcn.0048e976
add esp, 4
xor al, al
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x9c]
xor ecx, esp
call fcn.0048ebcd
add esp, 0xac
ret 0x1c