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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14016ca00]
xor rax, rsp
mov qword [rbp + 0x2f], rax
movzx edi, dl
mov rbx, rcx
test dl, dl
je 0x140082a77
mov rcx, qword [rcx + 0xe0]
test rcx, rcx
je 0x140082a77
mov rax, qword [rcx]
mov rdx, qword [rbx + 0xe8]
call qword [rax + 8]
xor eax, eax
mov qword [rbp + 0x27], rax
mov rdx, rbx
lea rcx, [rbp + 0x27]
call fcn.140015bf0
nop
xor r12d, r12d
test dil, dil
je 0x140082c93
mov qword [rbp - 0x19], r12
mov qword [rbp - 0x11], r12
xor r8d, r8d
xor edx, edx
call fcn.140081ad0
mov rdx, rax
mov qword [rbp - 0x19], rax
lea rcx, [rbx + 0x18]
lea rax, [rbp - 0x19]
cmp rcx, rax
je 0x140082ad2
mov rax, qword [rcx]
mov qword [rcx], rdx
mov qword [rbp - 0x19], rax
mov rax, qword [rcx + 8]
mov qword [rcx + 8], r12
mov qword [rbp - 0x11], rax
lea rcx, [rbp - 0x19]
call fcn.140081960
nop
mov rcx, qword [rbp - 0x19]
call fcn.1400bd20c
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140082d90
nop
cmp dword [rbx + 0x30], 0
jbe 0x140082c70
cmp qword [rbp + 0x17], 0
je 0x140082c70
lea rcx, [rbp + 7]
cmp qword [rbp + 0x1f], 8
cmovae rcx, qword [rbp + 7]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140082c70
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov edx, dword [rbx + 0x30]
cmp eax, edx
sete r14b
cmp eax, edx
jbe 0x140082c2e
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esi, dword [rbx + 0x30]
mov dword [rbp + 3], r12d
xor eax, eax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], r12
mov byte [rbp - 0x29], al
mov edx, esi
lea r8, [rbp - 0x29]
lea rcx, [rbp - 0x19]
call fcn.140075490
mov qword [rsp + 0x20], r12
lea r9, [rbp + 3]
mov r8d, esi
mov r15, qword [rbp - 0x19]
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140082c12
cmp dword [rbp + 3], esi
jne 0x140082c12
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 1], r12d
mov qword [rsp + 0x20], r12
lea r9, [rbp - 1]
mov r8d, esi
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140082c12
cmp dword [rbp - 1], esi
jne 0x140082c15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x140082c15
mov r14b, 1
test r15, r15
je 0x140082c2e
mov rcx, r15
call fcn.1400bd20c
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], r12
test r14b, r14b
je 0x140082c4d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14b, r14b
je 0x140082c70
lea rcx, [rbp + 7]
cmp qword [rbp + 0x1f], 8
cmovae rcx, qword [rbp + 7]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
cmp qword [rbp + 0x1f], 8
jb 0x140082c80
mov rcx, qword [rbp + 7]
call fcn.1400bd20c
mov qword [rbp + 0x1f], 7
mov qword [rbp + 0x17], r12
mov word [rbp + 7], r12w
jmp 0x140082cfa
cmp qword [rbx + 0x20], r12
je 0x140082cfa
lea rcx, [rbx + 8]
mov rdx, qword [rcx]
lea rdi, [rbx + 0x18]
mov r9, qword [rdi]
mov r8, qword [r9]
call fcn.1400832d0
mov qword [rbp - 0x19], r12
mov qword [rbp - 0x11], r12
xor r8d, r8d
xor edx, edx
call fcn.140081ad0
mov rcx, rax
mov qword [rbp - 0x19], rax
lea rax, [rbp - 0x19]
cmp rdi, rax
je 0x140082ce7
mov rax, qword [rdi]
mov qword [rdi], rcx
mov qword [rbp - 0x19], rax
mov rax, qword [rdi + 8]
mov qword [rdi + 8], r12
mov qword [rbp - 0x11], rax
lea rcx, [rbp - 0x19]
call fcn.140081960
nop
mov rcx, qword [rbp - 0x19]
call fcn.1400bd20c
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140082d50
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], r12
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140082e40
nop
lea rcx, [rbp + 7]
cmp qword [rbp + 0x1f], 8
cmovae rcx, qword [rbp + 7]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
cmp qword [rbp + 0x1f], 8
jb 0x140082d3f
mov rcx, qword [rbp + 7]
call fcn.1400bd20c
mov qword [rbp + 0x1f], 7
mov qword [rbp + 0x17], r12
mov word [rbp + 7], r12w
mov dword [rbx + 0x30], r12d
lea rcx, [rbp + 0x27]
call fcn.140015c20
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400bcae0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret