Function at 0x140153620
Capabilities:
Move file

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r15
sub rsp, 0x60
mov rax, qword [0x1403aa6c8]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea r15, [0x1404cbfdc]
mov rcx, r15
lea rdx, [0x1404cbf48]
call fcn.140156d70
test eax, eax
jne 0x140153864
cmp dword [0x1403dbd58], eax
je 0x1401538b3
or rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [r15 + rbx], 0
jne 0x140153670
lea edi, [rbx + 7]
cmp edi, 0x104
jl 0x1401536d3
mov ecx, 0x104
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x140153851
mov rdx, rax
mov rcx, r15
sub rdx, r15
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1401536b0
mov byte [rsi + 0x102], al
mov eax, 0x102
cmp ebx, eax
cmovg ebx, eax
lea edi, [rax + 2]
jmp 0x1401536ff
movsxd rcx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x140153851
mov rdx, rax
mov rcx, r15
sub rdx, r15
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1401536f1
movsxd r8, ebx
lea rcx, [0x14028ffc4]
mov rdx, r8
sub rdx, rcx
add rdx, rsi
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140153712
cmp dword [0x1403dbddc], 1
jne 0x14015374c
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140156d70
test eax, eax
jne 0x1401537dc
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
jmp 0x1401537dc
mov qword [rsp + 0x80], rbp
sub edi, ebx
or ebp, 0xffffffff
mov qword [rsp + 0x88], r14
xor ebx, ebx
lea r14, [r8 + 1]
sub edi, 2
je 0x14015379c
sub edi, 1
je 0x140153795
sub edi, 1
je 0x14015378e
sub edi, 1
je 0x140153787
cmp edi, 1
jne 0x14015379e
mov ebp, 0x270f
jmp 0x1401537a2
mov ebp, 0x3e7
jmp 0x1401537a2
mov ebp, 0x63
jmp 0x1401537a2
mov ebp, 9
jmp 0x1401537a2
mov ebp, ebx
test ebp, ebp
je 0x1401537cc
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.140156d70
test eax, eax
jne 0x1401537cc
inc ebx
lea rdx, [0x14029023c]
mov r8d, ebx
lea rcx, [r14 + rsi]
call fcn.1401066c0
cmp ebx, ebp
jb 0x1401537a2
mov rbp, qword [rsp + 0x80]
mov r14, qword [rsp + 0x88]
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
test eax, eax
je 0x14015385b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8d, 0x4000
lea rdx, [0x1404c3e38]
mov rcx, r15
mov rbx, rax
call fcn.14019d4e0
mov r8, rax
lea rdx, str.error:__cannot_rename_old__s_n_________s_n
mov r9, rbx
lea rcx, [0x1404bbe38]
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
mov r9d, 0x401
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 1
jmp 0x14015394b
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rdx, [0x14032e66c]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [0x1404cbfb0], rax
test rax, rax
jne 0x14015393a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8d, 0x4000
lea rdx, [0x1404c3e38]
mov rcx, r15
mov rbx, rax
call fcn.14019d4e0
lea rdx, str.error:__cannot_create__s_n_________s_n
jmp 0x140153904
test byte [0x1404cbf4e], 0x80
jne 0x1401538ca
mov edx, 0x180
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chmod]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
test eax, eax
je 0x140153864
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8d, 0x4000
lea rdx, [0x1404c3e38]
mov rcx, r15
mov rbx, rax
call fcn.14019d4e0
lea rdx, str.error:__cannot_delete_old__s_n_________s_n
mov r9, rbx
lea rcx, [0x1404bbe38]
mov r8, rax
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
mov r9d, 0x401
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov eax, 1
jmp 0x14015394b
mov rdx, qword [0x1404cbeb8]
mov rcx, rax
call fcn.140154330
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140229810
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r15
pop rdi
pop rsi
ret