Function at 0x45f6a0
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x62d6c
call fcn.004beaf0
mov eax, dword [0x54c384]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x62d3c], eax
mov eax, dword [ebp + 0x18]
push 0x30d
mov dword [ebp - 0x62d34], eax
mov eax, dword [ebp + 0x1c]
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_start
mov dword [ebp - 0x62d38], eax
call fcn.0041f720
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x45f6ff
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x45f730
push 0x30f
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_cab_file_exist__delete_it
call fcn.0041f720
add esp, 0xc
mov ecx, edi
cmp dword [edi + 0x14], 8
jb 0x45f72b
mov ecx, dword [edi]
call fcn.0040f030
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x45f73a
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45f87e
push 0x62cf8
push eax
lea eax, [ebp - 0x62d30]
push eax
call fcn.004c05c0
add esp, 0xc
lea ecx, [ebp - 0x62d30]
call fcn.0042fec0
lea ecx, [ebp - 0x62d30]
call fcn.004306e0
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x608c8], 1
jb 0x45f786
mov esi, dword [esi]
push 0x1048
lea eax, [ebp - 0x5800]
push 0
push eax
call fcn.004c05c0
add esp, 0xc
lea eax, [ebp - 0x5800]
push esi
push 0x505268
push 0x823
push eax
call fcn.00434370
add esp, 0x10
mov dword [ebp - 0x60688], 0x493e0
cmp dword [edi + 0x14], 8
mov esi, edi
jb 0x45f7ca
mov esi, dword [edi]
push 0x208
lea eax, [ebp - 0x5c10]
push 0
push eax
call fcn.004c05c0
add esp, 0xc
lea eax, [ebp - 0x5c10]
push esi
push 0x505268
push 0x103
push eax
call fcn.00419550
add esp, 0x10
lea ecx, [ebp - 0x62d30]
call fcn.004305f0
mov eax, dword [ebp - 0x62d24]
test eax, eax
je 0x45f81e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x62d24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
push dword [ebp - 0x608cc]
mov dword [ebp - 0x62d24], 0
call esi
push 0xa
mov dword [ebp - 0x608cc], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x608cc]
test eax, eax
je 0x45f85c
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x31e
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_downloading
call fcn.0041f720
add esp, 0xc
lea ecx, [ebp - 0x62d30]
call fcn.00430260
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x45f888
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45f8c0
push 0x322
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_cab_id_not_exist
call fcn.0041f720
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bdaf8
mov esp, ebp
pop ebp
ret 0x18
cmp dword [edi + 0x14], 8
mov esi, edi
jb 0x45f8ca
mov esi, dword [edi]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x45f8f3
push 0x505270
push esi
call fcn.004cd974
add esp, 8
test eax, eax
je 0x45f8f3
mov edx, eax
lea ecx, [ebp - 0x1c]
call fcn.00437c90
jmp 0x45f914
push 0
push 0x50102d
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xf
mov byte [ebp - 0x1c], 0
call fcn.00404000
mov edx, dword [ebp - 0x62d34]
lea ecx, [ebp - 0x1c]
call fcn.0045fc00
test al, al
je 0x45fa45
sub esp, 0x18
lea eax, [ebp - 0x1c]
mov ecx, esp
push eax
call fcn.004032f0
lea ecx, [ebp - 0x62d6c]
call fcn.00402070
mov esi, eax
add esp, 0x18
cmp dword [esi + 0x14], 8
jb 0x45f950
mov esi, dword [esi]
sub esp, 0x18
mov ecx, esp
push dword [ebp - 0x62d34]
call fcn.004032f0
lea ecx, [ebp - 0x62d54]
call fcn.00402070
add esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x45f976
mov eax, dword [eax]
push esi
push eax
push 0x329
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___themedll_md5_not_matching__m_strThemeDllMd5:__s__GetFileMd5:__s
call fcn.0041f720
mov edx, dword [ebp - 0x62d40]
add esp, 0x14
cmp edx, 8
jb 0x45f9cf
mov ecx, dword [ebp - 0x62d54]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45f9c5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45fbef
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov edx, dword [ebp - 0x62d58]
xor eax, eax
mov dword [ebp - 0x62d44], 0
mov dword [ebp - 0x62d40], 7
mov word [ebp - 0x62d54], ax
cmp edx, 8
jb 0x45fa2c
mov ecx, dword [ebp - 0x62d6c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45fa22
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45fbef
push edx
push ecx
call fcn.004bdd39
add esp, 8
cmp dword [edi + 0x14], 8
jb 0x45fa34
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 0xfffffffe
jmp 0x45fbaa
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x45fa4f
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x45fa85
cmp dword [ebx + 0x14], 8
mov esi, ebx
jb 0x45fa6a
mov esi, dword [ebx]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x45fa7f
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x45fa8f
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45faa9
cmp dword [ebx + 0x14], 8
mov ecx, ebx
jb 0x45faa4
mov ecx, dword [ebx]
call fcn.0040f420
mov edx, ebx
mov ecx, edi
call fcn.0040f540
test eax, eax
jne 0x45faf7
push 0x336
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_UncompressCabFile_false
call fcn.0041f720
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x45fad5
mov edi, dword [edi]
push edi
call esi
sub esp, 0x18
mov ecx, esp
push ebx
call fcn.00402f60
mov cl, 1
call fcn.004110c0
add esp, 0x18
mov esi, 0xfffffffd
jmp 0x45fbaa
cmp dword [edi + 0x14], 8
jb 0x45faff
mov edi, dword [edi]
push edi
call esi
push dword [ebp - 0x62d38]
mov edx, ebx
lea ecx, [ebp - 0x34]
call fcn.004195e0
mov edx, dword [ebp - 0x62d3c]
lea ecx, [ebp - 0x34]
add esp, 4
call fcn.004023c0
test al, al
jne 0x45fb5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x33f
push str.UpgradeMgr::DownloadResAndUnPack
push str.__s__d___DownloadResAndUnPack_CopyFolder_err_d
call fcn.0041f720
sub esp, 8
mov ecx, esp
push ebx
call fcn.00402f60
mov cl, 1
call fcn.004110c0
add esp, 0x18
mov esi, 0xfffffffb
jmp 0x45fb60
xor esi, esi
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x45fb96
mov ecx, dword [ebp - 0x34]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45fb8c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45fbf4
push edx
push ecx
call fcn.004bdd39
add esp, 8
xor eax, eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 7
mov word [ebp - 0x34], ax
mov edx, dword [ebp - 8]
cmp edx, 0x10
jb 0x45fbda
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x45fbd0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45fbf4
push edx
push ecx
call fcn.004bdd39
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bdaf8
mov esp, ebp
pop ebp
ret 0x18
call fcn.004c8da3
call fcn.004c8da3
int3