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

Disassembly:
sub rsp, 0x58
mov rax, qword [0x7ff66a893088]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rcx, qword [0x7ff66a893bb0]
cmp rcx, 0xffffffffffffffff
je 0x7ff66a8464f3
mov eax, dword [0x7ff66a896038]
xor r8d, r8d
mov edx, eax
mov qword [rsp + 0x30], r8
inc eax
mov dword [0x7ff66a896038], eax
cmp edx, 0x64
jb 0x7ff66a8464f3
lea rdx, [rsp + 0x30]
mov dword [0x7ff66a896038], r8d
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x7ff66a846311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ServiceLogFileSizeReset___GetFileSize___error_code:__d__n
call fcn.7ff66a8466b0
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.7ff66a8489f0
add rsp, 0x58
ret
cmp qword [rsp + 0x30], 0x500000
jl 0x7ff66a8464f3
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r14
call fcn.7ff66a845e70
or r14, 0xffffffffffffffff
mov rbx, rax
mov rcx, r14
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x7ff66a846343
lea esi, [rcx + 0x11]
mov eax, 2
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.7ff66a8536bc
mov rdi, rax
test rax, rax
jne 0x7ff66a84637f
lea rcx, str.ServiceLogFileSizeReset___Cannot_allocate_memory_for_backup_log_file_name__n
call fcn.7ff66a8466b0
jmp 0x7ff66a8464df
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.7ff66a838140
mov rcx, r14
nop dword [rax]
cmp word [rbx + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x7ff66a8463b0
lea ebp, [rcx + 0xd]
mov eax, 2
mul rbp
cmovo rax, r14
mov rcx, rax
call fcn.7ff66a8536bc
mov rsi, rax
test rax, rax
jne 0x7ff66a8463ec
lea rcx, str.ServiceLogFileSizeReset___Cannot_allocate_memory_for_log_file_name__n
call fcn.7ff66a8466b0
jmp 0x7ff66a8464d5
mov r9, rbx
mov qword [rsp + 0x20], r15
lea r8, str._s_s.log
mov rdx, rbp
mov rcx, rsi
call fcn.7ff66a838140
mov edx, 0x80
mov rcx, rdi
call fcn.7ff66a85b688
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x7ff66a84643d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x7ff66a84643d
mov r8d, eax
lea rcx, str.ServiceLogFileSizeReset___DeleteFileW__s__error_code:__d__n
mov rdx, rdi
call fcn.7ff66a8466b0
mov r8, qword [rsp + 0x30]
lea rcx, str.Rotating_from___s____I64u_bytes__to___s__n
mov r9, rdi
mov rdx, rsi
call fcn.7ff66a846760
mov rcx, qword [0x7ff66a893bb0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x7ff66a84647b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ServiceLogFileSizeReset___CloseHandle___error_code:__d__n
call fcn.7ff66a8466b0
jmp 0x7ff66a8464d5
mov rdx, rdi
mov qword [0x7ff66a893bb0], r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x7ff66a8464ad
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.7ff66a8466b0
mov rcx, rsi
call fcn.7ff66a8460c0
test al, al
je 0x7ff66a8464c5
lea rcx, str.ServiceLogFileSizeReset___success__n
call fcn.7ff66a8466b0
mov rcx, rdi
call fcn.7ff66a850e84
mov rcx, rsi
call fcn.7ff66a850e84
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.7ff66a8489f0
add rsp, 0x58
ret