Function at 0x405096
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
mov eax, 0x40ffef
call fcn.004070f0
sub esp, 0x31c
mov eax, dword [0x4150f0]
push edi
push 0x411b88
push 1
mov dword [ebp - 0x10], eax
call fcn.00403991
lea eax, [ebp - 0x31c]
push eax
call fcn.00404b17
push 0x20
lea eax, [ebp - 0x31c]
push 0x41123c
push eax
call fcn.0040662f
mov edi, eax
add esp, 0x18
test edi, edi
mov dword [ebp - 0x324], edi
jne 0x40510a
push 0x10
push 0x411240
push 0x411b60
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 4
pop eax
jmp 0x40538b
push esi
mov dword [ebp - 0x328], edi
and dword [ebp - 4], 0
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x40514c
push 0x10
push 0x411240
push 0x411b4c
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 5
pop esi
jmp 0x40537c
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405155
sub eax, edx
cmp byte [ebp + eax - 0x21a], 0x3a
jne 0x405185
push 0x10
push 0x411240
push 0x411b2c
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 6
jmp 0x405146
push 0
push 0x20000
push edi
call fcn.00406793
mov esi, dword [ebp + 8]
push edi
push 1
push 0x14
push esi
call fcn.00406546
push str.._conf.ini
push str.VERSION
push str.SYSTEM
call fcn.00404f75
add esp, 0x28
cmp eax, dword [esi + 8]
mov dword [ebp - 0x320], eax
jae 0x405223
movzx eax, ax
push eax
movzx eax, byte [ebp - 0x31e]
push eax
movzx eax, byte [ebp - 0x31d]
push eax
movzx eax, word [esi + 0xc]
push eax
movzx eax, byte [esi + 0xe]
push eax
movzx eax, byte [esi + 0xf]
push eax
movzx eax, word [esi + 8]
push eax
movzx eax, byte [esi + 0xa]
push eax
movzx eax, byte [esi + 0xb]
push eax
push 0x411ab0
mov esi, 0x5a98e8
push esi
call fcn.0040627d
add esp, 0x2c
push 0x10
push 0x411240
push esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 7
jmp 0x405146
cmp eax, dword [esi + 0xc]
jbe 0x405289
movzx eax, ax
push eax
movzx eax, byte [ebp - 0x31e]
push eax
movzx eax, byte [ebp - 0x31d]
push eax
movzx eax, word [esi + 0xc]
push eax
movzx eax, byte [esi + 0xe]
push eax
movzx eax, byte [esi + 0xf]
push eax
movzx eax, word [esi + 8]
push eax
movzx eax, byte [esi + 0xa]
push eax
movzx eax, byte [esi + 0xb]
push eax
push 0x411a48
mov esi, 0x5a98e8
push esi
call fcn.0040627d
add esp, 0x2c
push 0x10
push 0x411240
push esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 8
jmp 0x405146
movzx ecx, word [esi + 2]
mov eax, dword [esi + 4]
sub eax, ecx
mov dword [esi + 0x18], eax
je 0x4052ba
inc eax
push eax
call fcn.00405db3
push edi
push 1
push dword [esi + 0x18]
mov dword [esi + 0x14], eax
push eax
call fcn.00406546
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x18]
add esp, 0x14
mov byte [eax + ecx], 0
mov edi, str.unpackselftmp
push edi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push str._s_s
push eax
call fcn.0040627d
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x10
lea eax, [ebp - 0x114]
push eax
call esi
cmp eax, 0xffffffff
je 0x4052fc
lea eax, [ebp - 0x114]
push eax
call fcn.00404c64
pop ecx
lea eax, [ebp - 0x114]
push eax
call esi
cmp eax, 0xffffffff
jne 0x405337
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40535b
push 0x10
push 0x411240
push 0x411a00
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 9
jmp 0x405146
test al, 0x10
jne 0x40535b
push 0x10
push 0x411240
push 0x4119c8
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xa
jmp 0x405146
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x324]
call fcn.00401534
push 0x4119c0
call fcn.004038a6
add esp, 0xc
xor esi, esi
push dword [ebp - 0x324]
call fcn.004065de
pop ecx
mov eax, esi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
call fcn.004068c2
leave
ret