Function at 0x140224300
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x150
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140302028]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov rsi, rcx
mov rcx, qword [rcx + 0x80]
xor r12d, r12d
test rcx, rcx
je 0x140224354
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rsi + 0x80], r12
mov rbx, qword [rsi + 0x68]
test rbx, rbx
je 0x14022453e
lea rdi, [rbx - 1]
mov r8, rdi
lea rdx, [rsi + 0x40]
lea rcx, [rsp + 0x48]
call fcn.14021c2a0
nop
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1402243e1
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x1402243d6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1402243d0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140224529
call fcn.14009f0ec
nop
mov rbx, rdi
test rdi, rdi
jmp 0x14022435b
mov r8, rbx
lea rdx, [rsi + 0x40]
lea rcx, [rsp + 0x28]
call fcn.14021c2a0
nop
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
nop
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
nop
test eax, eax
je 0x14022448d
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
nop
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
nop
test eax, eax
jne 0x140224571
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x1402244cb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1402244c6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140224530
call fcn.14009f0ec
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], 7
mov word [rsp + 0x28], r12w
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x14022451e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140224518
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140224537
call fcn.14009f0ec
nop
mov rbx, rdi
test rdi, rdi
jmp 0x14022435b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov dl, 1
lea rcx, [rsi + 0x78]
call fcn.1402240b0
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.14009f440
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov dl, 1
lea rcx, [rsi + 0x78]
call fcn.1402240b0
mov qword [rsi + 0x70], r12
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edi, dword [rax]
lea rdx, [rsp + 0x28]
lea rcx, [rbp - 0x60]
call fcn.14021d5a0
mov rbx, rax
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x40]
call fcn.14021d5a0
nop
mov r8, rax
lea rdx, str.rotating_file_sink:_failed_renaming
lea rcx, [rbp - 0x20]
call fcn.1400babe0
nop
lea r8, str._to
mov rdx, rax
lea rcx, [rbp]
call fcn.14007bd40
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.140127a50
nop
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1402185f0
lea rdx, [0x1402fb6b0]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
int3