Function at 0x40e168
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Set file attributes
Write file on windows

Disassembly:
push 0xa8
mov eax, 0x464f29
call fcn.0043587d
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 0x20c], ebx
jle 0x40e18a
xor eax, eax
jmp 0x40e43b
lea ecx, [ebp - 0xb4]
call fcn.0040b355
lea eax, [edi + 4]
push ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x94], eax
call fcn.00408fdc
add esp, 4
mov esi, eax
mov ecx, esp
mov dword [ebp - 0x80], esp
push esi
call fcn.004076dd
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0xb4]
call fcn.0040dd6e
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e1e6
test al, 1
je 0x40e1e6
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp esi, ebx
je 0x40e1f1
push esi
call fcn.00437697
pop ecx
push dword [ebp - 0x78]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e221
mov eax, dword [ebp - 0x78]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x80], esp
mov esi, esp
push eax
call fcn.00405e04
pop ecx
add eax, 0x10
lea ecx, [ebp - 0xb4]
mov dword [esi], eax
call fcn.0040e040
mov eax, dword [ebp - 0x78]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x80], esp
mov esi, esp
push eax
mov dword [ebp - 0x98], ebx
call fcn.00405e04
add eax, 0x10
pop ecx
mov dword [esi], eax
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0xb4]
call fcn.0040e10b
push ebx
push dword [ebp - 0x88]
mov byte [ebp - 4], 2
call fcn.00408f8f
pop ecx
pop ecx
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x8c], eax
call fcn.004025b0
mov ecx, dword [edi + 0x210]
mov eax, dword [ecx]
lea edx, [ebp - 0x70]
push edx
mov byte [ebp - 4], 3
call dword [eax + 0x40]
cmp dword [ebp - 0x50], 0x10
mov eax, dword [ebp - 0x64]
jae 0x40e290
lea eax, [ebp - 0x64]
push 0xfde9
push eax
call fcn.00408fdc
mov dword [ebp - 0x90], eax
push eax
mov byte [ebp - 4], 4
call fcn.0043787e
lea esi, [eax + eax + 4]
push esi
call fcn.004376a2
mov ebx, eax
mov dword [ebp - 0x80], ebx
push esi
push 0
push ebx
call fcn.004374f0
push 2
lea eax, [ebp - 0x9c]
push eax
push esi
push ebx
mov dword [ebp - 0x9c], 0xfeff
call fcn.00438699
lea eax, [esi - 2]
push eax
push dword [ebp - 0x90]
push eax
lea eax, [ebx + 2]
push eax
call fcn.00438699
xor eax, eax
add esp, 0x3c
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x74], eax
mov byte [ebp - 4], 6
cmp dword [edi + 0x22c], eax
je 0x40e32e
lea eax, [ebp - 0x84]
push eax
push esi
push ebx
add edi, 0x230
push edi
call fcn.0040b3bb
add esp, 0x10
push eax
lea ecx, [ebp - 0x74]
call fcn.00409db7
jmp 0x40e352
push esi
mov dword [ebp - 0x84], esi
call fcn.004376a2
pop ecx
push eax
lea ecx, [ebp - 0x74]
call fcn.00409db7
push esi
push ebx
push esi
push dword [ebp - 0x74]
call fcn.00438699
add esp, 0x10
mov edi, dword [ebp - 0x8c]
and dword [ebp - 0x7c], 0
push 0x46b958
lea eax, [ebp - 0x7c]
push edi
push eax
call fcn.00437650
add esp, 0xc
test eax, eax
jne 0x40e3ce
cmp dword [ebp - 0x7c], eax
je 0x40e3ce
push dword [ebp - 0x7c]
push 1
push dword [ebp - 0x84]
push dword [ebp - 0x74]
call fcn.00437804
push dword [ebp - 0x7c]
call fcn.00437c34
add esp, 0x14
xor esi, esi
push ecx
mov ecx, esp
mov dword [ebp - 0x8c], esp
push dword [ebp - 0x94]
call fcn.004074b0
call fcn.0040ce1c
pop ecx
test eax, eax
jne 0x40e3bb
inc esi
cmp esi, 0xa
jl 0x40e397
push dword [ebp - 0x94]
push edi
call dword [sym.imp.KERNEL32.DLL_MoveFileA]
mov dword [ebp - 0x98], eax
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
test edi, edi
je 0x40e3e0
push edi
call fcn.00437697
pop ecx
lea ecx, [ebp - 0x74]
call fcn.00409de1
lea ecx, [ebp - 0x80]
call fcn.00409de1
lea ecx, [ebp - 0x90]
call fcn.00409de1
lea ecx, [ebp - 0x70]
call fcn.00401c8a
mov ecx, dword [ebp - 0x88]
add ecx, 0xfffffff0
call fcn.00405c12
mov ecx, dword [ebp - 0x78]
add ecx, 0xfffffff0
call fcn.00405c12
lea ecx, [ebp - 0xb4]
call fcn.0040a472
mov ecx, dword [ebp - 0xa4]
add ecx, 0xfffffff0
call fcn.00405c12
mov eax, dword [ebp - 0x98]
call fcn.00435900
ret