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

Disassembly:
push 0x44c
mov eax, 0x4b43b0
call fcn.00476679
mov esi, dword [ebp + 8]
mov ebx, ecx
lea edi, [ebx + 4]
push edi
mov dword [ebp - 0x430], edi
call fcn.00411d18
pop ecx
test eax, eax
jl 0x4122b1
push esi
lea ecx, [ebx + 8]
call fcn.00411d3f
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [edi]
test eax, eax
jne 0x411fcd
push 0x80004003
call fcn.00474fa0
mov ecx, dword [eax]
push 0xffffffffffffffff
push eax
call dword [ecx + 0x4c]
mov eax, dword [edi]
test eax, eax
je 0x411fc3
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x50]
mov eax, dword [esi]
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
je 0x412093
mov dword [ebp - 0x42c], ecx
cmp eax, ecx
je 0x411ffe
mov eax, dword [eax]
jmp 0x412000
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x412050
push esi
lea ecx, [ebp - 0x448]
call fcn.0040298f
and dword [ebp - 4], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x411fc3
mov edx, dword [ecx]
lea esi, [ebp - 0x42c]
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]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov edi, dword [ebp - 0x430]
push 0x4d58ac
lea ecx, [ebp - 0x424]
call fcn.004028ab
lea eax, [ebp - 0x424]
push eax
mov ecx, ebx
mov dword [ebp - 4], 1
call fcn.00411e55
mov ecx, dword [ebp - 0x424]
mov dword [ebp - 0x428], eax
test ecx, ecx
je 0x412299
call fcn.00402944
jmp 0x412299
mov dword [ebp - 0x434], ecx
cmp eax, ecx
je 0x4120a1
mov eax, dword [eax]
jmp 0x4120a3
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4120fd
push esi
lea ecx, [ebp - 0x448]
call fcn.0040298f
mov dword [ebp - 4], 2
mov ecx, dword [edi]
test ecx, ecx
je 0x411fc3
mov edx, dword [ecx]
lea esi, [ebp - 0x434]
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 - 0x428], eax
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
xor ebx, ebx
jmp 0x412280
mov dword [ebp - 0x428], 0x80004005
call fcn.00411f41
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x412280
mov eax, dword [esi]
cmp eax, ebx
je 0x412122
mov eax, dword [eax]
jmp 0x412124
xor eax, eax
mov ecx, dword [edi]
push eax
push ebx
push edi
call dword [ecx + 0x10]
cmp eax, ebx
mov dword [ebp - 0x42c], eax
jle 0x412280
push eax
call fcn.004776ed
pop ecx
mov dword [ebp - 0x424], eax
cmp eax, ebx
je 0x412280
push dword [ebp - 0x42c]
push ebx
push eax
call fcn.00475570
mov esi, dword [esi]
add esp, 0xc
cmp esi, ebx
je 0x412169
mov esi, dword [esi]
jmp 0x41216b
xor esi, esi
push dword [ebp - 0x42c]
mov eax, dword [edi]
push dword [ebp - 0x424]
push esi
push ebx
push edi
call dword [eax + 0x14]
mov esi, 0x208
push esi
lea eax, [ebp - 0x420]
push ebx
push eax
call fcn.00475570
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.00475570
mov eax, dword [0x4f7224]
add esp, 0xc
inc dword [0x4f7224]
lea ecx, [ebp - 0x218]
push ecx
push eax
push 0x4d58ec
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
push 0x4d58f4
push eax
call fcn.00477687
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x412274
push esi
push 1
push dword [ebp - 0x42c]
push dword [ebp - 0x424]
call fcn.0047753f
push esi
call fcn.00477361
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00411f52
mov ecx, dword [ebp - 0x430]
mov dword [ebp - 4], 3
mov ecx, dword [ecx]
cmp ecx, ebx
je 0x411fc3
mov edx, dword [ecx]
lea esi, [ebp - 0x434]
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 - 0x428], eax
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x424]
call fcn.0047725c
pop ecx
mov edi, dword [ebp - 0x430]
cmp word [ebp - 0x434], bx
jne 0x412299
mov dword [ebp - 0x428], 0x80004005
cmp dword [ebp - 0x428], 0
jge 0x4122ab
push 0
mov ecx, edi
call fcn.00411463
mov eax, dword [ebp - 0x428]
call fcn.004766fc
ret 8