Function at 0x46eefe
Capabilities:
Check if file exists
Copy file
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x4eb664]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
mov eax, dword [edi]
push 0x400
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], esi
call dword [eax + 4]
push dword [edi + 8]
lea ecx, [ebp - 0x34]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x1c]
call fcn.0047a0b4
push eax
call fcn.0047b0b6
pop ecx
lea ecx, [ebp - 0x1c]
mov bl, al
call fcn.0047a0fe
push esi
push 1
lea ecx, [ebp - 0x34]
call fcn.00405ac5
test bl, bl
je 0x46f002
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push 1
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047ae3f
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
call fcn.0047a0fe
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00405ac5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 8]
push str.MoveNewVerToInstallDir_KFunction::DeleteFolder__ws_recode_d
push 0x4eee98
call fcn.004738c9
add esp, 0x10
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047b0b6
pop ecx
lea ecx, [ebp - 0x34]
mov bl, al
call fcn.0047a0fe
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00405ac5
test bl, bl
je 0x46f002
push dword [edi + 8]
push str.______DirectoryExists__ws
push 0x4eee98
call fcn.004738c9
push 1
push 1
push dword [edi + 8]
call fcn.004661a4
add esp, 0x18
push 0xb
push dword [edi + 8]
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push dword [edi + 8]
push dword [edi + 0x1c]
push str.MoveNewVerToInstallDir_src_ws_dst_ws_MoveFileEx_bRet_d_error_d
push 0x4eee98
call fcn.004738c9
add esp, 0x18
test ebx, ebx
jne 0x46f15c
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047b0b6
mov bl, al
pop ecx
neg bl
lea ecx, [ebp - 0x34]
sbb bl, bl
call fcn.0047a0fe
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00405ac5
inc bl
je 0x46f110
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047e2df
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.0047a0fe
lea ecx, [ebp - 0x1c]
push 0
push 1
call fcn.00405ac5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MoveNewVerToInstallDir_file_util_CreateDirectory_bRet_d_error_d
push 0x4eee98
call fcn.004738c9
add esp, 0x10
test esi, esi
jne 0x46f110
xor ebx, ebx
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047e2df
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.0047a0fe
lea ecx, [ebp - 0x1c]
push 0
push 1
call fcn.00405ac5
test esi, esi
jne 0x46f110
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 3
jl 0x46f0c9
lea eax, [edi + 0xf8]
push eax
lea esi, [edi + 0xec]
push esi
push 1
push dword [edi + 8]
push dword [edi + 0x1c]
call fcn.00467f2d
add esp, 0x14
xor ebx, ebx
test eax, eax
setns bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi]
mov esi, eax
push esi
push ebx
push dword [edi + 8]
mov dword [ebp - 0x74], eax
push dword [edi + 0x1c]
push str.MoveNewVerToInstallDir_KFunction::MoveInstallToOldDir_src_ws_dst_ws_MoveFileEx_bRet_d_error_d_errfile_ws
push 0x4eee98
call fcn.004738c9
add esp, 0x1c
mov dword [edi + 0x78], esi
mov esi, 0x4eb630
test ebx, ebx
je 0x46f315
mov eax, dword [edi + 0x18]
push 0x10
pop esi
sub eax, esi
push eax
call fcn.00406c4d
add eax, esi
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 4]
sub eax, esi
push eax
call fcn.00406c4d
add eax, esi
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x70]
push eax
call fcn.00468709
lea eax, [ebp - 0x68]
push eax
call fcn.00468709
mov esi, str.browserpacket.xml
push esi
call fcn.0040481a
add esp, 0x14
lea ecx, [ebp - 0x68]
push eax
push esi
call fcn.0041e1c3
push esi
call fcn.0040481a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0041e1c3
push dword [ebp - 0x68]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46f24d
push 0x80
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x46f24d
push 0x4eb630
lea ecx, [ebp - 0x6c]
call fcn.004044ee
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push dword [ebp - 0x68]
lea eax, [ebp - 0x6c]
push str._s_d__x
push eax
call fcn.00404994
mov esi, dword [ebp - 0x6c]
push esi
push dword [ebp - 0x68]
call fcn.00493b54
add esp, 0x18
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.MoveNewVerToInstallDir__trename_nRet_d_errcode_d
push 0x4eee98
call fcn.004738c9
add esp, 0x10
lea ecx, [esi - 0x10]
call fcn.00404f8d
mov edi, dword [ebp - 0x78]
push dword [ebp - 0x68]
mov esi, dword [ebp - 0x70]
lea ecx, [ebp - 0x4c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x64]
call fcn.0047a0b4
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.0040513a
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a0b4
push eax
call fcn.0047e2f0
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
movzx ebx, al
call fcn.0047a0fe
xor esi, esi
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00405ac5
lea ecx, [ebp - 0x64]
call fcn.0047a0fe
push esi
push 1
lea ecx, [ebp - 0x4c]
call fcn.00405ac5
test ebx, ebx
jne 0x46f2dd
push esi
push dword [ebp - 0x68]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
test ebx, ebx
jne 0x46f2d0
lea eax, [ebp - 0x68]
push eax
lea ecx, [edi + 0xec]
call fcn.00406bd9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x74], esi
jmp 0x46f2e0
mov esi, dword [ebp - 0x74]
push esi
push ebx
push str.MoveNewVerToInstallDir_xmlfile_Move_bRet_d_error_d
push 0x4eee98
call fcn.004738c9
mov ecx, dword [ebp - 0x68]
xor ebx, ebx
add esp, 0x10
lea ecx, [ecx - 0x10]
mov dword [edi + 0x78], esi
inc ebx
call fcn.00404f8d
mov ecx, dword [ebp - 0x70]
lea ecx, [ecx - 0x10]
call fcn.00404f8d
mov esi, 0x4eb630
push esi
lea ecx, [ebp - 0x6c]
call fcn.004044ee
push esi
lea ecx, [ebp - 0x70]
call fcn.004044ee
lea eax, [ebp - 0x6c]
push eax
mov ecx, edi
call fcn.0046bff3
lea eax, [ebp - 0x70]
push eax
mov ecx, edi
call fcn.0046bf97
mov edi, dword [ebp - 0x6c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46f398
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x46f398
push esi
lea ecx, [ebp - 0x6c]
call fcn.004044ee
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
lea eax, [ebp - 0x6c]
push str._s_d__x
push eax
call fcn.00404994
mov esi, dword [ebp - 0x6c]
push esi
push edi
call fcn.00493b54
add esp, 0x18
test ebx, ebx
jne 0x46f390
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esi - 0x10]
call fcn.00404f8d
mov esi, dword [ebp - 0x70]
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str.CopyFile__ws_to__ws_error_d_r_n
push 0x4eee98
call fcn.004738c9
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x78]
add esp, 0x14
mov edx, dword [ecx]
push eax
push ebx
push 0x400
call dword [edx + 8]
lea ecx, [esi - 0x10]
call fcn.00404f8d
lea ecx, [edi - 0x10]
call fcn.00404f8d
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0048f059
leave
ret