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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x4a9bf0]
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.0046e733
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, eax
add esp, 8
mov ecx, 0x5c5c
test edi, edi
je 0x40911c
mov byte [edi], 0
cmp word [esi], cx
jne 0x409038
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.004642b0
add esp, 8
test eax, eax
je 0x409066
cmp byte [esi], 0
je 0x40905d
push esi
call ebx
test eax, eax
jne 0x40905d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40905d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x409076
lea eax, [ebp - 0x25c]
push eax
call ebx
lea eax, [edi + 1]
mov byte [edi], 0x5c
push 0x5c
push eax
call fcn.0046e733
jmp 0x40900c
push str.Error_creating_directory__s:_s
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040b160
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.0040dc20
add esp, 0x20
cmp dword [ebp + 8], 0xffffffff
je 0x40920e
call fcn.0041fd60
test eax, eax
je 0x40920e
call fcn.0041fd60
cmp dword [eax], 0
je 0x40920e
mov eax, dword [0x4bd720]
test eax, eax
je 0x4090e7
mov esi, dword [eax + 0x190]
jmp 0x4090ed
mov esi, dword [0x4bd724]
call fcn.0041fd60
test eax, eax
je 0x4090ff
call fcn.0041fd60
mov eax, dword [eax]
jmp 0x409101
xor eax, eax
lea ecx, [ebp - 0x130]
push ecx
push ecx
push dword [0x4bd720]
push esi
push 0
push 0xa99
jmp 0x4091ff
cmp word [esi], cx
jne 0x409137
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.004642b0
add esp, 8
test eax, eax
je 0x409233
cmp byte [esi], 0
je 0x40922a
push esi
call ebx
test eax, eax
jne 0x40922a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40922a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xb7
je 0x40922a
push str.Error_creating_directory__s:__s
push 0
call edi
push eax
call fcn.0040b160
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.0040dc20
add esp, 0x20
cmp dword [ebp + 8], 0xffffffff
je 0x40920e
call fcn.0041fd60
test eax, eax
je 0x40920e
call fcn.0041fd60
cmp dword [eax], 0
je 0x40920e
mov eax, dword [0x4bd720]
test eax, eax
je 0x4091cf
mov esi, dword [eax + 0x190]
jmp 0x4091d5
mov esi, dword [0x4bd724]
call fcn.0041fd60
test eax, eax
je 0x4091e7
call fcn.0041fd60
mov eax, dword [eax]
jmp 0x4091e9
xor eax, eax
lea ecx, [ebp - 0x130]
push ecx
push ecx
push dword [0x4bd720]
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.0046300c
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.0046300c
mov esp, ebp
pop ebp
ret