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

Disassembly:
push ebp
sub esp, 0x410
lea ebp, [esp - 4]
mov eax, dword [0x45fe58]
xor eax, ebp
mov dword [ebp + 0x410], eax
push 0x34
mov eax, 0x447446
call fcn.004288c3
mov edi, dword [ebp + 0x41c]
mov esi, ecx
lea eax, [esi + 4]
push eax
mov dword [ebp - 0x18], eax
call fcn.0040af32
xor ebx, ebx
cmp eax, ebx
pop ecx
jl 0x40cf82
push edi
lea ecx, [esi + 8]
call fcn.0040ca5c
mov eax, dword [ebp + 0x420]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp eax, ebx
jne 0x40cd65
push 0x80004003
call fcn.00426d60
mov ecx, dword [eax]
push 0xffffffffffffffff
push eax
call dword [ecx + 0x4c]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp eax, ebx
je 0x40cd5b
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x50]
cmp dword [ebp + 0x420], ebx
je 0x40cdb8
push str.version1.0_encodingutf_8
lea ecx, [ebp - 0x10]
call fcn.004085ef
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040cc11
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x40cf71
call fcn.0040aacc
jmp 0x40cf71
mov eax, dword [edi]
mov dword [ebp - 0x1c], ebx
cmp eax, ebx
je 0x40cdc5
mov eax, dword [eax]
jmp 0x40cdc7
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ce16
push edi
lea ecx, [ebp - 0x40]
call fcn.00408653
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
mov dword [ebp - 4], 1
cmp ecx, ebx
je 0x40cd5b
mov edx, dword [ecx]
lea esi, [ebp - 0x1c]
push esi
sub esp, 0x10
mov edi, esp
mov esi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ecx
movsd dword es:[edi], dword [esi]
call dword [edx + 0x30]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
jmp 0x40cf64
mov dword [ebp - 0x14], 0x80004005
call fcn.0040af59
mov esi, eax
cmp esi, ebx
je 0x40cf64
mov eax, dword [edi]
cmp eax, ebx
je 0x40ce36
mov eax, dword [eax]
jmp 0x40ce38
xor eax, eax
mov ecx, dword [esi]
push eax
push ebx
push esi
call dword [ecx + 0x10]
cmp eax, ebx
mov dword [ebp - 0x20], eax
jle 0x40cf64
push eax
call fcn.0042756b
pop ecx
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x40cf64
push dword [ebp - 0x20]
push ebx
push eax
call fcn.004270e0
mov edi, dword [edi]
add esp, 0xc
cmp edi, ebx
je 0x40ce74
mov edi, dword [edi]
jmp 0x40ce76
xor edi, edi
push dword [ebp - 0x20]
mov eax, dword [esi]
push dword [ebp - 0x10]
push edi
push ebx
push esi
call dword [eax + 0x14]
mov esi, 0x208
push esi
lea eax, [ebp]
push ebx
push eax
call fcn.004270e0
add esp, 0xc
lea eax, [ebp]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
lea eax, [ebp + 0x208]
push ebx
push eax
call fcn.004270e0
mov eax, dword [0x45e7d8]
add esp, 0xc
inc dword [0x45e7d8]
lea ecx, [ebp + 0x208]
push ecx
push eax
push 0x44be60
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp + 0x208]
push 0x44be58
push eax
call fcn.0042934b
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x40cf5b
push esi
push 1
push dword [ebp - 0x20]
push dword [ebp - 0x10]
call fcn.00429203
push esi
call fcn.00429025
add esp, 0x14
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x30]
call fcn.00407bb7
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
mov dword [ebp - 4], 2
cmp ecx, ebx
je 0x40cd5b
mov edx, dword [ecx]
lea esi, [ebp - 0x1c]
push esi
sub esp, 0x10
mov edi, esp
mov esi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ecx
movsd dword es:[edi], dword [esi]
call dword [edx + 0x30]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x10]
call fcn.00427635
pop ecx
cmp word [ebp - 0x1c], bx
jne 0x40cf71
mov dword [ebp - 0x14], 0x80004005
cmp dword [ebp - 0x14], ebx
jge 0x40cf7f
mov ecx, dword [ebp - 0x18]
push ebx
call fcn.00408a6e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00427096
add ebp, 0x414
leave
ret 8