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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x479bf0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x25c]
push edi
push eax
push 0x12c
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esi + 1]
push 0x5c
push eax
call fcn.0044417b
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, eax
add esp, 8
mov ecx, 0x5c5c
test edi, edi
je 0x406dec
mov byte [edi], 0
cmp word [esi], cx
jne 0x406d08
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.004393a0
add esp, 8
test eax, eax
je 0x406d36
cmp byte [esi], 0
je 0x406d2d
push esi
call ebx
test eax, eax
jne 0x406d2d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x406d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x406d46
lea eax, [ebp - 0x25c]
push eax
call ebx
lea eax, [edi + 1]
mov byte [edi], 0x5c
push 0x5c
push eax
call fcn.0044417b
jmp 0x406cdc
push str.Error_creating_directory__s:_s
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00408c60
add esp, 8
push eax
push esi
push 0xa97
push str.D:MyProjectsProPilotLibMisc.c
push str.Error_creating_directory__s:_s
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.0040b550
add esp, 0x20
cmp dword [ebp + 8], 0xffffffff
je 0x406ede
call fcn.00415230
test eax, eax
je 0x406ede
call fcn.00415230
cmp dword [eax], 0
je 0x406ede
mov eax, dword [0x48d5e0]
test eax, eax
je 0x406db7
mov esi, dword [eax + 0x190]
jmp 0x406dbd
mov esi, dword [0x48d5e4]
call fcn.00415230
test eax, eax
je 0x406dcf
call fcn.00415230
mov eax, dword [eax]
jmp 0x406dd1
xor eax, eax
lea ecx, [ebp - 0x130]
push ecx
push ecx
push dword [0x48d5e0]
push esi
push 0
push 0xa99
jmp 0x406ecf
cmp word [esi], cx
jne 0x406e07
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.004393a0
add esp, 8
test eax, eax
je 0x406f03
cmp byte [esi], 0
je 0x406efa
push esi
call ebx
test eax, eax
jne 0x406efa
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x406efa
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xb7
je 0x406efa
push str.Error_creating_directory__s:__s
push 0
call edi
push eax
call fcn.00408c60
add esp, 8
push eax
push esi
push 0xaa5
push str.D:MyProjectsProPilotLibMisc.c
push str.Error_creating_directory__s:__s
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.0040b550
add esp, 0x20
cmp dword [ebp + 8], 0xffffffff
je 0x406ede
call fcn.00415230
test eax, eax
je 0x406ede
call fcn.00415230
cmp dword [eax], 0
je 0x406ede
mov eax, dword [0x48d5e0]
test eax, eax
je 0x406e9f
mov esi, dword [eax + 0x190]
jmp 0x406ea5
mov esi, dword [0x48d5e4]
call fcn.00415230
test eax, eax
je 0x406eb7
call fcn.00415230
mov eax, dword [eax]
jmp 0x406eb9
xor eax, eax
lea ecx, [ebp - 0x130]
push ecx
push ecx
push dword [0x48d5e0]
push esi
push 0
push 0xaa7
push str.D:MyProjectsProPilotLibMisc.c
push 0x103
call eax
add esp, 0x20
lea eax, [ebp - 0x25c]
push eax
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004380f8
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x25c]
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004380f8
mov esp, ebp
pop ebp
ret