Function at 0x409cc0
Capabilities:
Check if file exists
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x490
mov eax, dword [0x43e6dc]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x47c], ecx
mov eax, dword [ebp - 0x47c]
add eax, 4
push eax
call fcn.0040a090
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jge 0x409cfc
mov eax, dword [ebp - 4]
jmp 0x40a07d
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x47c]
add ecx, 8
call fcn.0040cc00
mov edx, dword [ebp - 0x47c]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x47c]
add ecx, 4
call fcn.0040b360
mov dword [ebp - 0x480], eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x480]
push ecx
mov edx, dword [ebp - 0x480]
mov eax, dword [edx]
mov ecx, dword [eax + 0x4c]
call ecx
mov ecx, dword [ebp - 0x47c]
add ecx, 4
call fcn.0040b360
mov dword [ebp - 0x484], eax
push 0
mov edx, dword [ebp - 0x484]
push edx
mov eax, dword [ebp - 0x484]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x50]
call edx
cmp dword [ebp + 0xc], 0
je 0x409da9
push str.version1.0_encodingutf_8
lea ecx, [ebp - 0x434]
call fcn.0040cb80
lea eax, [ebp - 0x434]
push eax
mov ecx, dword [ebp - 0x47c]
call fcn.0040a120
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x434]
call fcn.0040cbe0
jmp 0x40a064
xor ecx, ecx
mov word [ebp - 8], cx
mov ecx, dword [ebp + 8]
call fcn.0040ccc0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409e5f
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x458]
call fcn.0040cf50
mov ecx, dword [eax]
mov dword [ebp - 0x448], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x444], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x440], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x43c], edx
mov ecx, dword [ebp - 0x47c]
add ecx, 4
call fcn.0040b360
mov dword [ebp - 0x488], eax
lea eax, [ebp - 8]
push eax
sub esp, 0x10
mov ecx, esp
mov edx, dword [ebp - 0x448]
mov dword [ecx], edx
mov eax, dword [ebp - 0x444]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x440]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x43c]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 0x488]
push ecx
mov edx, dword [ebp - 0x488]
mov eax, dword [edx]
mov ecx, dword [eax + 0x30]
call ecx
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x458]
call fcn.0040d050
jmp 0x40a055
mov dword [ebp - 4], 0x80004005
call fcn.0040a0f0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40a055
mov ecx, dword [ebp + 8]
call fcn.0040ccc0
push eax
push 0
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [eax + 0x10]
call edx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x40a055
mov eax, dword [ebp - 0x10]
push eax
call fcn.0041d475
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40a055
mov ecx, dword [ebp - 0x10]
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call fcn.0041ce70
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040ccc0
push eax
push 0
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [eax + 0x14]
call edx
push 0x208
push 0
lea eax, [ebp - 0x228]
push eax
call fcn.0041ce70
add esp, 0xc
lea ecx, [ebp - 0x228]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x208
push 0
lea edx, [ebp - 0x430]
push edx
call fcn.0041ce70
add esp, 0xc
mov eax, dword [0x43d568]
mov dword [ebp - 0x48c], eax
mov ecx, dword [0x43d568]
add ecx, 1
mov dword [0x43d568], ecx
lea edx, [ebp - 0x430]
push edx
mov eax, dword [ebp - 0x48c]
push eax
push 0x4348b4
lea ecx, [ebp - 0x228]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x4348ac
lea edx, [ebp - 0x430]
push edx
call fcn.0041d40f
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40a049
mov eax, dword [ebp - 0x18]
push eax
push 1
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.0041d2c7
add esp, 0x10
mov eax, dword [ebp - 0x18]
push eax
call fcn.0041d0e9
add esp, 4
lea ecx, [ebp - 0x430]
push ecx
lea ecx, [ebp - 0x478]
call fcn.0040cfc0
mov edx, dword [eax]
mov dword [ebp - 0x468], edx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x464], ecx
mov edx, dword [eax + 8]
mov dword [ebp - 0x460], edx
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x45c], eax
mov ecx, dword [ebp - 0x47c]
add ecx, 4
call fcn.0040b360
mov dword [ebp - 0x490], eax
lea ecx, [ebp - 8]
push ecx
sub esp, 0x10
mov edx, esp
mov eax, dword [ebp - 0x468]
mov dword [edx], eax
mov ecx, dword [ebp - 0x464]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x460]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x45c]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp - 0x490]
push edx
mov eax, dword [ebp - 0x490]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x30]
call edx
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x478]
call fcn.0040d050
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0041cfe4
add esp, 4
movsx edx, word [ebp - 8]
test edx, edx
jne 0x40a064
mov dword [ebp - 4], 0x80004005
cmp dword [ebp - 4], 0
jge 0x40a07a
push 0
mov ecx, dword [ebp - 0x47c]
add ecx, 4
call fcn.00418500
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041ce01
mov esp, ebp
pop ebp
ret 8