Function at 0x47d310
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 0x4e03d5
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x5246a8]
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 esi, dword [ebp + 0xc]
lea ebx, [ecx + 0x6c]
xor edi, edi
mov dword [ebp - 0x108], edi
push ebx
mov dword [ebp - 0xf8], ecx
mov dword [ebp - 0x100], eax
mov dword [ebp - 0x10c], ebx
mov dword [ebp - 0x110], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x104], eax
cmp esi, edi
je 0x47d94b
cmp dword [esi + 0x10], edi
je 0x47d94b
xor ecx, ecx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], edi
mov word [ebp - 0x48], cx
push edi
push 0x105
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.0040c8a0
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x47d3b8
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x38]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, edi
je 0x47d9a8
cmp eax, dword [ebp - 0x38]
ja 0x47d9a8
xor eax, eax
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], edi
mov word [ebp - 0x64], ax
push edi
push 0x105
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.0040c8a0
cmp dword [ebp - 0x50], 8
mov eax, dword [ebp - 0x64]
jae 0x47d402
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, edi
je 0x47d98d
cmp eax, dword [ebp - 0x54]
ja 0x47d98d
cmp dword [ebp - 0x50], 8
mov eax, dword [ebp - 0x64]
jae 0x47d42a
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x47d98d
mov ecx, esi
lea esi, [ebp - 0x9c]
call fcn.004764d0
xor edx, edx
mov byte [ebp - 0xf3], 0
mov byte [ebp - 0xf4], 0
mov byte [ebp - 0xf1], 0
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], edi
mov word [ebp - 0x2c], dx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0xf1]
push ecx
lea edx, [ebp - 0xf4]
push edx
lea eax, [ebp - 0xf3]
push eax
mov ecx, esi
push ecx
mov byte [ebp - 4], 4
call fcn.0049e1b0
mov bl, al
mov eax, dword [0x527178]
add esp, 0x14
mov byte [ebp - 0xf9], bl
cmp eax, edi
je 0x47d76d
cmp byte [eax + 0x51], 0
je 0x47d76d
test bl, bl
je 0x47d909
cmp byte [ebp - 0xf3], 0
je 0x47d76d
cmp byte [ebp - 0xf4], 0
jne 0x47d76d
cmp byte [ebp - 0xf1], 0
jne 0x47d76d
cmp dword [ebp - 0x1c], edi
je 0x47d76d
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x47d4f6
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x100]
push 0x80000000
push eax
push edx
call fcn.004721e0
add esp, 0xc
test al, al
jne 0x47d76d
xor esi, esi
cmp dword [ebp - 0x100], edi
je 0x47d909
cmp dword [ebp - 0x1c], edi
je 0x47d909
mov eax, dword [ebp - 0x100]
push eax
push edi
mov dword [eax + 0x14], 1
call fcn.00472230
add esp, 8
test al, al
jne 0x47d545
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x47d551
lea eax, [ebp - 0x2c]
push 0x80000000
push eax
mov eax, dword [ebp - 0xf8]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00436a30
mov bl, al
add esp, 0xc
mov byte [ebp - 0xf2], bl
test bl, bl
je 0x47d589
mov ecx, dword [ebp - 0xf8]
lea edx, [ebp - 0x2c]
push edx
call fcn.00436bf0
jmp 0x47d745
cmp dword [ebp - 0x1c], edi
je 0x47d745
lea eax, [ebp - 0x2c]
push eax
mov ecx, eax
push ecx
call fcn.00416360
add esp, 8
test al, al
je 0x47d745
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x47d5b5
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47d745
push 1
push edi
push 0x4feebc
lea ecx, [ebp - 0x2c]
call fcn.0040a0c0
cmp eax, 0xffffffff
jne 0x47d745
push 1
push edi
push 0x4feeb8
lea ecx, [ebp - 0x2c]
call fcn.0040a0c0
cmp eax, 0xffffffff
jne 0x47d745
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x47d602
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x2c]
push edx
push eax
call fcn.00416900
add esp, 8
test al, al
je 0x47d745
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x47d623
lea eax, [ebp - 0x2c]
push eax
call fcn.00416bb0
add esp, 4
test al, al
je 0x47d745
lea eax, [ebp - 0x2c]
push eax
push 0x2d
lea ecx, [ebp - 0xb8]
push ecx
mov ecx, dword [ebp - 0xf8]
call fcn.00478d40
mov ecx, dword [0x527178]
mov byte [ebp - 4], 5
cmp ecx, edi
je 0x47d673
push 0x28
lea edx, [ebp - 0xf0]
push edx
call fcn.00437b5c
mov byte [ebp - 4], 6
mov ebx, 1
jmp 0x47d68f
push 0x4e696c
lea ecx, [ebp - 0xd4]
call fcn.00408780
mov dword [ebp - 4], 7
mov ebx, 2
push eax
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x108], ebx
call fcn.00438ef0
mov dword [ebp - 4], 8
test bl, 2
je 0x47d6b8
lea ecx, [ebp - 0xd4]
and ebx, 0xfffffffd
call fcn.00409ff0
mov byte [ebp - 4], 0xa
test bl, 1
je 0x47d6cc
lea ecx, [ebp - 0xf0]
call fcn.00409ff0
mov ecx, dword [0x527178]
cmp ecx, edi
je 0x47d6dd
call fcn.0043be00
mov esi, eax
mov ecx, dword [ebp - 0x80]
mov eax, 8
cmp dword [ebp - 0x6c], eax
jae 0x47d6ed
lea ecx, [ebp - 0x80]
cmp dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xb8]
jae 0x47d701
lea eax, [ebp - 0xb8]
push ecx
push eax
push esi
call fcn.00474730
add esp, 0xc
test al, al
je 0x47d728
mov ecx, dword [ebp - 0xf8]
push 1
push edi
lea eax, [ebp - 0x2c]
push eax
call fcn.00415ed0
mov byte [ebp - 0xf2], al
lea ecx, [ebp - 0x80]
call fcn.00409ff0
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 4
call fcn.00409ff0
mov bl, byte [ebp - 0xf2]
mov ecx, dword [ebp - 0x100]
xor eax, eax
test bl, bl
setne al
cmp dword [ecx + 0x14], 1
mov dword [ecx + 0x1c], eax
jne 0x47d909
cmp eax, edi
je 0x47d909
mov bl, byte [ebp - 0xf9]
test bl, bl
je 0x47d909
lea eax, [ebp - 0x9c]
call fcn.00473300
test eax, eax
jne 0x47d7b7
cmp dword [ebp - 0x88], 8
mov eax, dword [ebp - 0x9c]
jae 0x47d799
lea eax, [ebp - 0x9c]
push eax
call fcn.00475280
xor ecx, ecx
add esp, 4
test al, al
setne cl
add ecx, 0x20
mov dword [ebp - 0x104], ecx
jmp 0x47d909
lea edx, [ebp - 0x9c]
push edx
call fcn.00478780
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x80]
push ecx
call fcn.00478650
add esp, 0xc
cmp dword [ebp - 0x6c], 8
mov dword [ebp - 0xf8], edi
jb 0x47d7eb
cmp dword [ebp - 0x80], edi
je 0x47d8ff
cmp dword [ebp - 0x70], 2
jbe 0x47d8ff
mov edi, dword [sym.imp.SHLWAPI.dll_AssocQueryStringW]
lea edx, [ebp - 0xf8]
push edx
push 0
push str.open
push str.http
push 2
push 0
call edi
cmp eax, 1
jne 0x47d8ff
mov eax, dword [ebp - 0xf8]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
push 0x527ef9
neg ecx
or ecx, eax
push ecx
call fcn.004218c1
mov esi, eax
add esp, 8
test esi, esi
je 0x47d8ff
lea eax, [ebp - 0xf8]
push eax
push esi
push str.open
push str.http
push 2
push 0
call edi
test eax, eax
jne 0x47d8f6
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x47d8f6
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47d8f6
push esi
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x47d8f6
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
cmp byte [ebp + 0x10], 0
jne 0x47d8c6
test eax, eax
je 0x47d8c6
push str.iexplore.exe
push eax
call fcn.00408526
add esp, 8
test eax, eax
jne 0x47d8c6
lea edi, [ebp - 0x9c]
call fcn.004734b0
mov dword [ebp - 0x104], eax
cmp eax, 0x20
ja 0x47d8f6
mov ecx, dword [ebp - 0x64]
mov eax, 8
cmp dword [ebp - 0x50], eax
jae 0x47d8d6
lea ecx, [ebp - 0x64]
cmp dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x80]
jae 0x47d8e1
lea eax, [ebp - 0x80]
push 1
push ecx
push eax
push esi
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x104], eax
push esi
call fcn.004168eb
add esp, 4
lea ecx, [ebp - 0x80]
call fcn.00409ff0
xor edi, edi
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x47d915
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x2c]
call fcn.00409ff0
lea ecx, [ebp - 0x9c]
call fcn.00409ff0
lea ecx, [ebp - 0x64]
call fcn.00409ff0
lea ecx, [ebp - 0x48]
call fcn.00409ff0
mov eax, dword [ebp - 0x104]
mov ebx, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x100]
mov dword [ecx + 0x14], 1
cmp eax, edi
jne 0x47d961
mov eax, 0x21
mov edx, ecx
push ebx
mov dword [edx + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
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 0xc
lea ecx, [ebp - 0x64]
call fcn.00409ff0
lea ecx, [ebp - 0x48]
call fcn.00409ff0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x47d96f
cmp dword [ebp - 0x34], 8
jb 0x47d9ba
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00406d09
add esp, 4
xor edx, edx
push ebx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], edi
mov word [ebp - 0x48], dx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x47d96f