Function at 0x416fe0
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file

Disassembly:
push 0xffffffffffffffff
push 0x5b7bd1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x294
mov eax, dword [esp + 0x2b0]
mov ecx, dword [esp + 0x2ac]
push ebx
mov edx, dword [esp + 0x2a8]
push ebp
push esi
mov esi, dword [esp + 0x2b4]
push edi
push eax
push ecx
mov ebx, dword [esi + 0xc]
mov ebp, dword [esi + 8]
push ebx
push ebp
push edx
push str.SaveLib2_dwType_0x_x__dwRecordSize_0x_x___dwStoreFlag_0x_x__lpBuff_0x_x___dwSize_0x_x_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov eax, dword [0x61cab0]
add esp, 0x24
xor edi, edi
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x9c]
mov dword [esp + 0x2ac], edi
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x2b4]
push eax
lea eax, [esp + 0xa0]
push edx
push eax
lea ecx, [esp + 0x20]
push str._sopl__lu__lu.tmp
push ecx
call fcn.0059a7f7
mov edx, dword [esp + 0x28]
add esp, 0x14
push edx
push str.SaveLib2_temp__s_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov ecx, dword [esp + 0x2d4]
mov edx, dword [esp + 0x2d0]
add esp, 0x14
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], edi
push eax
push ecx
push edx
mov ecx, esi
call fcn.004172e0
test eax, eax
mov dword [esp + 0x18], eax
je 0x4171b0
mov eax, dword [esi + 4]
mov esi, dword [esi]
push 1
push eax
push ebx
push ebp
lea ecx, [esp + 0x34]
mov dword [esp + 0x30], eax
call fcn.0043a7c0
push str.SaveLib2_Open
push str.CheckModule
push 0xf
push 0x642404
mov byte [esp + 0x2bc], 1
call fcn.004439a0
mov eax, dword [esp + 0x24]
add esp, 0x10
lea ecx, [esp + 0x24]
push edi
push eax
call fcn.0043a930
mov edi, eax
test edi, edi
je 0x417192
push str.SaveLib2_WriteExtraHead
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov ecx, dword [esp + 0x30]
add esp, 0x10
push ecx
push esi
lea ecx, [esp + 0x2c]
call fcn.0043bb60
mov edi, eax
test edi, edi
je 0x417189
push str.SaveLib2_Append
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
add esp, 0x10
lea ecx, [esp + 0x24]
push edx
push eax
call fcn.0043c0a0
lea ecx, [esp + 0x24]
mov edi, eax
call fcn.0043c330
lea ecx, [esp + 0x24]
call fcn.0043b3b0
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0059e281
add esp, 4
lea ecx, [esp + 0x24]
mov byte [esp + 0x2ac], 0
call fcn.0043a8b0
mov edx, dword [0x61cab0]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x2b4]
mov byte [esp + 0x2ac], 2
push eax
call fcn.004100c0
add esp, 4
test eax, eax
jne 0x417201
lea ecx, [esp + 0x10]
mov byte [esp + 0x2ac], al
call fcn.0059db8f
lea ecx, [esp + 0x14]
mov dword [esp + 0x2ac], 0xffffffff
call fcn.0059db8f
xor eax, eax
jmp 0x4172c4
mov ecx, dword [0x639d18]
push eax
push ecx
lea edx, [esp + 0x18]
push str._s_tsafedoc_s
push edx
call fcn.0059a7f7
mov eax, dword [esp + 0x20]
add esp, 0x10
push eax
push str.SaveLib2_dst__s_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
add esp, 0x14
test edi, edi
jne 0x417261
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x417254
mov esi, 1
jmp 0x417283
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x417281
mov eax, dword [0x639d2c]
mov ecx, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 2
add eax, 3
push eax
mov eax, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
push esi
push str.SaveLib2_ret__lu_
push str.CheckModule
push 0xf
push 0x642404
call fcn.004439a0
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x2ac], 0
call fcn.0059db8f
lea ecx, [esp + 0x14]
mov dword [esp + 0x2ac], 0xffffffff
call fcn.0059db8f
mov eax, esi
mov ecx, dword [esp + 0x2a4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2a0
ret