Function at 0x4f973a
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x574ca7
call fcn.00524444
sub esp, 0x344
push ebx
push esi
push edi
mov edi, ecx
push 0x5bff20
lea ecx, [ebp - 0x14]
call fcn.0053ebbd
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 4], ebx
je 0x4f9798
cmp byte [esi], bl
je 0x4f9798
push esi
mov ecx, edi
call fcn.004f944a
cmp eax, 0xffffffff
jne 0x4f9780
or esi, eax
jmp 0x4f99c9
push 0x5bfdbc
lea ecx, [ebp - 0x14]
call fcn.0053ef2b
push esi
lea ecx, [ebp - 0x14]
call fcn.0053ef2b
jmp 0x4f97fe
cmp dword [ebp + 0x14], ebx
je 0x4f97fe
lea ecx, [ebp - 0x44]
call fcn.0053d5c9
push dword [ebp + 0xc]
lea eax, [ebp + 8]
mov byte [ebp - 4], 1
push eax
call fcn.004fb626
pop ecx
pop ecx
push dword [eax]
lea eax, [ebp - 0x44]
mov ecx, edi
mov byte [ebp - 4], 2
push eax
call fcn.004f8454
lea ecx, [ebp + 8]
mov esi, eax
mov byte [ebp - 4], 1
call fcn.0053eb4f
cmp esi, ebx
je 0x4f97f2
push 0x5bfdbc
lea ecx, [ebp - 0x14]
call fcn.0053ef2b
push dword [ebp - 0x40]
lea ecx, [ebp - 0x14]
call fcn.0053ef67
and byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.0053d5fc
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004f9149
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x350]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x4f982c
and byte [ebp - 0x350], al
cmp esi, ebx
je 0x4f983c
cmp byte [esi], 0
je 0x4f983c
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp + 0xc]
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 4
push eax
call fcn.004c49dc
pop ecx
pop ecx
cmp dword [ebp + 0x10], ebx
mov byte [ebp - 4], 5
je 0x4f98dd
cmp dword [ebp - 0x1c], ebx
je 0x4f988d
push dword [ebp - 0x10]
lea eax, [ebp + 0xc]
push dword [ebp - 0x18]
push eax
call fcn.00404ff4
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.0053ec88
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 5
call fcn.0053eb4f
jmp 0x4f98dd
push 0x80
lea eax, [ebp - 0x148]
push dword [ebp - 0x10]
push 0x10
push dword [ebp - 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRelativePathToA]
test eax, eax
je 0x4f98dd
cmp byte [ebp - 0x148], 0x2e
jne 0x4f98ce
cmp byte [ebp - 0x147], 0x5c
je 0x4f98c6
cmp byte [ebp - 0x147], 0x2f
jne 0x4f98ce
lea eax, [ebp - 0x146]
jmp 0x4f98d4
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x10]
call fcn.0053ecd8
mov dword [ebp - 0x30], method.CCommandLineInfo.virtual_0
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
lea eax, [ebp - 0x30]
add edi, 8
push eax
mov ecx, edi
push dword [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.004f862e
mov ebx, eax
xor esi, esi
test ebx, ebx
jle 0x4f9940
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x10]
mov eax, dword [eax + esi*4]
mov eax, dword [eax]
push eax
call fcn.00524e9f
pop ecx
test eax, eax
pop ecx
je 0x4f9998
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x10]
mov eax, dword [eax + esi*4]
mov eax, dword [eax]
push eax
call fcn.004a0938
pop ecx
test eax, eax
pop ecx
jne 0x4f9998
inc esi
cmp esi, ebx
jl 0x4f990d
lea eax, [ebp + 0xc]
mov ecx, edi
push eax
push dword [ebp - 0x14]
call fcn.004fb0fb
test eax, eax
mov esi, 0x5bd950
je 0x4f9966
mov ecx, dword [ebp + 0xc]
push esi
push 0
call fcn.004f99e8
mov ebx, eax
jmp 0x4f9968
xor ebx, ebx
push ebx
lea eax, [ebp + 0xc]
push esi
push eax
call fcn.0041f785
add esp, 0xc
push dword [ebp - 0x10]
mov eax, dword [eax]
mov ecx, edi
mov byte [ebp - 4], 8
push eax
push dword [ebp - 0x14]
call fcn.004f7d9c
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 7
call fcn.0053eb4f
mov esi, ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 5
call fcn.004fb24f
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.0053eb4f
lea eax, [ebp - 0x350]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
and byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.0053eb4f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0053eb4f
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10