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

Disassembly:
push 0xffffffffffffffff
push 0x414d38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x520
push ebx
push esi
mov esi, dword [esp + 0x538]
push edi
mov edi, ecx
push 0x5c
push 0x2f
mov ecx, esi
mov dword [esp + 0x1c], edi
call fcn.0040cda8
mov eax, dword [esi]
lea ecx, [esp + 0x124]
lea edx, [esp + 0x328]
push ecx
push edx
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call fcn.00403cc9
lea eax, [esp + 0x2c]
push eax
call fcn.00403e95
add esp, 0x18
test eax, eax
jne 0x402baa
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x10]
call fcn.0040e65b
lea edx, [esp + 0x224]
mov dword [esp + 0x534], 0
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
cmp ecx, 2
jle 0x40299f
lea eax, [esp + 0x10]
push 2
push eax
lea ecx, [esp + 0x14]
call fcn.0040ce61
mov eax, dword [eax]
push 0x41b100
push eax
call fcn.00403c1a
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.0040e5ed
test bl, bl
jne 0x402b96
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
cmp ecx, 2
jle 0x402ad0
lea ecx, [esp + 0x10]
push 3
push ecx
lea ecx, [esp + 0x14]
call fcn.0040ce61
mov eax, dword [eax]
push 0x41b144
push eax
call fcn.00403c1a
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.0040e5ed
test bl, bl
je 0x402acc
mov edx, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [edx - 8], 2
jle 0x402a70
lea eax, [esp + 0x10]
push 3
push eax
lea ecx, [esp + 0x14]
call fcn.0040ce61
mov eax, dword [eax]
push 0x41b144
push eax
call fcn.00403c1a
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.0040e5ed
test bl, bl
je 0x402a70
push 0x41b108
call edi
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x1c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0xc]
add eax, 0xfffffffd
push eax
push edx
call fcn.0040cde5
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x538], 1
call fcn.0040e6da
lea ecx, [esp + 0x1c]
mov byte [esp + 0x534], 0
call fcn.0040e5ed
mov eax, dword [esp + 0xc]
cmp dword [eax - 8], 2
jg 0x4029f1
lea ecx, [esp + 0x428]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edx, [esp + 0x428]
mov ecx, esi
push edx
call fcn.0040e72a
push 0x5c
mov ecx, esi
call fcn.0040e9a4
lea eax, [esp + 0x328]
mov ecx, esi
push eax
call fcn.0040e97d
lea ecx, [esp + 0x124]
push ecx
mov ecx, esi
call fcn.0040e97d
lea edx, [esp + 0x224]
push edx
call edi
mov edi, dword [esp + 0x14]
jmp 0x402b96
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x402b34
cmp byte [eax], 0x5c
jne 0x402b34
lea eax, [esp + 0x124]
lea ecx, [esp + 0x328]
push eax
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0x230]
push eax
push ecx
call fcn.00403cc9
add esp, 0x14
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push esi
push edx
push eax
call fcn.0040e8aa
push eax
mov ecx, esi
mov byte [esp + 0x538], 2
call fcn.0040e6da
mov byte [esp + 0x534], 0
lea ecx, [esp + 0x14]
jmp 0x402b91
push esi
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.0040cd46
push eax
mov ecx, esi
mov byte [esp + 0x538], 3
call fcn.0040e6da
lea ecx, [esp + 0x14]
mov byte [esp + 0x534], 0
call fcn.0040e5ed
lea edx, [esp + 0x224]
push esi
lea eax, [esp + 0x18]
push edx
push eax
call fcn.0040e8aa
push eax
mov ecx, esi
mov byte [esp + 0x538], 4
call fcn.0040e6da
mov byte [esp + 0x534], 0
lea ecx, [esp + 0x14]
call fcn.0040e5ed
lea ecx, [esp + 0xc]
mov dword [esp + 0x534], 0xffffffff
call fcn.0040e5ed
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x14]
call fcn.0040e65b
lea edx, [esp + 0x10]
mov ecx, edi
push edx
mov dword [esp + 0x538], 5
call fcn.00402ca0
test eax, eax
je 0x402c51
lea eax, [esp + 0x328]
lea ecx, [esp + 0x20]
push eax
call fcn.0040e65b
lea ecx, [esp + 0x20]
mov byte [esp + 0x534], 6
push ecx
mov ecx, edi
call fcn.00402ca0
test eax, eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x534], 5
sete bl
call fcn.0040e5ed
test bl, bl
jne 0x402c51
lea edx, [esp + 0x124]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040e65b
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
mov byte [esp + 0x538], 7
call fcn.00402ca0
test eax, eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x534], 5
sete bl
call fcn.0040e5ed
test bl, bl
je 0x402c53
mov bl, 1
lea ecx, [esp + 0x10]
mov dword [esp + 0x534], 0xffffffff
call fcn.0040e5ed
test bl, bl
je 0x402c76
mov ecx, edi
call fcn.00402810
xor eax, eax
jmp 0x402c7b
mov eax, 1
mov ecx, dword [esp + 0x52c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x52c
ret 4