Function at 0x14000d940
Capabilities:
Get file size
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rdi, rdx
mov rbx, rcx
cmp byte [rcx + 0x58], 1
je 0x14000dba7
xor r12d, r12d
mov qword [rbp - 0x20], r12
mov r14d, r12d
mov qword [rbp - 0x18], r12
mov r15d, r12d
mov qword [rbp - 0x10], r12
mov qword [rbp - 8], r12
cmp byte [rcx + 0x59], r12b
jne 0x14000dae3
cmp byte [rcx + 0x58], 3
jne 0x14000dae3
cmp dword [rcx + 0x10], 0xfde9
jne 0x14000dae3
lea rax, [0x14007b800]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 3
movaps xmm0, xmmword [rbp - 0x30]
movdqa xmmword [rbp - 0x30], xmm0
lea rdx, [rbp - 0x30]
mov rcx, rdi
call fcn.14000c350
test al, al
jne 0x14000dae3
lea rdx, [rbp + 0x30]
mov rcx, qword [rbx + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14000dae3
cmp qword [rbp + 0x30], r12
jne 0x14000dae3
mov rdx, qword [rdi + 8]
add rdx, 3
lea rcx, [rbp - 0x20]
call fcn.14000b5e0
test rax, rax
je 0x14000da46
cmp byte [rbx + 0x18], r12b
jne 0x14000da25
mov byte [rbx + 0x18], 1
mov byte [rbx + 0x20], 1
mov rdx, qword [rbp - 0x18]
test rdx, rdx
je 0x14000da3e
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14000da3e
mov rdi, rdx
xor eax, eax
rep stosb byte [rdi], al
mov rcx, rdx
jmp 0x14000dba2
cmp qword [rbp - 0x20], 0
jne 0x14000dac9
mov r15, qword [rbp - 0x10]
test r15, r15
je 0x14000dac9
mov r14, qword [rbp - 0x18]
mov byte [r14], 0xef
cmp r15, 1
jbe 0x14000daaf
mov byte [r14 + 1], 0xbb
cmp r15, 2
jbe 0x14000da95
mov byte [r14 + 2], 0xbf
lea rcx, [r14 + 3]
mov r8, qword [rdi + 8]
mov rdx, qword [rdi]
call fcn.140026080
mov qword [rbp - 0x30], r14
mov qword [rbp - 0x28], r15
movups xmm0, xmmword [rbp - 0x30]
movups xmmword [rdi], xmm0
jmp 0x14000dae3
mov r8d, 0x1f1
lea rdx, str.datavect_unsigned_char_::operator___
lea rcx, str._af___i_s_
call fcn.1400126e0
int3
mov r8d, 0x1f1
lea rdx, str.datavect_unsigned_char_::operator___
lea rcx, str._af___i_s_
call fcn.1400126e0
int3
mov r8d, 0x1f1
lea rdx, str.datavect_unsigned_char_::operator___
lea rcx, str._af___i_s_
call fcn.1400126e0
int3
cmp qword [rdi + 8], 0
je 0x14000db8b
lea r13, str.WriteFile__
mov esi, 0x10000
cmp qword [rdi + 8], rsi
jae 0x14000db03
mov esi, dword [rdi + 8]
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x30]
mov r8d, esi
mov rdx, qword [rdi]
mov rcx, qword [rbx + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000db3e
mov eax, dword [rbp + 0x30]
mov rcx, qword [rdi + 8]
cmp rax, rcx
cmova rax, rcx
add qword [rdi], rax
sub rcx, rax
mov qword [rdi + 8], rcx
mov byte [rbx + 0x59], 1
jmp 0x14000db80
mov qword [rbp - 0x30], r13
mov qword [rbp - 0x28], 0xb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [rbx + 0x18], 0
jne 0x14000db69
mov byte [rbx + 0x18], 1
mov byte [rbx + 0x21], 1
movups xmm0, xmmword [rbp - 0x30]
movups xmmword [rbx + 0x28], xmm0
mov dword [rbx + 0x38], eax
mov eax, esi
mov rcx, qword [rdi + 8]
cmp rax, rcx
cmova rax, rcx
add qword [rdi], rax
sub rcx, rax
mov qword [rdi + 8], rcx
cmp qword [rdi + 8], 0
jne 0x14000daf5
test r14, r14
je 0x14000db9f
test r15, r15
je 0x14000db9f
mov rdi, r14
xor eax, eax
mov rcx, r15
rep stosb byte [rdi], al
mov rcx, r14
call fcn.140024f38
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret