Function at 0x492790
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 0x4e0e00
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
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 edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x20]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x50], ecx
mov ecx, dword [ebp + 0x28]
xor edx, edx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x6c], ecx
cmp eax, edx
je 0x4927ea
mov dword [eax], edx
cmp ecx, edx
je 0x4927f0
mov dword [ecx], edx
mov esi, 7
xor eax, eax
mov byte [ebp - 0x49], dl
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], edx
mov word [ebp - 0x48], ax
push edx
push 0x105
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], edx
call fcn.0040c680
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x492821
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x492a97
cmp eax, dword [ebp - 0x38]
ja 0x492a97
cmp dword [edi + 0x10], 0
je 0x492996
mov ecx, edi
call fcn.0041fc50
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x492996
mov ecx, edi
call fcn.0041fc50
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x492996
mov ecx, edi
call fcn.0041fc50
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x492996
xor edx, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x2c], dx
push edx
push 0x105
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040c680
mov eax, dword [ebp - 0x2c]
mov esi, 8
cmp dword [ebp - 0x18], esi
jae 0x4928b7
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x49298e
cmp eax, dword [ebp - 0x1c]
ja 0x49298e
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x4928de
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x49298e
push 0x44
lea edx, [ebp - 0xb4]
push 0
push edx
call fcn.004b8020
add esp, 0xc
cmp byte [ebp + 0x1c], 0
mov dword [ebp - 0xb4], 0x44
je 0x492926
mov eax, 1
mov dword [ebp - 0x88], 1
mov word [ebp - 0x84], ax
mov ecx, dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
call fcn.0041fc50
push eax
call fcn.0040c758
mov esi, eax
mov eax, dword [ebp - 0x2c]
add esp, 4
mov dword [ebp - 0x50], esi
test ebx, ebx
je 0x4929c6
cmp dword [ebp - 0x18], 8
jae 0x49295a
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0xb4]
push edx
push eax
mov eax, dword [ebp + 0x18]
push 0
push eax
push 0
push 0
push 0
push esi
mov ecx, edi
call fcn.0041fc50
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x4929f8
lea ecx, [ebp - 0x50]
call fcn.00442140
lea ecx, [ebp - 0x2c]
call fcn.00409f90
mov eax, dword [ebp - 0x48]
mov esi, 8
cmp dword [ebp - 0x34], esi
jae 0x4929a6
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp - 0x34], esi
jb 0x4929be
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00406ca9
add esp, 4
mov al, byte [ebp - 0x49]
jmp 0x492aab
cmp dword [ebp - 0x18], 8
jae 0x4929cf
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0xb4]
push edx
push eax
mov eax, dword [ebp + 0x18]
push 0
push eax
push 0
push 0
push 0
push esi
mov ecx, edi
call fcn.0041fc50
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
jmp 0x492982
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x68]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 0
test eax, eax
je 0x492a4a
mov edx, dword [ebp - 0x70]
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 0x492a45
mov eax, dword [ebp - 0x60]
push eax
call edi
jmp 0x492a4a
mov ecx, dword [ebp - 0x50]
mov dword [ebx], ecx
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x492a56
mov edx, dword [ebp - 0x58]
mov dword [eax], edx
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x492a6b
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
je 0x492a68
mov dword [ecx], eax
jmp 0x492a6b
push eax
call edi
mov byte [ebp - 0x49], 1
test esi, esi
je 0x492a7c
push esi
call fcn.00402cae
add esp, 4
cmp dword [ebp - 0x18], 8
jb 0x492996
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00406ca9
add esp, 4
jmp 0x492996
cmp dword [ebp - 0x34], 8
jb 0x492aa9
mov edx, dword [ebp - 0x48]
push edx
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 0x24