Function at 0x466850
Capabilities:
Check if file exists
Create process on windows
Get common file path
Resolve function by parsing pe exports
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x4c8e10
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x50b384]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x50b384]
xor eax, esp
push eax
lea eax, [esp + 0x9c]
mov dword fs:[0], eax
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xb8]
mov ebx, dword [esp + 0xbc]
mov esi, dword [esp + 0xb0]
mov edi, dword [esp + 0xb4]
mov ebp, dword [esp + 0xc4]
mov dword [esp + 0x1c], eax
xor eax, eax
xor edx, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x17], 0
mov dword [esp + 0x94], 7
mov dword [esp + 0x90], eax
mov word [esp + 0x80], dx
push eax
push 0x105
lea ecx, [esp + 0x84]
mov dword [esp + 0xac], eax
call fcn.0040d213
cmp dword [esp + 0x94], 8
mov eax, dword [esp + 0x80]
jae 0x466915
lea eax, [esp + 0x80]
push eax
mov eax, dword [esp + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x466b39
cmp eax, dword [esp + 0x90]
ja 0x466b39
cmp dword [esi + 0x14], 0
je 0x466af7
mov ecx, esi
call fcn.0040110c
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x466af7
mov ecx, esi
call fcn.0040110c
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x466af7
xor ecx, ecx
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], 0
mov word [esp + 0x64], cx
push ecx
push 0x105
lea ecx, [esp + 0x68]
mov byte [esp + 0xac], 1
call fcn.0040d213
push 0x38
lea edx, [esp + 0x2c]
push 0
test ebx, ebx
push edx
setne bl
mov dword [esp + 0x30], 0x3c
call fcn.0048f0d0
add esp, 0xc
mov ecx, esi
mov dword [esp + 0x2c], ebp
call fcn.0040110c
mov ecx, edi
mov dword [esp + 0x34], eax
call fcn.0040110c
mov dword [esp + 0x38], eax
movzx eax, bl
neg eax
sbb eax, eax
and eax, 0x40
or eax, dword [esp + 0xc0]
mov edi, 8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x30], str.open
mov dword [esp + 0x40], 1
cmp dword [esp + 0x78], edi
jae 0x466a0d
lea eax, [esp + 0x64]
mov ecx, dword [esp + 0x74]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x466aee
cmp eax, dword [esp + 0x74]
ja 0x466aee
mov eax, dword [esp + 0x64]
cmp dword [esp + 0x78], edi
jae 0x466a39
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x466aee
cmp dword [esp + 0x78], edi
jb 0x466a58
mov edx, dword [esp + 0x64]
mov dword [esp + 0x3c], edx
jmp 0x466a60
lea eax, [esp + 0x64]
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x466ad9
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x18]
mov dword [eax], edx
test bl, bl
je 0x466ad4
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x20]
mov dword [esi], 0
test eax, eax
je 0x466ad4
mov edx, dword [esp + 0x1c]
push 1
push 0
push 0x101c01
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x28], 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 0x466ace
mov eax, dword [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x466ad4
mov ecx, dword [esp + 0x18]
mov dword [esi], ecx
mov byte [esp + 0x17], 1
cmp dword [esp + 0x78], edi
jb 0x466af7
mov edx, dword [esp + 0x64]
push edx
call fcn.0048e976
add esp, 4
jmp 0x466af7
lea ecx, [esp + 0x60]
call fcn.0040199c
mov eax, dword [esp + 0x80]
mov esi, 8
cmp dword [esp + 0x94], esi
jae 0x466b13
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esp + 0x94], esi
jb 0x466b33
mov eax, dword [esp + 0x80]
push eax
call fcn.0048e976
add esp, 4
mov al, byte [esp + 0x17]
jmp 0x466b55
cmp dword [esp + 0x94], 8
jb 0x466b53
mov ecx, dword [esp + 0x80]
push ecx
call fcn.0048e976
add esp, 4
xor al, al
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.0048ebcd
add esp, 0x94
ret 0x1c