Function at 0x405577
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 [0x479f14]
xor eax, ebp
mov dword [ebp + 0x410], eax
push 0x34
mov eax, 0x45bb9c
call fcn.0043ac8b
mov edi, dword [ebp + 0x41c]
mov esi, ecx
lea eax, [esi + 4]
push eax
mov dword [ebp - 0x18], eax
call fcn.00403259
xor ebx, ebx
cmp eax, ebx
pop ecx
jl 0x4057fc
push edi
lea ecx, [esi + 8]
call fcn.004053d0
mov eax, dword [ebp + 0x420]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp eax, ebx
jne 0x4055df
push 0x80004003
call fcn.00433710
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 0x4055d5
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x50]
cmp dword [ebp + 0x420], ebx
je 0x405632
push str.version1.0_encodingutf_8
lea ecx, [ebp - 0x10]
call fcn.00401dd3
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040548b
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x4057eb
call fcn.0040402d
jmp 0x4057eb
mov eax, dword [edi]
mov dword [ebp - 0x1c], ebx
cmp eax, ebx
je 0x40563f
mov eax, dword [eax]
jmp 0x405641
xor eax, eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405690
push edi
lea ecx, [ebp - 0x40]
call fcn.00401e37
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
mov dword [ebp - 4], 1
cmp ecx, ebx
je 0x4055d5
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 0x4057de
mov dword [ebp - 0x14], 0x80004005
call fcn.0040203d
mov esi, eax
cmp esi, ebx
je 0x4057de
mov eax, dword [edi]
cmp eax, ebx
je 0x4056b0
mov eax, dword [eax]
jmp 0x4056b2
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 0x4057de
push eax
call fcn.0043af83
pop ecx
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x4057de
push dword [ebp - 0x20]
push ebx
push eax
call fcn.0043a190
mov edi, dword [edi]
add esp, 0xc
cmp edi, ebx
je 0x4056ee
mov edi, dword [edi]
jmp 0x4056f0
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.0043a190
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.0043a190
mov eax, dword [0x4771d8]
add esp, 0xc
inc dword [0x4771d8]
lea ecx, [ebp + 0x208]
push ecx
push eax
push 0x460ba0
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp + 0x208]
push 0x460b98
push eax
call fcn.0043b4bd
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x4057d5
push esi
push 1
push dword [ebp - 0x20]
push dword [ebp - 0x10]
call fcn.0043b375
push esi
call fcn.0043b197
add esp, 0x14
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401644
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
mov dword [ebp - 4], 2
cmp ecx, ebx
je 0x4055d5
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.0043a3fc
pop ecx
cmp word [ebp - 0x1c], bx
jne 0x4057eb
mov dword [ebp - 0x14], 0x80004005
cmp dword [ebp - 0x14], ebx
jge 0x4057f9
mov ecx, dword [ebp - 0x18]
push ebx
call fcn.00402265
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.0043a7c3
add ebp, 0x414
leave
ret 8