Function at 0x140005860
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r14, rdx
mov rdi, rcx
je case.default.0x140005881
add rsp, 0x20
pop r14
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const___ptr64]
mov rbp, rax
test rbx, rbx
jle 0x1400058fc
test rax, rax
jle 0x1400058dc
cmp rbx, rax
mov rcx, rdi
cmovl rbp, rbx
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov r8, rbp
mov rdx, r14
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov edx, ebp
mov rcx, rdi
add r14, rbp
sub rbx, rbp
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int____ptr64]
test rbx, rbx
jle 0x1400058fc
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400058fc
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov rbp, qword [rsp + 0x40]
sub rsi, rbx
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
pop rdi
pop rbx
ret
mov rbx, rcx
test rcx, rcx
je 0x140013bfc
lea ecx, [rdi + 0x40]
mov edx, 0xa0
call qword [0x1400dda48]
mov rdi, rax
test rax, rax
je 0x140013bfc
mov rcx, rax
mov rdx, rbx
mov r8d, 0x80
call 0x1400d5e1e
mov rdx, qword [rdi + 0x60]
test rdx, rdx
je 0x140013b09
lea rcx, [rbx + 0x80]
call 0x140013788
mov qword [rdi + 0x80], rax
mov rdx, qword [rdi + 0x68]
test rdx, rdx
je 0x140013b2a
mov rax, qword [rdi + 0x60]
lea rcx, [rbx + rax + 0x80]
call 0x140013788
mov qword [rdi + 0x88], rax
cmp qword [rdi + 0x70], 0
je 0x140013b77
mov rax, qword [rdi + 0x60]
mov rcx, qword [rdi + 0x68]
add rcx, rbx
lea rsi, [rcx + rax + 0x80]
xor eax, eax
test rsi, rsi
je 0x140013b70
lea edx, [rax + 0x14]
lea ecx, [rax + 0x40]
call qword [0x1400dda48]
test rax, rax
je 0x140013b70
mov rcx, qword [rsi]
mov qword [rax], rcx
mov rcx, qword [rsi + 8]
mov qword [rax + 8], rcx
mov ecx, dword [rsi + 0x10]
mov dword [rax + 0x10], ecx
mov qword [rdi + 0x90], rax
cmp qword [rdi + 0x78], 0
je 0x140013bfc
mov rdx, qword [rdi + 0x70]
mov rax, qword [rdi + 0x60]
xor esi, esi
add rdx, qword [rdi + 0x68]
add rdx, rbx
lea rbp, [rdx + rax + 0x80]
test rbp, rbp
je 0x140013bf5
lea edx, [rsi + 0x2c]
lea ecx, [rsi + 0x40]
call qword [0x1400dda48]
mov rsi, rax
test rax, rax
je 0x140013bf5
mov rcx, qword [rbp]
mov qword [rax], rcx
mov rcx, qword [rbp + 8]
mov qword [rax + 8], rcx
mov rcx, qword [rbp + 0x10]
mov qword [rax + 0x10], rcx
mov ecx, dword [rbp + 0x18]
mov dword [rax + 0x18], ecx
mov edx, dword [rsi + 4]
lea rcx, [rax + 0x1c]
lea rax, [rbp + 0x1c]
mov qword [rcx], rax
lea rax, [rdx + rbp + 0x1c]
mov qword [rsi + 0x24], rax
call 0x14001f5d0
mov edx, dword [rsi + 8]
lea rcx, [rsi + 0x24]
call 0x14001f5d0
mov qword [rdi + 0x98], rsi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x20
pop rdi
ret