Function at 0x14003a460
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rbp
push rbx
push rdi
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140068008]
xor rax, rsp
mov qword [rbp - 0x28], rax
mov rdi, rcx
mov qword [rbp - 0x40], rdx
mov ecx, dword [rbp + 0x48]
mov eax, r9d
mov edx, dword [rbp + 0x40]
mov ebx, r8d
test rdi, rdi
je 0x14003a660
mov r9, qword [rdi]
test r9, r9
je 0x14003a660
mov qword [r11 + 0x20], rsi
mov r8d, edx
mov qword [r11 - 0x20], r12
mov r10d, ecx
mov qword [r11 - 0x28], r13
mov esi, edx
mov qword [r11 - 0x30], r14
mov r12d, eax
mov qword [r11 - 0x38], r15
mov r14d, ecx
mov r11d, ebx
mov dword [rbp - 0x50], ecx
shr dword [rbp - 0x50], 0x18
mov r15d, ebx
mov r13d, edx
mov dword [rbp - 0x4c], ebx
shr dword [rbp - 0x4c], 0x18
mov dword [rbp - 0x48], eax
shr dword [rbp - 0x48], 0x10
mov dword [rbp - 0x44], eax
shr dword [rbp - 0x44], 0x18
shr r11d, 8
shr r15d, 0x10
shr r8d, 8
shr r10d, 8
shr esi, 0x10
shr r14d, 0x10
shr r12d, 8
shr r13d, 0x18
cmp dword [rdi + 0x11c], 1
jne 0x14003a555
mov byte [rbp - 0x31], cl
mov ecx, dword [rbp - 0x4c]
mov byte [rbp - 0x30], cl
mov ecx, dword [rbp - 0x44]
mov byte [rbp - 0x2c], cl
mov ecx, dword [rbp - 0x48]
mov byte [rbp - 0x35], dl
mov edx, dword [rbp - 0x50]
mov byte [rbp - 0x2b], cl
mov byte [rbp - 0x38], r13b
mov byte [rbp - 0x37], sil
mov byte [rbp - 0x36], r8b
mov byte [rbp - 0x34], dl
mov byte [rbp - 0x33], r14b
mov byte [rbp - 0x32], r10b
mov byte [rbp - 0x2f], r15b
mov byte [rbp - 0x2e], r11b
mov byte [rbp - 0x2d], bl
mov byte [rbp - 0x2a], r12b
jmp 0x14003a596
mov byte [rbp - 0x34], cl
mov ecx, dword [rbp - 0x50]
mov byte [rbp - 0x2c], al
mov eax, dword [rbp - 0x48]
mov byte [rbp - 0x31], cl
mov ecx, dword [rbp - 0x4c]
mov byte [rbp - 0x2a], al
mov eax, dword [rbp - 0x44]
mov byte [rbp - 0x2d], cl
mov byte [rbp - 0x38], dl
mov byte [rbp - 0x37], r8b
mov byte [rbp - 0x36], sil
mov byte [rbp - 0x35], r13b
mov byte [rbp - 0x33], r10b
mov byte [rbp - 0x32], r14b
mov byte [rbp - 0x30], bl
mov byte [rbp - 0x2f], r11b
mov byte [rbp - 0x2e], r15b
mov byte [rbp - 0x2b], r12b
mov edx, 1
mov byte [rbp - 0x29], al
lea rcx, [rbp - 0x38]
lea r8d, [rdx + 0xf]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r15, qword [rsp + 0x50]
xor r14d, r14d
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
cmp rax, 0x10
je 0x14003a5fe
lea ecx, [r14 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rdi + 0x128]
lea r8, [rdi + 0x1c]
mov rcx, rax
lea rdx, str._s:_lld:_could_not_write_packet_header_n
call fcn.140001010
lea rcx, [rdi + 0x1c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi], r14
mov r9, qword [rdi]
mov r8, rbx
mov rcx, qword [rbp - 0x40]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, rbx
je 0x14003a653
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rdi + 0x128]
lea r8, [rdi + 0x1c]
mov rcx, rax
lea rdx, str._s:_lld:_could_not_write_packet_contents_n
call fcn.140001010
lea rcx, [rdi + 0x1c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi], r14
mov rsi, qword [rsp + 0xa8]
mov r14, qword [rsp + 0x58]
mov rcx, qword [rbp - 0x28]
xor rcx, rsp
call fcn.14004da00
add rsp, 0x70
pop rdi
pop rbx
pop rbp
ret