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

Disassembly:
push 0x44c
mov eax, 0x4b3920
call fcn.00475ac8
mov esi, dword [ebp + 8]
mov ebx, ecx
lea edi, [ebx + 4]
push edi
mov dword [ebp - 0x430], edi
call fcn.00411e07
pop ecx
test eax, eax
jl 0x4123c3
push esi
lea ecx, [ebx + 8]
call fcn.00411e2e
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [edi]
test eax, eax
jne 0x4120df
push 0x80004003
call fcn.004744a0
mov ecx, dword [eax]
push 0xffffffffffffffff
push eax
call dword [ecx + 0x4c]
mov eax, dword [edi]
test eax, eax
je 0x4120d5
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 0x4121a5
mov dword [ebp - 0x42c], ecx
cmp eax, ecx
je 0x412110
mov eax, dword [eax]
jmp 0x412112
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x412162
push esi
lea ecx, [ebp - 0x448]
call fcn.00402af3
and dword [ebp - 4], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x4120d5
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 0x4d47d4
lea ecx, [ebp - 0x424]
call fcn.00402a0f
lea eax, [ebp - 0x424]
push eax
mov ecx, ebx
mov dword [ebp - 4], 1
call fcn.00411f67
mov ecx, dword [ebp - 0x424]
mov dword [ebp - 0x428], eax
test ecx, ecx
je 0x4123ab
call fcn.00402aa8
jmp 0x4123ab
mov dword [ebp - 0x434], ecx
cmp eax, ecx
je 0x4121b3
mov eax, dword [eax]
jmp 0x4121b5
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41220f
push esi
lea ecx, [ebp - 0x448]
call fcn.00402af3
mov dword [ebp - 4], 2
mov ecx, dword [edi]
test ecx, ecx
je 0x4120d5
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 0x412392
mov dword [ebp - 0x428], 0x80004005
call fcn.00412053
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x412392
mov eax, dword [esi]
cmp eax, ebx
je 0x412234
mov eax, dword [eax]
jmp 0x412236
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 0x412392
push eax
call fcn.00476b1d
pop ecx
mov dword [ebp - 0x424], eax
cmp eax, ebx
je 0x412392
push dword [ebp - 0x42c]
push ebx
push eax
call fcn.00474a10
mov esi, dword [esi]
add esp, 0xc
cmp esi, ebx
je 0x41227b
mov esi, dword [esi]
jmp 0x41227d
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.00474a10
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.00474a10
mov eax, dword [0x4f6234]
add esp, 0xc
inc dword [0x4f6234]
lea ecx, [ebp - 0x218]
push ecx
push eax
push 0x4d4814
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
push 0x4d481c
push eax
call fcn.00476ab7
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x412386
push esi
push 1
push dword [ebp - 0x42c]
push dword [ebp - 0x424]
call fcn.0047696f
push esi
call fcn.00476791
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00412064
mov ecx, dword [ebp - 0x430]
mov dword [ebp - 4], 3
mov ecx, dword [ecx]
cmp ecx, ebx
je 0x4120d5
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.0047668c
pop ecx
mov edi, dword [ebp - 0x430]
cmp word [ebp - 0x434], bx
jne 0x4123ab
mov dword [ebp - 0x428], 0x80004005
cmp dword [ebp - 0x428], 0
jge 0x4123bd
push 0
mov ecx, edi
call fcn.00402be9
mov eax, dword [ebp - 0x428]
call fcn.00475b4b
ret 8