Function at 0x4a54c2
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 [0x52fe80]
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.00406c40
push eax
lea ecx, [ebp - 0x1c]
call fcn.004086d0
push eax
call fcn.0040a8f0
pop ecx
lea ecx, [ebp - 0x1c]
mov bl, al
call fcn.00408720
push esi
push 1
lea ecx, [ebp - 0x34]
call fcn.00403650
test bl, bl
je 0x4a55c6
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.00406c40
push 1
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.0040a420
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
call fcn.00408720
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00403650
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 8]
push str.MoveNewVerToInstallDir_KFunction::DeleteFolder__ws_recode_d
push 0x55b31c
call fcn.004a9913
add esp, 0x10
lea ecx, [ebp - 0x1c]
push dword [edi + 8]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.0040a8f0
pop ecx
lea ecx, [ebp - 0x34]
mov bl, al
call fcn.00408720
push esi
push 1
lea ecx, [ebp - 0x1c]
call fcn.00403650
test bl, bl
je 0x4a55c6
push dword [edi + 8]
push str.______DirectoryExists__ws
push 0x55b31c
call fcn.004a9913
push 1
push 1
push dword [edi + 8]
call fcn.0049bbe6
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 0x55b31c
call fcn.004a9913
add esp, 0x18
test ebx, ebx
jne 0x4a5720
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.0040a8f0
mov bl, al
pop ecx
neg bl
lea ecx, [ebp - 0x34]
sbb bl, bl
call fcn.00408720
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00403650
inc bl
je 0x4a56d4
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.00412220
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.00408720
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00403650
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MoveNewVerToInstallDir_file_util_CreateDirectory_bRet_d_error_d
push 0x55b31c
call fcn.004a9913
add esp, 0x10
test esi, esi
jne 0x4a56d4
xor ebx, ebx
push dword [edi + 8]
lea ecx, [ebp - 0x1c]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.00412220
pop ecx
lea ecx, [ebp - 0x34]
movzx esi, al
call fcn.00408720
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00403650
test esi, esi
jne 0x4a56d4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 3
jl 0x4a568d
lea eax, [edi + 0xfc]
push eax
lea esi, [edi + 0xf0]
push esi
push 1
push dword [edi + 8]
push dword [edi + 0x1c]
call fcn.0049d7db
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 0x55b31c
call fcn.004a9913
add esp, 0x1c
mov dword [edi + 0x78], esi
test ebx, ebx
je 0x4a58d0
mov eax, dword [edi + 0x18]
push 0x10
pop esi
sub eax, esi
push eax
call fcn.00425cc0
add eax, esi
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 4]
sub eax, esi
push eax
call fcn.00425cc0
add eax, esi
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x70]
push eax
call fcn.0049dfdb
lea eax, [ebp - 0x68]
push eax
call fcn.0049dfdb
mov esi, str.browserpacket.xml
push esi
call fcn.004241d7
add esp, 0x14
lea ecx, [ebp - 0x68]
push eax
push esi
call fcn.0043be5f
push esi
call fcn.004241d7
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0043be5f
push dword [ebp - 0x68]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a580d
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 0x4a580d
call fcn.00420bd2
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push dword [ebp - 0x68]
lea eax, [ebp - 0x6c]
push 0x4fb360
push eax
call fcn.00424501
mov esi, dword [ebp - 0x6c]
push esi
push dword [ebp - 0x68]
call fcn.004c0b5c
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 0x55b31c
call fcn.004a9913
add esp, 0x10
lea ecx, [esi - 0x10]
call fcn.004206ab
mov edi, dword [ebp - 0x78]
push dword [ebp - 0x68]
mov esi, dword [ebp - 0x70]
lea ecx, [ebp - 0x4c]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x64]
call fcn.004086d0
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00406c40
push eax
lea ecx, [ebp - 0x34]
call fcn.004086d0
push eax
call fcn.00412060
pop ecx
pop ecx
lea ecx, [ebp - 0x34]
movzx ebx, al
call fcn.00408720
xor esi, esi
lea ecx, [ebp - 0x1c]
push esi
push 1
call fcn.00403650
lea ecx, [ebp - 0x64]
call fcn.00408720
push esi
push 1
lea ecx, [ebp - 0x4c]
call fcn.00403650
test ebx, ebx
jne 0x4a589d
push esi
push dword [ebp - 0x68]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
test ebx, ebx
jne 0x4a5890
lea eax, [ebp - 0x68]
push eax
lea ecx, [edi + 0xf0]
call fcn.00425c4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x74], esi
jmp 0x4a58a0
mov esi, dword [ebp - 0x74]
push esi
push ebx
push str.MoveNewVerToInstallDir_xmlfile_Move_bRet_d_error_d
push 0x55b31c
call fcn.004a9913
mov ecx, dword [ebp - 0x68]
add esp, 0x10
xor ebx, ebx
mov dword [edi + 0x78], esi
inc ebx
lea ecx, [ecx - 0x10]
call fcn.004206ab
mov ecx, dword [ebp - 0x70]
lea ecx, [ecx - 0x10]
call fcn.004206ab
call fcn.00420bd2
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e41
call fcn.00420bd2
push eax
lea ecx, [ebp - 0x70]
call fcn.00423e41
lea eax, [ebp - 0x6c]
mov ecx, edi
push eax
call fcn.004a24e2
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
call fcn.004a2483
mov edi, dword [ebp - 0x6c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a5959
call fcn.00420bd2
push eax
lea ecx, [ebp - 0x6c]
call fcn.00423e41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
lea eax, [ebp - 0x6c]
push 0x4fb360
push eax
call fcn.00424501
mov esi, dword [ebp - 0x6c]
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test ebx, ebx
je 0x4a5951
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esi - 0x10]
call fcn.004206ab
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 0x55b31c
call fcn.004a9913
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.004206ab
lea ecx, [edi - 0x10]
call fcn.004206ab
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret