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

Disassembly:
push 0xffffffffffffffff
push 0x513da8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa2c
push ebx
push esi
mov esi, dword [esp + 0xa44]
push edi
mov edi, ecx
push 0x5c
push 0x2f
mov ecx, esi
mov dword [esp + 0x1c], edi
call fcn.004d6be7
mov eax, dword [esi]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x630]
push ecx
push edx
lea ecx, [esp + 0x230]
lea edx, [esp + 0x28]
push ecx
push edx
push eax
call fcn.004bf636
lea eax, [esp + 0x34]
push eax
call fcn.004bf2a5
add esp, 0x18
test eax, eax
jne 0x4a721b
lea ecx, [esp + 0x228]
push ecx
lea ecx, [esp + 0x10]
call fcn.004e1e9b
lea edx, [esp + 0x428]
mov dword [esp + 0xa40], 0
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
cmp ecx, 2
jle 0x4a7012
lea eax, [esp + 0x10]
push 2
push eax
lea ecx, [esp + 0x14]
call fcn.004d6f0d
mov ecx, dword [eax]
push 0x55c748
push ecx
call fcn.004bdb15
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.004e1e27
test bl, bl
jne 0x4a7207
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
cmp ecx, 2
jle 0x4a7140
lea edx, [esp + 0x10]
push 3
push edx
lea ecx, [esp + 0x14]
call fcn.004d6f0d
mov eax, dword [eax]
push 0x5629f4
push eax
call fcn.004bdb15
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.004e1e27
test bl, bl
je 0x4a713c
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ecx - 8], 2
jle 0x4a70e3
lea edx, [esp + 0x10]
push 3
push edx
lea ecx, [esp + 0x14]
call fcn.004d6f0d
mov eax, dword [eax]
push 0x5629f4
push eax
call fcn.004bdb15
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.004e1e27
test bl, bl
je 0x4a70e3
push 0x55c778
call edi
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x18]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0xc]
add eax, 0xfffffffd
push eax
push edx
call fcn.004d6e91
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xa44], 1
call fcn.004e1f6e
lea ecx, [esp + 0x18]
mov byte [esp + 0xa40], 0
call fcn.004e1e27
mov eax, dword [esp + 0xc]
cmp dword [eax - 8], 2
jg 0x4a7064
lea ecx, [esp + 0x830]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [esp + 0x830]
mov ecx, esi
push edx
call fcn.004e1fbe
push 0x5c
mov ecx, esi
call fcn.004e223f
lea eax, [esp + 0x630]
mov ecx, esi
push eax
call fcn.004e2218
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.004e2218
lea edx, [esp + 0x428]
push edx
call edi
mov edi, dword [esp + 0x14]
jmp 0x4a7207
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4a71a5
cmp word [eax], 0x5c
jne 0x4a71a5
lea eax, [esp + 0x28]
lea ecx, [esp + 0x630]
push eax
lea edx, [esp + 0x22c]
push ecx
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x434]
push eax
push ecx
call fcn.004bf636
add esp, 0x14
lea edx, [esp + 0x20]
lea eax, [esp + 0x14]
push esi
push edx
push eax
call fcn.004e2140
push eax
mov ecx, esi
mov byte [esp + 0xa44], 2
call fcn.004e1f6e
mov byte [esp + 0xa40], 0
lea ecx, [esp + 0x14]
jmp 0x4a7202
push esi
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.004d69c2
push eax
mov ecx, esi
mov byte [esp + 0xa44], 3
call fcn.004e1f6e
lea ecx, [esp + 0x14]
mov byte [esp + 0xa40], 0
call fcn.004e1e27
lea edx, [esp + 0x428]
push esi
lea eax, [esp + 0x18]
push edx
push eax
call fcn.004e2140
push eax
mov ecx, esi
mov byte [esp + 0xa44], 4
call fcn.004e1f6e
mov byte [esp + 0xa40], 0
lea ecx, [esp + 0x14]
call fcn.004e1e27
lea ecx, [esp + 0xc]
mov dword [esp + 0xa40], 0xffffffff
call fcn.004e1e27
lea ecx, [esp + 0x228]
push ecx
lea ecx, [esp + 0x14]
call fcn.004e1e9b
lea edx, [esp + 0x10]
mov ecx, edi
push edx
mov dword [esp + 0xa44], 5
call fcn.004a7310
test eax, eax
je 0x4a72c2
lea eax, [esp + 0x630]
lea ecx, [esp + 0x1c]
push eax
call fcn.004e1e9b
lea ecx, [esp + 0x1c]
mov byte [esp + 0xa40], 6
push ecx
mov ecx, edi
call fcn.004a7310
test eax, eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xa40], 5
sete bl
call fcn.004e1e27
test bl, bl
jne 0x4a72c2
lea edx, [esp + 0x28]
lea ecx, [esp + 0x18]
push edx
call fcn.004e1e9b
lea eax, [esp + 0x18]
mov ecx, edi
push eax
mov byte [esp + 0xa44], 7
call fcn.004a7310
test eax, eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xa40], 5
sete bl
call fcn.004e1e27
test bl, bl
je 0x4a72c4
mov bl, 1
lea ecx, [esp + 0x10]
mov dword [esp + 0xa40], 0xffffffff
call fcn.004e1e27
test bl, bl
je 0x4a72e7
mov ecx, edi
call fcn.004a6e90
xor eax, eax
jmp 0x4a72ec
mov eax, 1
mov ecx, dword [esp + 0xa38]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0xa38
ret 4