Function at 0x14001b9a0
Capabilities:
Move file

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov dword [rsp + 0xe8], edx
mov rsi, rcx
test rcx, rcx
je 0x14001bd29
mov r14, qword [rcx + 0x210]
test r14, r14
je 0x14001bc04
mov r13, qword [rcx + 0x268]
mov rbx, qword [rcx + 8]
mov rcx, r14
call sym.fflush
jmp 0x14001b9fb
xor eax, eax
cmp byte [rbx], 0x2f
sete al
add rbx, rax
mov rcx, rbx
mov edx, 0x2f
mov r14, rbx
call sym.strchr
mov rbx, rax
test rax, rax
jne 0x14001b9f0
jmp 0x14001ba24
xor eax, eax
cmp byte [r14], 0x5c
sete al
add r14, rax
mov rcx, r14
mov edx, 0x5c
mov rbx, r14
call sym.strchr
mov r14, rax
test rax, rax
jne 0x14001ba18
mov rcx, r13
call sym.strlen
mov rcx, rbx
mov rdi, rax
call sym.strlen
lea r12, [rdi + rax*2 + 0xe]
mov rcx, r12
call dbg.MALLOC
lea rdx, [rsi + 0x240]
lea rcx, [rsp + 0x60]
mov rdi, rax
test byte [rsi + 0x270], 2
jne 0x14001bc20
call qword [sym._stub]
mov ebp, 2
lea r15, str._s__02u_02u_02u__02u_02u_02u__s
test eax, eax
jne 0x14001bc3a
cmp qword [rsi + 0x250], 0
jne 0x14001bb34
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0x50], rbx
mov r9, r13
mov r8, r15
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x70]
add eax, 1
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x74]
mov rdx, rax
imul rax, rax, 0x51eb851f
mov ecx, edx
sar ecx, 0x1f
sar rax, 0x25
sub eax, ecx
mov rcx, rdi
imul eax, eax, 0x64
sub edx, eax
mov dword [rsp + 0x20], edx
mov rdx, r12
call sym.snprintf_3
xor edx, edx
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x14001bba0
add dword [rsp + 0x60], 1
cmp ebp, 1
je 0x14001bba0
cmp qword [rsi + 0x250], 0
mov ebp, 1
je 0x14001baa0
mov edx, 0x2e
mov rcx, rbx
call sym.strrchr
mov rbp, rax
test rax, rax
je 0x14001bd5e
mov r15, rax
mov rcx, rax
sub r15, rbx
call sym.strlen
mov edx, dword [rsi + 0x260]
mov r9, r13
lea r8, str._s__.s__05u_.s
lea ecx, [rdx + 1]
mov dword [rsi + 0x260], ecx
mov rcx, rdi
mov dword [rsp + 0x30], edx
mov rdx, r12
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], r15d
call sym.snprintf_3
nop word cs:[rax + rax]
mov rbx, qword [rsi + 8]
mov rdx, rdi
mov rcx, rbx
call sym.rename
test eax, eax
jne 0x14001bcf5
mov r13d, dword [rsi + 0x248]
mov qword [rsi + 0x258], 0
test r13d, r13d
jne 0x14001bcc8
mov r8, rdi
lea rdx, str.rotated:__s_n
mov ecx, 1
call dbg.LOG
mov rcx, rdi
call sym.free
mov eax, dword [rsp + 0xe8]
test eax, eax
je 0x14001bc60
mov qword [rsi + 0x210], 0
mov rax, r14
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym._stub_1]
mov ebp, 2
lea r15, str._s__02u_02u_02u__02u_02u_02u__s
test eax, eax
je 0x14001ba92
mov rcx, rdi
call sym.free
lea rcx, str.gmtime__:_file_rotation_ended
call sym.perror
mov r14, qword [rsi + 0x210]
jmp 0x14001bc04
mov rdx, rbx
mov rcx, rsi
call dbg.open_rotate
mov rdi, rax
test rax, rax
je 0x14001bd31
mov rdx, qword [rsi + 0x210]
test rdx, rdx
je 0x14001bc8b
mov rcx, rsi
call sym.close_rotate.part.0
xor ecx, ecx
mov qword [rsi + 0x210], rdi
call qword [sym.imp.msvcrt.dll__time64]
mov r8, rbx
mov ecx, 1
lea rdx, str.rotate:_started_new_file:__s_n
mov qword [rsi + 0x240], rax
call dbg.LOG
mov r14, qword [rsi + 0x210]
jmp 0x14001bc04
mov r12d, dword [rsi + 0x24c]
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
cqo
mov rcx, rax
idiv r13
sub rcx, rdx
add rcx, r13
lea rax, [rcx + r12]
mov qword [rsi + 0x238], rax
jmp 0x14001bbd2
mov r9, rdi
mov r8, rbx
lea rdx, str.rename___s_____s__:_failed_n
xor ecx, ecx
call dbg.LOG
lea rcx, str.rename__
call sym.perror
mov rcx, rdi
call sym.free
mov r14, qword [rsi + 0x210]
jmp 0x14001bc04
xor r14d, r14d
jmp 0x14001bc04
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call dbg.strerror_x
mov r8, rbx
lea rdx, str.rotate:__s:_failed:__s_n
xor ecx, ecx
mov r9, rax
call dbg.LOG
mov r14, qword [rsi + 0x210]
jmp 0x14001bc04
mov rcx, rbx
call sym.strlen
mov r15, rax
lea rbp, [rbx + rax]
xor eax, eax
jmp 0x14001bb5b