Function at 0x140018929
Capabilities:
Delete file
Get file size
Write file on windows

Disassembly:
test r8, r8
je 0x140018c01
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x400b0
call fcn.140068770
sub rsp, rax
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x40108], rbx
mov rax, qword [0x1400b14a0]
xor rax, rsp
mov qword [rsp + 0x400a0], rax
mov r12, r8
mov r13, rdx
mov rbp, rcx
mov qword [rsp + 0x80], rcx
mov byte [rsp + 0x88], 1
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rcx, [rbp + 0x28]
call fcn.1400018c0
mov rcx, rax
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r15 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140018bce
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x140018a2e
and eax, 0xfffffc00
cmp eax, 0x32000
jbe 0x140018a2e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x28]
call fcn.1400018c0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rbp + 0x28]
call fcn.1400018c0
mov rcx, rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r15 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rsi, 0xffffffffffffffff
je 0x140018bce
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
or r8, 0xffffffffffffffff
mov rcx, r8
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea rdx, [rcx - 1]
mov rcx, r8
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea ebx, [rdx + rcx + 0x3ff]
mov ecx, ebx
mov eax, 2
mul rcx
cmovo rax, r8
mov rcx, rax
call fcn.14005ba80
mov r14, rax
mov word [rax], r15w
lea rcx, [rbp + 0x50]
call fcn.1400018c0
movzx ecx, word [rsp + 0x9e]
movzx edx, word [rsp + 0x9c]
movzx edi, word [rsp + 0x9a]
movzx r8d, word [rsp + 0x98]
movzx r10d, word [rsp + 0x96]
movzx r11d, word [rsp + 0x92]
movzx r9d, word [rsp + 0x90]
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x40], edx
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], r8d
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
lea r8, str.__d__d__d__d:_d:_d:_d___s_:___s__:__s_r_n
mov edx, ebx
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_wnsprintfW]
lea rdx, [rsp + 0x74]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x40000
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
mov r8, r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 0x40000
jae 0x140018b55
mov eax, eax
mov byte [rsp + rax + 0xa0], r15b
jmp 0x140018b70
movzx eax, byte [rsp + 0xa0]
cmp byte [rsp + 0x4009f], r15b
cmovne eax, r15d
mov byte [rsp + 0xa0], al
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
mov dword [rsp + 0x70], r15d
lea r9d, [rax + 2]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x70]
mov r8d, edi
lea rdx, [rsp + 0xa0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call fcn.14005ba88
nop
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x400a0]
xor rcx, rsp
call fcn.14005ba60
mov rbx, qword [rsp + 0x40108]
add rsp, 0x400b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
repz ret