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

Disassembly:
mov eax, 0x6ab2c3
call fcn.00664608
sub esp, 0x24
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x14], esi
lea edi, [esi + 0x54]
push edi
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ebx, dword [ebp + 8]
push ebx
call fcn.0045270f
test al, al
jne 0x4bec95
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
push ebx
push str.Cant_find_archive_to_install_at__S
call fcn.00470476
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x4bef88
xor edi, edi
lea ecx, [ebp - 0x30]
add esi, 0x1c
mov dword [ebp - 0x30], edi
push esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
call fcn.00427a37
push str..tmp
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], edi
call fcn.00437714
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4becc8
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x4becf9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x4becf9
cmp dword [ebp - 0x1c], 8
lea ecx, [ebp - 0x30]
jb 0x4becea
mov ecx, dword [ebp - 0x30]
push eax
push ecx
push str.Cant_delete_restore_file_at__S___d
call fcn.00470476
add esp, 0xc
mov ecx, dword [ebp - 0x14]
call fcn.004beb28
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4bed0d
mov eax, dword [ebp - 0x30]
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4bed17
mov ecx, dword [esi]
push eax
push ecx
push str.Moving__S_to__S
call fcn.00470476
add esp, 0xc
lea ecx, [ebp - 0x30]
cmp dword [ebp - 0x1c], 8
jb 0x4bed32
mov ecx, dword [ebp - 0x30]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4bed3c
mov eax, dword [esi]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
setne byte [ebp + 0xb]
test eax, eax
jne 0x4bed70
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
jne 0x4bed70
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4bed63
mov eax, dword [esi]
push eax
push str.There_is_no_existing_archive_file_to_move_at__S
call fcn.00470476
pop ecx
pop ecx
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4bed7a
mov eax, dword [esi]
push eax
push ebx
push str.Moving__S_to__S
call fcn.00470476
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x4bed93
mov eax, dword [esi]
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
call ebx
test eax, eax
setne byte [ebp - 0xd]
test eax, eax
jne 0x4bee31
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x4bedc3
push str.Cant_overwrite_existing_archive
call fcn.00470476
pop ecx
cmp byte [ebp + 0xb], 0
je 0x4bee31
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4bedd3
mov ecx, dword [esi]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4beddf
mov eax, dword [ebp - 0x30]
push ecx
push eax
push str.Moving__S_back_to__S
call fcn.00470476
add esp, 0xc
mov ecx, esi
cmp dword [esi + 0x14], 8
jb 0x4bedf8
mov ecx, dword [esi]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4bee04
mov eax, dword [ebp - 0x30]
push ecx
push eax
call ebx
test eax, eax
jne 0x4bee31
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4bee16
mov ecx, dword [esi]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4bee22
mov eax, dword [ebp - 0x30]
push ecx
push eax
push str.Cant_restore__S_back_to__S
call fcn.00470476
add esp, 0xc
mov ebx, dword [ebp - 0x14]
mov ecx, ebx
call fcn.004befda
cmp byte [ebp - 0xd], 0
je 0x4bef3f
test al, al
je 0x4bee75
cmp byte [ebp + 0xb], 0
mov eax, dword [0x7bd340]
mov dword [0x7bd33c], eax
je 0x4bef42
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
jb 0x4bee69
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
jmp 0x4bef42
push str.Cant_install_corrupted_archive
call fcn.00470476
cmp byte [ebp + 0xb], 0
pop ecx
je 0x4bef3b
push str.Deleting_corrupted_archive
call fcn.00470476
pop ecx
push 8
pop edi
mov eax, esi
cmp dword [esi + 0x14], edi
jb 0x4beea1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x4beebf
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Cant_delete_corrupted_archive____d
call fcn.00470476
pop ecx
pop ecx
mov ecx, esi
cmp dword [esi + 0x14], edi
jb 0x4beec8
mov ecx, dword [esi]
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jb 0x4beed3
mov eax, dword [ebp - 0x30]
push ecx
push eax
push str.Moving__S_back_to__S
call fcn.00470476
add esp, 0xc
mov ecx, esi
cmp dword [esi + 0x14], edi
jb 0x4beeeb
mov ecx, dword [esi]
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jb 0x4beef6
mov eax, dword [ebp - 0x30]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x4bef25
cmp dword [esi + 0x14], edi
jb 0x4bef09
mov esi, dword [esi]
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jb 0x4bef14
mov eax, dword [ebp - 0x30]
push esi
push eax
push str.Cant_restore__S_back_to__S
call fcn.00470476
add esp, 0xc
jmp 0x4bef3b
mov ecx, ebx
call fcn.004befda
test al, al
jne 0x4bef3b
push str.Cant_prepare_restored_archive
call fcn.00470476
pop ecx
push 3
jmp 0x4bef41
push 2
pop edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [ebp - 0x1c]
cmp eax, 8
jb 0x4bef86
mov ecx, dword [ebp - 0x30]
lea eax, [eax*2 + 2]
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x1000
jb 0x4bef7d
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004279ae
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4