Function at 0x14001c980
Capabilities:
Move file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov rdi, rcx
mov ebp, edx
test rcx, rcx
je 0x14001cd00
mov rbx, qword [rcx + 0x210]
test rbx, rbx
je 0x14001cbed
mov r12, qword [rcx + 0x268]
mov rsi, qword [rcx + 8]
mov rcx, rbx
call sym.fflush
jmp 0x14001c9db
xor eax, eax
cmp byte [rsi], 0x2f
sete al
add rsi, rax
mov rcx, rsi
mov edx, 0x2f
mov rbx, rsi
call sym.strchr
mov rsi, rax
test rax, rax
jne 0x14001c9d0
jmp 0x14001ca03
xor eax, eax
cmp byte [rbx], 0x5c
sete al
add rbx, rax
mov rcx, rbx
mov edx, 0x5c
mov rsi, rbx
call sym.strchr
mov rbx, rax
test rax, rax
jne 0x14001c9f8
mov rcx, r12
call sym.strlen
mov rcx, rsi
mov r13, rax
call sym.strlen
lea r14, [r13 + rax*2 + 0xe]
mov rcx, r14
call dbg.MALLOC
lea rdx, [rdi + 0x240]
lea rcx, [rsp + 0x70]
mov r13, rax
test byte [rdi + 0x270], 4
jne 0x14001cc08
call dbg.safe_localtime
mov r15d, 2
test eax, eax
jne 0x14001cc1b
cmp qword [rdi + 0x250], 0
jne 0x14001cb1c
mov eax, dword [rsp + 0x70]
mov qword [rsp + 0x50], rsi
mov r9, r12
lea r8, str._s__02u_02u_02u__02u_02u_02u__s
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x80]
add eax, 1
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x84]
mov rdx, rax
imul rax, rax, 0x51eb851f
mov ecx, edx
sar ecx, 0x1f
sar rax, 0x25
sub eax, ecx
mov rcx, r13
imul eax, eax, 0x64
sub edx, eax
mov dword [rsp + 0x20], edx
mov rdx, r14
call sym.snprintf
xor edx, edx
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__access]
test eax, eax
jne 0x14001cb90
add dword [rsp + 0x70], 1
cmp r15d, 1
je 0x14001cb90
cmp qword [rdi + 0x250], 0
mov r15d, 1
je 0x14001ca78
mov edx, 0x2e
mov rcx, rsi
call sym.strrchr
mov r15, rax
test rax, rax
je 0x14001cd34
mov rdx, rax
mov rcx, rax
sub rdx, rsi
mov qword [rsp + 0x68], rdx
call sym.strlen
mov rdx, qword [rsp + 0x68]
mov ecx, dword [rdi + 0x260]
mov r9, r12
lea r8d, [rcx + 1]
mov dword [rdi + 0x260], r8d
lea r8, str._s__.s__05u_.s
mov dword [rsp + 0x30], ecx
mov rcx, r13
mov dword [rsp + 0x20], edx
mov rdx, r14
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], rsi
call sym.snprintf
nop dword [rax]
mov rsi, qword [rdi + 8]
mov rdx, r13
mov rcx, rsi
call sym.rename
test eax, eax
jne 0x14001cccc
mov r14d, dword [rdi + 0x248]
mov qword [rdi + 0x258], 0
test r14d, r14d
jne 0x14001cca0
mov ecx, 1
mov r8, r13
lea rdx, str.rotated:__s_n
call dbg.LOG
mov rcx, r13
call sym.free
test ebp, ebp
je 0x14001cc40
mov qword [rdi + 0x210], 0
mov rax, rbx
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call dbg.safe_gmtime
mov r15d, 2
test eax, eax
je 0x14001ca6a
mov rcx, r13
call sym.free
lea rcx, str.gmtime__:_file_rotation_ended
call sym.perror
mov rbx, qword [rdi + 0x210]
jmp 0x14001cbed
mov rdx, rsi
mov rcx, rdi
call dbg.open_rotate
mov rbx, rax
test rax, rax
je 0x14001cd07
mov rdx, qword [rdi + 0x210]
test rdx, rdx
je 0x14001cc6b
mov rcx, rdi
call sym.close_rotate.part.0
mov qword [rdi + 0x210], rbx
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
mov r8, rsi
mov ecx, 1
lea rdx, str.rotate:_started_new_file:__s_n
mov qword [rdi + 0x240], rax
call dbg.LOG
mov rbx, qword [rdi + 0x210]
jmp 0x14001cbed
xor ecx, ecx
mov r12d, dword [rdi + 0x24c]
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
cqo
mov rcx, rax
idiv r14
sub rcx, rdx
add rcx, r14
lea rax, [rcx + r12]
mov qword [rdi + 0x238], rax
jmp 0x14001cbc2
mov r9, r13
mov r8, rsi
lea rdx, str.rename___s_____s__:_failed_n
xor ecx, ecx
call dbg.LOG
lea rcx, str.rename__
call sym.perror
mov rcx, r13
call sym.free
mov rbx, qword [rdi + 0x210]
jmp 0x14001cbed
xor ebx, ebx
jmp 0x14001cbed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call sym.strerror
mov r8, rsi
lea rdx, str.rotate:__s:_failed:__s_n
xor ecx, ecx
mov r9, rax
call dbg.LOG
mov rbx, qword [rdi + 0x210]
jmp 0x14001cbed
mov rcx, rsi
call sym.strlen
mov rdx, rax
lea r15, [rsi + rax]
xor eax, eax
jmp 0x14001cb4d