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

Disassembly:
push 0xffffffffffffffff
push 0x5a18d1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x27c
mov eax, dword [esp + 0x294]
mov ecx, dword [esp + 0x290]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2a4]
push edi
mov edi, dword [esp + 0x29c]
push esi
push eax
push ecx
push edi
push str.SaveLib4_dwType_0x_x__dwStoreFlag_0x_x__lpBuff_0x_x__dwSize_0x_x_
push str.CheckModule
push 0xf
push 0x6292fc
call fcn.00440080
mov edx, dword [0x603f10]
xor ebx, ebx
add esp, 0x20
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], edx
lea eax, [esp + 0x84]
mov dword [esp + 0x294], ebx
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [esp + 0x88]
push edi
push ecx
lea edx, [esp + 0x30]
push str._sopl__lu__lu.tmp
push edx
call fcn.00584d3d
mov eax, dword [esp + 0x38]
add esp, 0x14
push eax
push str.SaveLib4_temp__s_
push str.CheckModule
push 0xf
push 0x6292fc
call fcn.00440080
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x4a]
mov word [esp + 0x48], bx
rep stosd dword es:[edi], eax
add esp, 0x14
lea ecx, [esp + 0x14]
stosw word es:[edi], ax
mov dword [esp + 0x34], ebx
call fcn.005888e5
mov ecx, dword [esp + 0x24]
push ebx
push 0x10c2
push ecx
lea ecx, [esp + 0x20]
mov byte [esp + 0x2a0], 1
xor ebp, ebp
mov dword [esp + 0x38], ebx
call fcn.00588a97
test eax, eax
je 0x41017e
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], 1
call fcn.00588d91
cmp eax, 0x28
ja 0x410025
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x5e]
mov word [esp + 0x5c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.LIB_HEAD
mov dword [esp + 0x60], ebx
call fcn.0044c0ec
push eax
lea edx, [esp + 0x64]
push 0x5fca38
push edx
call fcn.0044c109
mov eax, dword [esp + 0x2b0]
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x74], eax
push ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
call fcn.00588d65
mov edx, dword [esp + 0x14]
push ebx
push ebx
lea ecx, [esp + 0x1c]
call dword [edx + 0x28]
lea eax, [esp + 0x5c]
push 0x28
push eax
lea ecx, [esp + 0x1c]
call fcn.00588bee
mov edx, dword [esp + 0x14]
push ebx
push ebx
lea ecx, [esp + 0x1c]
call dword [edx + 0x28]
lea eax, [esp + 0x34]
push 0x28
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3c], ebx
call fcn.00588bb4
cmp eax, 0x28
jne 0x41016f
mov ecx, dword [esp + 0x2a0]
mov eax, dword [esp + 0x4c]
cmp eax, ecx
jne 0x41016f
mov edi, dword [esp + 0x2a4]
cmp edi, ebx
je 0x4100b1
cmp esi, ebx
jbe 0x4100b1
mov edx, dword [esp + 0x14]
push 2
push ebx
lea ecx, [esp + 0x1c]
call dword [edx + 0x28]
push esi
push edi
lea ecx, [esp + 0x1c]
call fcn.00588bee
mov edi, dword [esp + 0x50]
mov eax, dword [esp + 0x14]
add edi, esi
push ebx
push ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x58], edi
call dword [eax + 0x28]
lea ecx, [esp + 0x34]
push 0x28
push ecx
lea ecx, [esp + 0x1c]
call fcn.00588bee
lea ecx, [esp + 0x14]
call fcn.00588d91
mov edx, dword [esp + 0x14]
push ebx
push ebx
lea ecx, [esp + 0x1c]
mov edi, eax
call dword [edx + 0x28]
lea eax, [esp + 0x34]
push 0x28
push eax
lea ecx, [esp + 0x1c]
call fcn.00588bb4
mov esi, dword [esp + 0x50]
lea ecx, [esi + 0x28]
cmp ecx, edi
jne 0x41016f
cmp esi, ebx
jbe 0x410142
push esi
call fcn.0058879e
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x41016f
push ebx
push 0x28
lea ecx, [esp + 0x1c]
call fcn.00588c39
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00588bb4
cmp eax, esi
jne 0x41015c
push esi
push ebp
push ebx
call fcn.00477180
mov edx, dword [esp + 0x20]
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x54], eax
push ebx
push ebx
call dword [edx + 0x28]
lea eax, [esp + 0x34]
push 0x28
push eax
lea ecx, [esp + 0x1c]
call fcn.00588bee
lea ecx, [esp + 0x14]
call fcn.00588cb2
mov eax, 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
cmp ebp, ebx
je 0x410169
push ebp
call fcn.005887c7
add esp, 4
cmp dword [esp + 0x30], ebx
je 0x410178
lea ecx, [esp + 0x14]
call fcn.00588cb2
cmp dword [esp + 0x2c], ebx
jne 0x410182
mov dword [esp + 0x28], ebx
mov ecx, dword [0x603f10]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x29c]
mov byte [esp + 0x294], 2
push edx
call fcn.0040f670
add esp, 4
cmp eax, ebx
jne 0x4101e4
lea ecx, [esp + 0x10]
mov byte [esp + 0x294], 1
call fcn.005880d5
lea ecx, [esp + 0x14]
mov byte [esp + 0x294], bl
call fcn.005889da
lea ecx, [esp + 0x24]
mov dword [esp + 0x294], 0xffffffff
call fcn.005880d5
xor eax, eax
jmp 0x4102bb
push eax
mov eax, dword [0x620c14]
push eax
lea ecx, [esp + 0x18]
push 0x5f8c58
push ecx
call fcn.00584d3d
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
add esp, 0x10
push esi
push edx
push str.SaveLib4_dst__s__ret_:__d_
push str.CheckModule
push 0xf
push 0x6292fc
call fcn.00440080
add esp, 0x18
cmp esi, ebx
jne 0x410248
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41023b
mov esi, 1
jmp 0x41026a
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x410268
mov eax, dword [0x620c28]
mov edx, dword [esp + 0x10]
neg eax
sbb eax, eax
and eax, 2
add eax, 3
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
push esi
push str.SaveLib4_ret__lu_
push str.CheckModule
push 0xf
push 0x6292fc
call fcn.00440080
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x294], 1
call fcn.005880d5
lea ecx, [esp + 0x14]
mov byte [esp + 0x294], bl
call fcn.005889da
lea ecx, [esp + 0x24]
mov dword [esp + 0x294], 0xffffffff
call fcn.005880d5
mov eax, esi
mov ecx, dword [esp + 0x28c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x288
ret