Function at 0x408f38
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x40d66a
call fcn.0040cbc0
sub esp, 0x7c
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov ecx, edi
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xe], bl
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408f9b
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x408f9b
push 0x80
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x5c
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_first_of_char__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp dword [ecx], eax
je 0x4090e2
push esi
inc eax
push eax
jmp 0x4090c8
push esi
push ebx
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov ecx, eax
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [ebp - 0x18], 0xffffffff
je 0x408ffc
test byte [ebp - 0x18], 0x10
jne 0x4090c6
push esi
push ebx
lea eax, [ebp - 0x50]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push 0x80
mov ecx, eax
mov dword [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push esi
push ebx
lea eax, [ebp - 0x6c]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov ecx, eax
mov dword [ebp - 4], 2
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push esi
push ebx
lea eax, [ebp - 0x88]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
or dword [ebp - 0x14], 1
push ebx
mov ecx, eax
mov dword [ebp - 4], 3
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4090a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov byte [ebp - 0xd], 1
jne 0x4090a7
mov byte [ebp - 0xd], bl
or dword [ebp - 4], 0xffffffff
test byte [ebp - 0x14], 1
je 0x4090c1
and dword [ebp - 0x14], 0xfffffffe
lea ecx, [ebp - 0x88]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp byte [ebp - 0xd], bl
jne 0x4090e1
inc esi
push esi
mov ecx, edi
push 0x5c
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_first_of_char__unsigned_int_const]
mov esi, eax
mov eax, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp dword [eax], esi
jne 0x408fbc
pop esi
push ebx
mov ecx, edi
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
pop edi
pop ebx
jne 0x409105
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x409109
mov byte [ebp - 0xe], 1
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xe]
mov dword fs:[0], ecx
leave
ret