Function at 0x4a5586
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 [0x52de80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
push 0x400
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], esi
mov eax, dword [edi]
call dword [eax + 4]
push dword [edi + 8]
lea ecx, [ebp - 0x34]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x1c]
call fcn.00408670
push eax
call fcn.0040a710
pop ecx
lea ecx, [ebp - 0x1c]
mov bl, al
call fcn.004086c0
push esi
push 1
lea ecx, [ebp - 0x34]
call fcn.00402540
test bl, bl
je 0x4a568a
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.004045f0
push 1
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.0040a150
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
call fcn.004086c0
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 8]
push str.MoveNewVerToInstallDir_KFunction::DeleteFolder__ws_recode_d
push 0x55913c
call fcn.004a9ba2
add esp, 0x10
lea ecx, [ebp - 0x1c]
push dword [edi + 8]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.0040a710
pop ecx
lea ecx, [ebp - 0x34]
mov bl, al
call fcn.004086c0
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
test bl, bl
je 0x4a568a
push dword [edi + 8]
push str.______DirectoryExists__ws
push 0x55913c
call fcn.004a9ba2
push 1
push 1
push dword [edi + 8]
call fcn.0049b814
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 0x55913c
call fcn.004a9ba2
add esp, 0x18
test ebx, ebx
jne 0x4a57e4
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.0040a710
mov bl, al
pop ecx
neg bl
lea ecx, [ebp - 0x34]
sbb bl, bl
call fcn.004086c0
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
inc bl
je 0x4a5798
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.00411f30
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.004086c0
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MoveNewVerToInstallDir_file_util_CreateDirectory_bRet_d_error_d
push 0x55913c
call fcn.004a9ba2
add esp, 0x10
test esi, esi
jne 0x4a5798
xor ebx, ebx
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.00411f30
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.004086c0
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
test esi, esi
jne 0x4a5798
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 3
jl 0x4a5751
lea eax, [edi + 0xfc]
push eax
lea esi, [edi + 0xf0]
push esi
push 1
push dword [edi + 8]
push dword [edi + 0x1c]
call fcn.0049d409
add esp, 0x14
xor ebx, ebx
test eax, eax
setns bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi]
mov esi, eax
mov dword [ebp - 0x74], eax
push esi
push ebx
push dword [edi + 8]
push dword [edi + 0x1c]
push str.MoveNewVerToInstallDir_KFunction::MoveInstallToOldDir_src_ws_dst_ws_MoveFileEx_bRet_d_error_d_errfile_ws
push 0x55913c
call fcn.004a9ba2
add esp, 0x1c
mov dword [edi + 0x78], esi
test ebx, ebx
je 0x4a5994
mov eax, dword [edi + 0x18]
push 0x10
pop esi
sub eax, esi
push eax
call fcn.00425bf9
add eax, esi
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 4]
sub eax, esi
push eax
call fcn.00425bf9
add eax, esi
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x70]
push eax
call fcn.0049dc09
lea eax, [ebp - 0x68]
push eax
call fcn.0049dc09
mov esi, str.browserpacket.xml
push esi
call fcn.004241e6
add esp, 0x14
lea ecx, [ebp - 0x68]
push eax
push esi
call fcn.0043ae55
push esi
call fcn.004241e6
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0043ae55
push dword [ebp - 0x68]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a58d1
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 0x4a58d1
call fcn.00420e4a
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e50
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push dword [ebp - 0x68]
lea eax, [ebp - 0x6c]
push 0x4fa350
push eax
call fcn.0042443a
mov esi, dword [ebp - 0x6c]
push esi
push dword [ebp - 0x68]
call fcn.004c0e0c
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 0x55913c
call fcn.004a9ba2
add esp, 0x10
lea ecx, [esi - 0x10]
call fcn.0042095b
mov edi, dword [ebp - 0x78]
push dword [ebp - 0x68]
mov esi, dword [ebp - 0x70]
lea ecx, [ebp - 0x4c]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x64]
call fcn.00408670
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.004045f0
push eax
lea ecx, [ebp - 0x34]
call fcn.00408670
push eax
call fcn.00411dd0
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
movzx ebx, al
call fcn.004086c0
xor esi, esi
lea ecx, [ebp - 0x1c]
push esi
push 1
call fcn.00402540
lea ecx, [ebp - 0x64]
call fcn.004086c0
push esi
push 1
lea ecx, [ebp - 0x4c]
call fcn.00402540
test ebx, ebx
jne 0x4a5961
push esi
push dword [ebp - 0x68]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
test ebx, ebx
jne 0x4a5954
lea eax, [ebp - 0x68]
push eax
lea ecx, [edi + 0xf0]
call fcn.00425b83
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x74], esi
jmp 0x4a5964
mov esi, dword [ebp - 0x74]
push esi
push ebx
push str.MoveNewVerToInstallDir_xmlfile_Move_bRet_d_error_d
push 0x55913c
call fcn.004a9ba2
mov ecx, dword [ebp - 0x68]
add esp, 0x10
xor ebx, ebx
mov dword [edi + 0x78], esi
inc ebx
lea ecx, [ecx - 0x10]
call fcn.0042095b
mov ecx, dword [ebp - 0x70]
lea ecx, [ecx - 0x10]
call fcn.0042095b
call fcn.00420e4a
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e50
call fcn.00420e4a
push eax
lea ecx, [ebp - 0x70]
call fcn.00423e50
lea eax, [ebp - 0x6c]
mov ecx, edi
push eax
call fcn.004a2486
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
call fcn.004a2427
mov edi, dword [ebp - 0x6c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a5a1d
call fcn.00420e4a
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e50
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
lea eax, [ebp - 0x6c]
push 0x4fa350
push eax
call fcn.0042443a
mov esi, dword [ebp - 0x6c]
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test ebx, ebx
je 0x4a5a15
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esi - 0x10]
call fcn.0042095b
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 0x55913c
call fcn.004a9ba2
mov ecx, dword [ebp - 0x78]
add esp, 0x14
mov eax, dword [ebp - 0x74]
mov edx, dword [ecx]
push eax
push ebx
push 0x400
call dword [edx + 8]
lea ecx, [esi - 0x10]
call fcn.0042095b
lea ecx, [edi - 0x10]
call fcn.0042095b
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc45f
mov esp, ebp
pop ebp
ret