Function at 0x4064b0
Capabilities:
Move file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
mov r15, qword [rcx + 0x50]
mov rax, qword [rcx + 0xd8]
lea rdx, [0x00535df3]
mov rbx, qword [rcx + 0x48]
mov rbp, qword [rcx + 0x80]
mov r13, rcx
lea rcx, [rsp + 0x78]
mov rdi, qword [r15]
mov qword [rsp + 0x60], rax
mov r8, rdi
mov qword [rsp + 0x58], rdi
call fcn.0041c0e0
lea rdx, str._s.old
lea rcx, [rsp + 0x80]
mov r8, rdi
lea rdi, [rsp + 0x90]
call fcn.0041c0e0
mov rcx, qword [rsp + 0x78]
call sub.msvcrt.dll__unlink
movzx eax, byte [rbx]
mov rdx, qword [rsp + 0x78]
lea r8, [0x00535e01]
mov rcx, rdi
mov byte [rsp + 0x53], al
call fcn.004763f0
test al, al
je 0x40685b
mov rcx, rdi
call fcn.0040e370
cmp eax, 0xffffffff
mov ebx, eax
je 0x406813
mov ecx, 0x1000000
call fcn.0040e980
mov ecx, dword [r15 + 0x38]
mov qword [rsp + 0x48], rax
test ecx, ecx
je 0x40663c
lea r12, [rsp + 0x88]
xor esi, esi
mov rax, qword [r15 + 0x48]
mov r10d, esi
cmp dword [rax + r10*4], 1
je 0x40662f
imul r10, r10, 0x238
add r10, qword [r15 + 0x40]
mov edx, dword [r10 + 0x220]
mov r14, r10
test edx, edx
je 0x40662f
movsx eax, byte [rsp + 0x53]
xor ebx, ebx
mov dword [rsp + 0x54], eax
nop dword [rax + rax]
mov edx, ebx
add edx, dword [r14 + 0x228]
mov rax, qword [r15 + 0x30]
cmp dword [rax + rdx*4], 1
je 0x406623
mov rax, qword [rbp + 0x1b8]
cmp rax, 0xffffffffffffffff
je 0x4066f0
mov r9, r12
mov r8d, ebx
mov edx, esi
mov rcx, r15
mov qword [rsp + 0x88], 0
call rax
mov rcx, qword [rsp + 0x88]
movsxd rdx, eax
mov r9, rdi
mov r8d, 1
call fcn.00476c60
mov rcx, qword [rsp + 0x88]
call fcn.0040ea80
add ebx, 1
cmp dword [r14 + 0x220], ebx
ja 0x4065c0
add esi, 1
cmp dword [r15 + 0x38], esi
ja 0x406581
mov rcx, qword [rsp + 0x48]
call fcn.0040ea80
mov rcx, rdi
call fcn.004774e0
mov rcx, rdi
call fcn.0040e380
cmp eax, 0xffffffff
mov ebx, eax
mov rcx, rdi
je 0x406816
call fcn.00477560
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll__unlink
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x58]
call sub.msvcrt.dll_rename
test eax, eax
jne 0x4067f2
mov rdi, qword [rsp + 0x58]
mov rcx, rdi
call sub.msvcrt.dll__unlink
mov rcx, qword [rsp + 0x78]
mov rdx, rdi
call sub.msvcrt.dll_rename
test eax, eax
mov ebx, eax
jne 0x4067a6
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll__unlink
mov rcx, qword [rsp + 0x78]
call fcn.0040ea80
mov rcx, qword [rsp + 0x80]
call fcn.0040ea80
mov eax, ebx
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0x60]
cmp byte [rax + 0x5f], 0
jne 0x406750
mov rdx, qword [r13 + 0x50]
mov rcx, qword [r13 + 0x48]
mov r8, qword [r13 + 0x80]
mov r9, qword [rsp + 0x48]
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 0x1000000
call fcn.004063f0
mov rcx, qword [rsp + 0x48]
cdqe
lea rdx, [0x00535e0b]
mov r8, rcx
mov byte [rcx + rax], 0
mov rcx, rdi
call fcn.004773c0
jmp 0x406623
mov rax, qword [r15 + 0x70]
mov rax, qword [rax + rdx*8]
mov r9, qword [rax]
mov eax, dword [r9 + 8]
test eax, eax
je 0x406795
xor r8d, r8d
mov dword [rsp + 0x68], ebx
mov dword [rsp + 0x6c], esi
mov rbx, r9
mov esi, r8d
mov rdx, qword [rbx]
mov eax, esi
add esi, 1
movsx ecx, byte [rdx + rax]
mov rdx, rdi
call fcn.00476fd0
cmp dword [rbx + 8], esi
ja 0x406774
mov ebx, dword [rsp + 0x68]
mov esi, dword [rsp + 0x6c]
mov ecx, dword [rsp + 0x54]
mov rdx, rdi
call fcn.00476fd0
jmp 0x4066fb
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea rdx, [0x00535e10]
mov rcx, r13
call fcn.00403390
mov rcx, qword [rsp + 0x78]
mov ebx, 0xffffffff
call fcn.0040ea80
mov rcx, qword [rsp + 0x80]
call fcn.0040ea80
jmp 0x4066d8
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov r9, qword [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov r8, qword [rsp + 0x58]
jmp 0x4067c2
mov rcx, rdi
call fcn.00477560
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov r8, qword [rsp + 0x78]
lea rdx, [0x00535e04]
mov r9, rax
mov rcx, r13
call fcn.00403390
mov rcx, qword [rsp + 0x78]
call fcn.0040ea80
mov rcx, qword [rsp + 0x80]
call fcn.0040ea80
jmp 0x4066d8
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov r8, qword [rsp + 0x78]
lea rdx, [0x00535e04]
mov r9, rax
mov rcx, r13
call fcn.00403390
jmp 0x4067d1