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

Disassembly:
push rdi
push r13
push r15
sub rsp, 0x60
cmp byte [0x140007700], 0
mov rdi, r8
mov r13, rdx
mov r15, rcx
jne 0x1400019eb
call fcn.140001c70
add rsp, 0x60
pop r15
pop r13
pop rdi
ret
mov qword [rsp + 0x80], rbx
xor r9d, r9d
xor ebx, ebx
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x30], rbx
xor r8d, r8d
mov dword [rsp + 0x28], 0xa0000080
mov edx, 0x40000000
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140001aca
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140001a77
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, r15
lea rcx, str.GetFileSizeEx_failed__error__d___s_n
mov edx, eax
call fcn.140001320
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, edi
mov rdx, r13
mov rcx, r15
call fcn.140001c70
jmp 0x140001c4e
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x140001af4
cmp rax, rdi
je 0x140001af4
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0xa0000080
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 1
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140001b06
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, r15
lea rcx, str.CreateFile_failed__error__d___s_n
mov edx, eax
call fcn.140001320
mov r8d, edi
mov rdx, r13
mov rcx, r15
call fcn.140001c70
jmp 0x140001c4e
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov qword [rsp + 0x88], rbp
mov rax, rdi
cqo
mov qword [rsp + 0x90], rsi
and edx, 0x3ffffff
mov qword [rsp + 0x58], r12
add rax, rdx
mov rbp, r13
sar rax, 0x1a
mov esi, ebx
mov r12, rax
test eax, eax
jle 0x140001b7b
nop dword [rax]
lea r9, [rsp + 0x98]
mov qword [rsp + 0x20], rbx
mov r8d, 0x4000000
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001bfe
mov eax, dword [rsp + 0x98]
inc esi
add rbp, rax
sub rdi, rax
cmp esi, r12d
jl 0x140001b40
mov rax, rdi
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0xfffffe00
movsxd rcx, eax
cmp rdi, rcx
lea esi, [rax + 0x200]
cmove esi, eax
test esi, esi
jle 0x140001c2e
lea r9, [rsp + 0x98]
mov qword [rsp + 0x20], rbx
mov r8d, esi
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001bce
cmp dword [rsp + 0x98], esi
je 0x140001c2e
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, r15
lea rcx, str.WriteFile_failed___d___s_n
mov edx, eax
call fcn.140001320
mov r8d, edi
mov rdx, r13
mov rcx, r15
call fcn.140001c70
jmp 0x140001c39
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, r15
lea rcx, str.WriteFile_failed___d___s_n
mov edx, eax
call fcn.140001320
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, edi
mov rdx, r13
mov rcx, r15
call fcn.140001c70
jmp 0x140001c39
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov r12, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
mov r14, qword [rsp + 0x50]
add rsp, 0x60
pop r15
pop r13
pop rdi
ret