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

Disassembly:
push 0x54
mov eax, 0x534c99
call fcn.004f1db2
mov edi, ecx
mov dword [ebp - 0x58], edi
mov eax, dword [edi]
xor esi, esi
push 0x400
mov dword [ebp - 0x54], esi
call dword [eax + 4]
push dword [edi + 8]
lea ecx, [ebp - 0x28]
call fcn.00417260
and dword [ebp - 4], esi
push ecx
push ecx
mov ecx, esp
push eax
call fcn.0041a660
lea ecx, [ebp - 0x40]
call fcn.004195a0
push eax
mov byte [ebp - 4], 1
call fcn.0041bae0
pop ecx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
mov bl, al
call fcn.00419620
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
push esi
push 1
call fcn.00417d20
test bl, bl
je 0x4d8472
mov eax, dword [edi + 8]
push ecx
push ecx
mov ebx, esp
mov dword [ebx], eax
test eax, eax
je 0x4d839a
push eax
call fcn.00416680
pop ecx
lea ecx, [ebp - 0x28]
mov dword [ebx + 4], eax
call fcn.004195a0
push 1
push eax
mov dword [ebp - 4], 2
call fcn.0041b8d0
mov bl, al
pop ecx
pop ecx
neg bl
lea ecx, [ebp - 0x28]
sbb bl, bl
or dword [ebp - 4], 0xffffffff
call fcn.00419620
inc bl
je 0x4d83d6
mov dword [edi + 0x150], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi + 8]
push str.MoveNewVerToInstallDir_KFunction::DeleteFolder__ws_recode_d
push 0x5aca00
call fcn.004dddd9
add esp, 0x10
lea ecx, [ebp - 0x40]
push dword [edi + 8]
call fcn.00417260
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 4], 3
push eax
call fcn.0041a660
lea ecx, [ebp - 0x28]
call fcn.004195a0
push eax
mov byte [ebp - 4], 4
call fcn.0041bae0
pop ecx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
mov bl, al
call fcn.00419620
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
push 0
push 1
call fcn.00417d20
test bl, bl
je 0x4d8472
push dword [edi + 8]
push str.______DirectoryExists__ws
push 0x5aca00
call fcn.004dddd9
push 1
push 1
push dword [edi + 8]
call fcn.004cd173
add esp, 0x18
test eax, eax
jne 0x4d8472
mov dword [edi + 0x150], 7
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 0x5aca00
call fcn.004dddd9
add esp, 0x18
test ebx, ebx
jne 0x4d862e
push dword [edi + 8]
lea ecx, [ebp - 0x40]
call fcn.00417260
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 4], 5
push eax
call fcn.0041a660
lea ecx, [ebp - 0x28]
call fcn.004195a0
push eax
mov byte [ebp - 4], 6
call fcn.0041bae0
mov bl, al
mov byte [ebp - 4], 5
pop ecx
neg bl
lea ecx, [ebp - 0x28]
sbb bl, bl
call fcn.00419620
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
push 0
push 1
call fcn.00417d20
inc bl
je 0x4d85d4
push dword [edi + 8]
lea ecx, [ebp - 0x40]
call fcn.00417260
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 4], 7
push eax
call fcn.0041a660
lea ecx, [ebp - 0x28]
call fcn.004195a0
push eax
mov byte [ebp - 4], 8
call fcn.004216b0
pop ecx
lea ecx, [ebp - 0x28]
movzx esi, al
mov byte [ebp - 4], 7
call fcn.00419620
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
push 0
push 1
call fcn.00417d20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.MoveNewVerToInstallDir_file_util_CreateDirectory_bRet_d_error_d
push 0x5aca00
call fcn.004dddd9
add esp, 0x10
test esi, esi
jne 0x4d85d4
xor ebx, ebx
push dword [edi + 8]
lea ecx, [ebp - 0x40]
call fcn.00417260
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 4], 9
push eax
call fcn.0041a660
lea ecx, [ebp - 0x28]
call fcn.004195a0
push eax
mov byte [ebp - 4], 0xa
call fcn.004216b0
pop ecx
lea ecx, [ebp - 0x28]
movzx esi, al
mov byte [ebp - 4], 9
call fcn.00419620
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
push 0
push 1
call fcn.00417d20
test esi, esi
jne 0x4d85d4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 3
jl 0x4d8571
lea eax, [edi + 0x108]
push eax
lea esi, [edi + 0xfc]
push esi
push 1
push dword [edi + 8]
push dword [edi + 0x1c]
call fcn.004cf0c6
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 - 0x54], 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 0x5aca00
call fcn.004dddd9
add esp, 0x1c
test ebx, ebx
jne 0x4d862e
mov dword [edi + 0x150], 8
mov dword [edi + 0x78], esi
test ebx, ebx
je 0x4d87bc
mov eax, dword [edi + 0x18]
sub eax, 0x10
push eax
call fcn.0043c35e
add eax, 0x10
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 4]
sub eax, 0x10
mov dword [ebp - 4], 0xb
push eax
call fcn.0043c35e
add eax, 0x10
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 0xc
push eax
call fcn.004cf906
lea eax, [ebp - 0x44]
push eax
call fcn.004cf906
mov ebx, str.browserpacket.xml
push ebx
call fcn.0043a8c3
add esp, 0x14
lea ecx, [ebp - 0x44]
push eax
push ebx
call fcn.004516f5
push ebx
call fcn.0043a8c3
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x48]
call fcn.004516f5
push dword [ebp - 0x44]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d8736
push 0x80
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4d8736
call fcn.00437474
push eax
lea ecx, [ebp - 0x50]
call fcn.0043a4ef
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push dword [ebp - 0x44]
lea eax, [ebp - 0x50]
push 0x53c9f8
push eax
call fcn.0043ab29
mov esi, dword [ebp - 0x50]
push esi
push dword [ebp - 0x44]
call fcn.004f6a25
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 0x5aca00
call fcn.004dddd9
add esp, 0x10
mov byte [ebp - 4], 0xc
lea ecx, [esi - 0x10]
call fcn.00436fdb
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x54]
push dword [ebp - 0x44]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebx, ebx
test eax, eax
sete bl
test ebx, ebx
jne 0x4d8788
push ebx
push dword [ebp - 0x44]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
test ebx, ebx
jne 0x4d876f
lea eax, [ebp - 0x44]
lea ecx, [edi + 0xfc]
push eax
call fcn.0043c2e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x54], esi
test ebx, ebx
jne 0x4d8788
mov dword [edi + 0x150], 9
push esi
push ebx
push str.MoveNewVerToInstallDir_xmlfile_Move_bRet_d_error_d
push 0x5aca00
call fcn.004dddd9
mov ecx, dword [ebp - 0x44]
add esp, 0x10
xor ebx, ebx
mov dword [edi + 0x78], esi
inc ebx
lea ecx, [ecx - 0x10]
call fcn.00436fdb
mov ecx, dword [ebp - 0x48]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00436fdb
call fcn.00437474
push eax
lea ecx, [ebp - 0x60]
call fcn.0043a4ef
mov dword [ebp - 4], 0xe
call fcn.00437474
push eax
lea ecx, [ebp - 0x50]
call fcn.0043a4ef
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 0xf
push eax
mov ecx, edi
call fcn.004d4632
lea eax, [ebp - 0x50]
mov ecx, edi
push eax
call fcn.004d4518
mov edi, dword [ebp - 0x60]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d8858
call fcn.00437474
push eax
lea ecx, [ebp - 0x48]
call fcn.0043a4ef
mov byte [ebp - 4], 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
lea eax, [ebp - 0x48]
push 0x53c9f8
push eax
call fcn.0043ab29
mov esi, dword [ebp - 0x48]
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test ebx, ebx
je 0x4d884c
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0xf
call fcn.00436fdb
mov ebx, dword [ebp - 0x50]
push 1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
mov dword [ebp - 0x48], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push ebx
push str.CopyFile__ws_to__ws_error_d_r_n
push 0x5aca00
call fcn.004dddd9
add esp, 0x14
test esi, esi
mov esi, dword [ebp - 0x58]
jne 0x4d8896
mov dword [esi + 0x150], 0xa
call fcn.00437474
push eax
lea ecx, [ebp - 0x5c]
call fcn.0043a4ef
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x11
push eax
mov ecx, esi
call fcn.004d48f8
mov ebx, dword [ebp - 0x5c]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d8991
call fcn.00437474
push eax
lea ecx, [ebp - 0x4c]
call fcn.0043a4ef
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 0x12
push eax
mov ecx, esi
call fcn.004d4963
mov esi, dword [ebp - 0x4c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d8947
call fcn.00437474
push eax
lea ecx, [ebp - 0x44]
call fcn.0043a4ef
mov byte [ebp - 4], 0x13
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
lea eax, [ebp - 0x44]
push 0x53c9f8
push eax
call fcn.0043ab29
add esp, 0x10
push dword [ebp - 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp dword [ebp - 0x48], 0
je 0x4d8938
push 4
push 0
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 0x12
lea ecx, [ecx - 0x10]
call fcn.00436fdb
push 1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x48], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push ebx
push str.CopyFile__ws_to__ws_error_d_r_n
push 0x5aca00
call fcn.004dddd9
add esp, 0x14
cmp dword [ebp - 0x48], 0
jne 0x4d8982
mov eax, dword [ebp - 0x58]
mov dword [eax + 0x150], 0xa
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0x11
call fcn.00436fdb
mov esi, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
mov eax, dword [esi]
push ecx
push dword [ebp - 0x48]
mov ecx, esi
push 0x400
call dword [eax + 8]
lea ecx, [ebx - 0x10]
call fcn.00436fdb
mov ecx, dword [ebp - 0x50]
lea ecx, [ecx - 0x10]
call fcn.00436fdb
lea ecx, [edi - 0x10]
call fcn.00436fdb
mov eax, dword [ebp - 0x48]
call fcn.004f1d61
ret