Function at 0x408370
Capabilities:
Check if file exists
Delete file
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x408
mov eax, dword [0x460df4]
xor eax, esp
mov dword [esp + 0x404], eax
push ebx
push ebp
push esi
mov ebx, ecx
mov esi, 0x10
cmp dword [ebx + 0x74], esi
push edi
mov dword [esp + 0x10], 1
jb 0x4083a1
mov eax, dword [ebx + 0x60]
jmp 0x4083a4
lea eax, [ebx + 0x60]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40843d
cmp dword [ebx + 0x74], esi
jb 0x4083bd
mov eax, dword [ebx + 0x60]
jmp 0x4083c0
lea eax, [ebx + 0x60]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x4083ec
cmp dword [ebx + 0x74], esi
jb 0x4083da
mov eax, dword [ebx + 0x60]
jmp 0x4083dd
lea eax, [ebx + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x408487
cmp dword [ebx + 0x74], esi
mov dword [esp + 0x10], 0
jb 0x4083fe
mov eax, dword [ebx + 0x60]
jmp 0x408401
lea eax, [ebx + 0x60]
push eax
lea eax, [esp + 0x18]
push str.Can_not_delete:__s_n
push eax
call fcn.00433f59
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
jmp 0x408420
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408420
mov ecx, dword [ebx + 4]
sub eax, edx
test ecx, ecx
je 0x408487
push ecx
push eax
push 1
lea ecx, [esp + 0x20]
push ecx
jmp 0x40847f
cmp dword [ebx + 0x74], esi
jb 0x408447
mov eax, dword [ebx + 0x60]
jmp 0x40844a
lea eax, [ebx + 0x60]
push eax
lea edx, [esp + 0x18]
push str.Can_not_find:__s_n
push edx
call fcn.00433f59
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408464
mov ecx, dword [ebx + 4]
sub eax, edx
test ecx, ecx
je 0x408487
push ecx
push eax
push 1
lea eax, [esp + 0x20]
push eax
call fcn.0043386b
add esp, 0x10
mov esi, dword [ebx + 0xf8]
cmp esi, dword [ebx + 0xfc]
lea ebp, [ebx + 0xf4]
jbe 0x4084a0
call fcn.004334ac
mov edi, esi
mov esi, dword [ebx + 0xfc]
cmp dword [ebx + 0xf8], esi
jbe 0x4084b5
call fcn.004334ac
test ebp, ebp
je 0x4084c3
lea eax, [ebx + 0xf4]
cmp ebp, eax
je 0x4084c8
call fcn.004334ac
cmp edi, esi
je 0x408615
test ebp, ebp
jne 0x4084d9
call fcn.004334ac
cmp edi, dword [ebp + 8]
jb 0x4084e3
call fcn.004334ac
cmp dword [edi + 0x18], 0x10
lea esi, [edi + 4]
jb 0x4084f0
mov eax, dword [esi]
jmp 0x4084f2
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4085ad
cmp edi, dword [ebp + 8]
jb 0x40850b
call fcn.004334ac
cmp dword [edi + 0x18], 0x10
jb 0x408515
mov eax, dword [esi]
jmp 0x408517
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x408548
cmp edi, dword [ebp + 8]
jb 0x408531
call fcn.004334ac
cmp dword [edi + 0x18], 0x10
jb 0x40853b
mov eax, dword [esi]
jmp 0x40853d
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x408552
mov dword [esp + 0x10], 0
jmp 0x40855d
cmp dword [esp + 0x10], 0
jne 0x408603
cmp edi, dword [ebp + 8]
jb 0x408567
call fcn.004334ac
cmp dword [edi + 0x18], 0x10
jb 0x40856f
mov esi, dword [esi]
push esi
lea ecx, [esp + 0x18]
push str.Can_not_delete:__s_n
push ecx
call fcn.00433f59
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408590
mov ecx, dword [ebx + 4]
sub eax, edx
test ecx, ecx
je 0x408603
push ecx
push eax
push 1
lea edx, [esp + 0x20]
push edx
jmp 0x4085fb
cmp edi, dword [ebp + 8]
jb 0x4085b7
call fcn.004334ac
cmp dword [edi + 0x18], 0x10
jb 0x4085bf
mov esi, dword [esi]
push esi
lea eax, [esp + 0x18]
push str.Can_not_find:__s_n
push eax
call fcn.00433f59
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4085e0
mov ecx, dword [ebx + 4]
sub eax, edx
test ecx, ecx
je 0x408603
push ecx
push eax
push 1
lea ecx, [esp + 0x20]
push ecx
call fcn.0043386b
add esp, 0x10
cmp edi, dword [ebp + 8]
jb 0x40860d
call fcn.004334ac
add edi, 0x1c
jmp 0x4084a2
mov ecx, dword [esp + 0x414]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00432a13
add esp, 0x408
ret