Function at 0x7ff7c8e56290
Capabilities:
Check if file exists
Delete file
Get file size
Move file

Disassembly:
sub rsp, 0x58
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rcx, qword [0x7ff7c8ea3bb0]
cmp rcx, 0xffffffffffffffff
je 0x7ff7c8e564f3
mov eax, dword [0x7ff7c8ea6038]
xor r8d, r8d
mov edx, eax
mov qword [rsp + 0x30], r8
inc eax
mov dword [0x7ff7c8ea6038], eax
cmp edx, 0x64
jb 0x7ff7c8e564f3
lea rdx, [rsp + 0x30]
mov dword [0x7ff7c8ea6038], r8d
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x7ff7c8e56311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ServiceLogFileSizeReset___GetFileSize___error_code:__d__n
call fcn.7ff7c8e566b0
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x58
ret
cmp qword [rsp + 0x30], 0x500000
jl 0x7ff7c8e564f3
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r14
call fcn.7ff7c8e55e70
or r14, 0xffffffffffffffff
mov rbx, rax
mov rcx, r14
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x7ff7c8e56343
lea esi, [rcx + 0x11]
mov eax, 2
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.7ff7c8e636bc
mov rdi, rax
test rax, rax
jne 0x7ff7c8e5637f
lea rcx, str.ServiceLogFileSizeReset___Cannot_allocate_memory_for_backup_log_file_name__n
call fcn.7ff7c8e566b0
jmp 0x7ff7c8e564df
mov qword [rsp + 0x68], rbp
lea r8, str._s_s_bak.log
mov qword [rsp + 0x40], r15
mov r9, rbx
lea r15, str.comae
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], r15
call fcn.7ff7c8e48140
mov rcx, r14
nop dword [rax]
cmp word [rbx + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x7ff7c8e563b0
lea ebp, [rcx + 0xd]
mov eax, 2
mul rbp
cmovo rax, r14
mov rcx, rax
call fcn.7ff7c8e636bc
mov rsi, rax
test rax, rax
jne 0x7ff7c8e563ec
lea rcx, str.ServiceLogFileSizeReset___Cannot_allocate_memory_for_log_file_name__n
call fcn.7ff7c8e566b0
jmp 0x7ff7c8e564d5
mov r9, rbx
mov qword [rsp + 0x20], r15
lea r8, str._s_s.log
mov rdx, rbp
mov rcx, rsi
call fcn.7ff7c8e48140
mov edx, 0x80
mov rcx, rdi
call fcn.7ff7c8e6b688
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x7ff7c8e5643d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x7ff7c8e5643d
mov r8d, eax
lea rcx, str.ServiceLogFileSizeReset___DeleteFileW__s__error_code:__d__n
mov rdx, rdi
call fcn.7ff7c8e566b0
mov r8, qword [rsp + 0x30]
lea rcx, str.Rotating_from___s____I64u_bytes__to___s__n
mov r9, rdi
mov rdx, rsi
call fcn.7ff7c8e56760
mov rcx, qword [0x7ff7c8ea3bb0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x7ff7c8e5647b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ServiceLogFileSizeReset___CloseHandle___error_code:__d__n
call fcn.7ff7c8e566b0
jmp 0x7ff7c8e564d5
mov rdx, rdi
mov qword [0x7ff7c8ea3bb0], r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x7ff7c8e564ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
lea rcx, str.ServiceLogFileSizeReset___MoveFileW___from__s_to__s._error_code:__d__n
mov r9d, eax
mov rdx, rsi
call fcn.7ff7c8e566b0
mov rcx, rsi
call fcn.7ff7c8e560c0
test al, al
je 0x7ff7c8e564c5
lea rcx, str.ServiceLogFileSizeReset___success__n
call fcn.7ff7c8e566b0
mov rcx, rdi
call fcn.7ff7c8e60e84
mov rcx, rsi
call fcn.7ff7c8e60e84
mov rbp, qword [rsp + 0x68]
mov r15, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x60]
mov r14, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x58
ret