Function at 0x4fd170
Capabilities:
Check if file exists
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cbe18
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x64a070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
call fcn.00408cb0
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], eax
mov word [ebp - 0x44], ax
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 2
mov ecx, esi
call fcn.004fc560
test al, al
jne 0x4fd203
push str.Failed_to_get_wide_string_path
jmp 0x4fd2bc
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fd25b
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push str.File__s_does_not_exist
push str.Utilities
push ecx
call fcn.00502600
add esp, 4
push eax
call fcn.005031f0
add esp, 0x10
push str.File_does_not_exists_to_create_backup
push str.Utilities
call fcn.00502600
push eax
call fcn.005033a0
jmp 0x4fd3ad
lea ecx, [ebp - 0x5c]
call fcn.004fd440
test al, al
jne 0x4fd286
push str.Failed_to_remove_discriminator_from_the_end_of_file
push str.Utilities
call fcn.00502600
push eax
call fcn.00503310
add esp, 0xc
xor bl, bl
jmp 0x4fd3b2
push str._bkp
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x74]
call fcn.00479990
add esp, 4
mov ecx, edi
push eax
call fcn.00409bb0
lea ecx, [ebp - 0x74]
call fcn.00408870
lea edx, [ebp - 0x44]
mov ecx, edi
call fcn.004fc560
test al, al
jne 0x4fd2d6
push str.Failed_to_get_wide_string_backup_file_path
push str.Utilities
call fcn.00502600
push eax
call fcn.005031f0
add esp, 0xc
xor bl, bl
jmp 0x4fd3b2
mov dl, 1
lea ecx, [ebp - 0x44]
call fcn.004fc7b0
test al, al
jne 0x4fd30e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_remove_the_backup_file_already_present:_d
push str.Utilities
push ecx
call fcn.00502600
add esp, 4
push eax
call fcn.00503430
add esp, 0x10
xor bl, bl
jmp 0x4fd3b2
cmp dword [ebp - 0x30], 8
lea ecx, [ebp - 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x44]
cmp dword [ebp - 0x18], 8
push 8
cmovae eax, dword [ebp - 0x2c]
push ecx
push eax
call edi
test eax, eax
jne 0x4fd398
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 5
jne 0x4fd375
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
call fcn.004fcea0
test al, al
je 0x4fd375
cmp dword [ebp - 0x30], 8
lea ecx, [ebp - 0x44]
push 8
cmovae ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call edi
test eax, eax
jne 0x4fd398
call esi
push eax
push str.Failed_to_create_Backup_file_:_d
push str.Utilities
push ecx
call fcn.00502600
add esp, 4
push eax
call fcn.00503430
add esp, 0x10
xor bl, bl
jmp 0x4fd3b2
push str.Backup_file_Created
push str.Utilities
call fcn.00502600
push eax
call fcn.00503310
mov bl, 1
add esp, 0xc
mov eax, dword [ebp - 0x30]
cmp eax, 8
jb 0x4fd3c7
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00409510
xor eax, eax
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x34], 0
cmp eax, 8
jb 0x4fd3f0
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00409510
mov ecx, dword [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
cmp ecx, 0x10
jb 0x4fd419
inc ecx
push ecx
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x5c]
call fcn.00408df0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0057608a
mov esp, ebp
pop ebp
ret