Function at 0x513471
Capabilities:
Move file

Disassembly:
push 0x3e0
mov eax, 0x563111
call fcn.004cd176
mov edi, ecx
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x3d4], ebx
call fcn.005053c4
test al, al
je 0x513705
cmp dword [ebx + 0x10], 0
sete al
test al, al
jne 0x513705
push 0
push dword [ebp - 0x3d4]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x3cc], 0xa
push esi
push eax
mov ecx, edi
xor bl, bl
call fcn.005131e6
and dword [ebp - 4], 0
lea ecx, [edi + 0x2c]
call fcn.00530183
push 0
push eax
call fcn.00513ecc
cmp eax, 0x102
je 0x513511
lea eax, [ebp - 0x28]
push eax
push esi
push str.RobustFileOps::MoveFileToBackup:_Shutdown_event_set__abandoning_MoveFileEx_of_existing_fileToMoveToBackupPath___s__to_bakPath___s_.
push 0x9c
lea ecx, [ebp - 0x3c8]
call fcn.005106de
push 0x5d6094
lea eax, [ebp - 0x3c8]
push eax
call fcn.004cea74
xor eax, eax
test bl, bl
jne 0x5136f9
inc eax
mov dword [ebp - 0x3d8], eax
mov dword [ebp - 0x3d0], eax
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3d0]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push str.RobustFileOps::MoveFileToBackup:_Moving_existing_fileToMoveToBackupPath___s__to_bakPath___s_:_Attempt__d_of__d.
push 3
call fcn.0051213b
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
cmp dword [esi + 0x14], 8
jb 0x51355c
mov eax, dword [esi]
jmp 0x51355e
mov eax, esi
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x5135f6
push 0x38
mov bl, 1
call fcn.00409735
pop ecx
mov dword [ebp - 0x3dc], eax
mov byte [ebp - 4], bl
test eax, eax
je 0x513595
lea ecx, [ebp - 0x28]
push ecx
push esi
mov ecx, eax
call fcn.00512640
jmp 0x513597
xor eax, eax
mov dword [ebp - 0x3e4], eax
mov dword [ebp - 0x3e0], 0x93
test eax, eax
je 0x5135af
lock inc dword [eax + 4]
lea eax, [ebp - 0x3e4]
mov byte [ebp - 4], 2
push eax
mov ecx, edi
call fcn.005141fe
push dword [ebp - 0x3dc]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3ec]
push eax
lea ecx, [edi + 0xc]
call fcn.00512366
mov ecx, dword [ebp - 0x3e4]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x5135ed
call fcn.00513b59
mov byte [ebp - 4], 0
jmp 0x513696
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3d0], eax
lea eax, [ebp - 0x3d0]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push str.RobustFileOps::MoveFileToBackup:_MoveFileEx_failed_to_move_existing_fileToMoveToBackupPath___s__to_bakPath___s_:_LastError:__d
push 3
call fcn.005121eb
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.005130b3
test al, al
jne 0x513696
push esi
call fcn.005053c4
test al, al
jne 0x513644
push esi
push str.RobustFileOps::MoveFileToBackup:_File_at_fileToMoveToBackupPath___s__no_longer_exists__no_need_to_move_it_to_a_backup_location.
push 3
call fcn.00512241
mov bl, 1
jmp 0x513696
lea eax, [ebp - 0x28]
push eax
call fcn.005053c4
test al, al
je 0x51367c
push 1
push dword [ebp - 0x3d4]
lea eax, [ebp - 0x40]
mov ecx, edi
push esi
push eax
call fcn.005131e6
push eax
lea ecx, [ebp - 0x28]
call fcn.004190f4
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.0040779d
jmp 0x513696
lea ecx, [edi + 0x2c]
call fcn.00530183
push 0x1f4
push eax
call fcn.00513ecc
cmp eax, 0x102
jne 0x5136da
mov eax, dword [ebp - 0x3d8]
cmp eax, dword [ebp - 0x3cc]
jb 0x513513
test bl, bl
jne 0x5136f9
lea eax, [ebp - 0x3cc]
push eax
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push str.RobustFileOps::MoveFileToBackup:_FAILED__MoveFileEx_failed_to_move_existing_fileToMoveToBackupPath___s__to_bakPath___s_._All__d_of__d_attempts_exhausted_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa0
lea ecx, [ebp - 0x3c8]
call fcn.005108a3
jmp 0x513500
lea eax, [ebp - 0x28]
push eax
push esi
push str.RobustFileOps::MoveFileToBackup:_Shutdown_event_set__abandoning_MoveFileEx_of_existing_fileToMoveToBackupPath___s__to_bakPath___s___after_failure_
push 0x9c
lea ecx, [ebp - 0x3c8]
call fcn.0051080c
jmp 0x513500
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0040779d
call fcn.004cd128
ret 8