Function at 0x4010d0
Capabilities:
Check if file exists
Create directory
Get common file path
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417d10
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1250
call fcn.00415b10
mov eax, dword [0x420004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x1258], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1260]
push eax
call fcn.00403e56
lea eax, [ebp - 0x1260]
push eax
lea eax, [ebp - 0x1254]
push eax
call fcn.00404122
add esp, 0xc
test eax, eax
jne 0x40135a
push 0x208
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.00403580
add esp, 0xc
push 0
push 0x23
lea eax, [ebp - 0x428]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x4011a8
lea eax, [ebp - 0x428]
push eax
push 1
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x4011a8
call fcn.00401390
lea ecx, [ebp - 0x428]
test eax, eax
je 0x40119e
push str.C:Document_and_SettingsAll_Users
jmp 0x4011a3
push str.C:ProgramData
call section..text
push 0x208
push 0
lea eax, [ebp - 0x220]
push eax
call fcn.00403580
push str.FPHD
lea eax, [ebp - 0x428]
push eax
push str._s_s
push 0x104
lea eax, [ebp - 0x220]
push eax
call fcn.00401050
add esp, 0x20
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x401228
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 7
lea eax, [ebp - 0x220]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
call esi
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMakeSystemFolderW]
push 7
lea eax, [ebp - 0x220]
push eax
call esi
push 0x208
push 0
lea eax, [ebp - 0x630]
push eax
call fcn.00403580
push str.fphds
lea eax, [ebp - 0x220]
push eax
push str._s_s.log
push 0x104
lea eax, [ebp - 0x630]
push eax
call fcn.00401050
push 0x800
push 0
lea eax, [ebp - 0x1230]
push eax
call fcn.00403580
push edi
push dword [ebp - 0x1254]
push dword [ebp - 0x1250]
push dword [ebp - 0x124c]
push dword [ebp - 0x1248]
mov eax, dword [ebp - 0x1244]
inc eax
push eax
mov eax, dword [ebp - 0x1240]
add eax, 0x76c
push eax
push str._d__.2d__.2d__.2d:_.2d:_.2d____s_r_n
push 0x400
lea eax, [ebp - 0x1230]
push eax
call fcn.00401050
add esp, 0x54
push 0x400
push 0
lea eax, [ebp - 0xa30]
push eax
call fcn.00403580
add esp, 0xc
push 0
push 0x41d958
push 0x400
lea eax, [ebp - 0xa30]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x1230]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x41d95c
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x1258]
push eax
call fcn.004058e0
add esp, 0xc
test eax, eax
jne 0x401340
mov edx, dword [ebp - 0x1258]
test edx, edx
je 0x401340
lea ecx, [ebp - 0xa30]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401324
sub ecx, esi
push edx
push 1
push ecx
lea eax, [ebp - 0xa30]
push eax
call fcn.00405b5f
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1258]
test eax, eax
je 0x40135a
push eax
call fcn.00405c2d
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004027a3
mov esp, ebp
pop ebp
ret