Function at 0x140051180
Capabilities:
Write file on windows

Disassembly:
push rbx
push r13
push r14
push r15
push rbp
sub rsp, 0x60
lea r9, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov r13, rcx
lea r11, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov rax, qword [0x1400b8bc0]
mov r14, rdx
xor rax, rsp
mov qword [rsp + 0x58], rax
lea rbp, [r13 - 0xa8]
mov r8, qword [rbp]
lea rbx, [r13 - 0xa0]
movsxd r10, dword [r8 + 4]
mov qword [r10 + rbp], r9
mov qword [rbx], r11
cmp qword [rbx + 0x80], 0
je 0x1400511e7
mov r8, qword [rbx + 0x18]
lea rdx, [r13 - 0x30]
cmp rdx, qword [r8]
je 0x1400513bc
cmp byte [rbx + 0x7c], 0
je 0x14005130c
cmp qword [rbx + 0x80], 0
je 0x1400512a5
mov r8, qword [rbx + 0x18]
lea rdx, [r13 - 0x30]
cmp rdx, qword [r8]
je 0x140051390
cmp qword [rbx + 0x68], 0
je 0x140051298
cmp byte [rbx + 0x71], 0
je 0x140051298
mov r8, qword [rbx]
mov rcx, rbx
mov edx, 0xffffffff
call qword [r8 + 0x18]
cmp eax, 0xffffffff
je 0x140051298
mov rcx, qword [rbx + 0x68]
mov r15, rsp
lea rdx, [r13 - 0x2c]
lea r8, [rsp + 0x38]
mov r10, qword [rcx]
lea r9, [rsp + 0x58]
lea r11, [rsp + 0x30]
mov qword [r15 + 0x20], r11
call qword [r10 + 0x40]
test eax, eax
je 0x14005126e
cmp eax, 1
je 0x140051272
cmp eax, 3
jne 0x140051298
mov byte [rbx + 0x71], 0
jmp 0x140051298
mov byte [rbx + 0x71], 0
mov r8, qword [rsp + 0x30]
lea rdx, [rsp + 0x38]
sub r8, rdx
je 0x140051298
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
lea r11, [r13 - 0x98]
mov byte [rbx + 0x7c], al
lea r8, [r13 - 0x90]
mov byte [rbx + 0x71], al
lea r15, [r13 - 0x78]
mov qword [rbx + 0x18], r11
lea r9, [r13 - 0x70]
mov qword [rbx + 0x20], r8
lea rcx, [r13 - 0x58]
mov qword [rbx + 0x38], r15
lea r10, [r13 - 0x54]
mov qword [rbx + 0x40], r9
xor edx, edx
mov qword [r8], rdx
mov qword [r9], rdx
mov dword [r10], eax
mov qword [r11], rdx
mov qword [r15], rdx
mov dword [rcx], eax
mov r8, qword [0x1400c5500]
mov qword [rbx + 0x50], rcx
mov qword [rbx + 0x58], r10
mov qword [rbx + 0x80], rdx
mov qword [r13 - 0x2c], r8
mov qword [rbx + 0x68], rdx
mov rdx, qword [sym.imp.MSVCP140.dll_const_std::basic_streambuf_char__struct_std::char_traits_char__::vftable]
mov rcx, qword [rbx + 0x60]
mov qword [rbx], rdx
test rcx, rcx
je 0x140051329
mov edx, 1
call fcn.1400533c0
mov rdx, qword [rbp]
mov rcx, r13
mov rbx, qword [sym.imp.MSVCP140.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov r9, qword [sym.imp.MSVCP140.dll_const_std::ios_base::vftable]
movsxd r8, dword [rdx + 4]
mov qword [r8 + rbp], rbx
mov qword [r13], r9
call qword [sym.imp.MSVCP140.dll_private:_static_void___cdecl_std::ios_base::_Ios_base_dtor_class_std::ios_base____ptr64_]
test r14, 1
je 0x140051366
mov rcx, rbp
mov edx, 0x108
call fcn.140097260
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x58], 0
xor rcx, rsp
cmp rcx, qword [0x1400b8bc0]
jne 0x1400513b7
mov rax, rbp
add rsp, 0x60
pop rbp
pop r15
pop r14
pop r13
pop rbx
ret
mov rdx, qword [rbx + 0x88]
mov r9, qword [rbx + 0x90]
mov qword [r8], rdx
sub r9, rdx
mov r8, qword [rbx + 0x38]
mov qword [r8], rdx
mov r10, qword [rbx + 0x50]
mov dword [r10], r9d
jmp 0x140051210
call fcn.140097240
mov rdx, qword [rbx + 0x88]
mov r9, qword [rbx + 0x90]
mov qword [r8], rdx
sub r9, rdx
mov r8, qword [rbx + 0x38]
mov qword [r8], rdx
mov r10, qword [rbx + 0x50]
mov dword [r10], r9d
jmp 0x1400511e7
mov eax, dword [rcx - 4]
sub rcx, rax
jmp 0x140051180