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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x110]
push ebx
mov ebx, ecx
sub esp, 0x120
mov dword [ebp - 0x11c], eax
mov edi, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
mov dword [esp], edx
mov dword [ebp - 0x120], edx
call edi
sub esp, 4
mov dword [ebp - 0x114], eax
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x118], eax
sub esp, 8
test ecx, ecx
je 0x4f1e10
mov edx, dword [ebp - 0x120]
test ebx, ebx
cmove ebx, edx
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strlen]
mov dword [ebp - 0x120], eax
call fcn.0057d110
mov edx, dword [ebp + 0xc]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x12f
mov dword [esp + 8], edx
mov dword [esp + 4], str._s:_SetCurrentDirectoryA_failed_n
mov ecx, dword [ebp - 0x114]
mov dword [esp], ecx
call fcn.004e88d0
call fcn.0057d110
mov edx, dword [ebp + 0xc]
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x130
xor eax, eax
mov dword [esp + 8], edx
mov dword [esp + 4], str._s:_SetCurrentDirectory_did_not_change_the_directory__though_it_passed_n
mov edx, dword [ebp - 0x120]
cmp dword [ebp - 0x118], edx
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x133
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_lstrcmpiA]
mov esi, dword [ebp + 0xc]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str._s:_SetCurrentDirectory_did_not_change_the_directory__though_it_passed_n
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x136
mov eax, dword [ebp - 0x11c]
mov dword [esp], eax
call edi
mov edi, dword [ebp + 0xc]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], str._s:_Couldnt_set_directory_to_its_original_value_n
mov dword [esp], eax
call fcn.004e88d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x11c]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strlen]
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x13b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str._s:_SetCurrentDirectoryA_passed_when_it_should_have_failed_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x114]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x13d
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str._s:_SetCurrentDirectory_changed_the_directory__though_it_failed_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x118], edi
sete al
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x140
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_lstrcmpiA]
mov esi, dword [ebp + 0xc]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str._s:_SetCurrentDirectory_changed_the_directory__though_it_failed_n
mov dword [esp], eax
call fcn.004e88d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret