Function at 0x140014940
Capabilities:
Write file on windows

Disassembly:
push rsi
push r12
push r13
push r14
push rbp
sub rsp, 0xa0
lea rdx, vtable.CResult.0
mov qword [rsp + 0xd0], rcx
lea rsi, vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov rbp, qword [rsp + 0xd0]
lea r12, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov rax, qword [0x14018b5c0]
xor rax, rsp
mov qword [rsp + 0x90], rax
lea r10, [rbp + 0x120]
mov r8, qword [r10]
lea r13, [rbp + 0x138]
mov qword [rbp], rdx
mov qword [rsp + 0x40], r10
movsxd r9, dword [r8 + 4]
mov qword [r9 + r10], rsi
mov qword [r13], r12
cmp qword [r13 + 0x80], 0
je 0x1400149ca
mov r8, qword [r13 + 0x18]
lea rax, [rbp + 0x1a8]
cmp rax, qword [r8]
je 0x140014e67
cmp byte [r13 + 0x7c], 0
je 0x140014b05
cmp qword [r13 + 0x80], 0
je 0x140014aa5
mov r8, qword [r13 + 0x18]
lea rax, [rbp + 0x1a8]
cmp rax, qword [r8]
je 0x140014ded
cmp qword [r13 + 0x68], 0
je 0x140014a98
cmp byte [r13 + 0x71], 0
je 0x140014a98
mov rax, qword [r13]
mov rcx, r13
mov edx, 0xffffffff
mov qword [rsp + 0x38], r13
call qword [rax + 0x18]
mov r13, qword [rsp + 0x38]
cmp eax, 0xffffffff
je 0x140014a98
mov r10, rsp
lea r8, [rsp + 0x50]
mov rcx, qword [r13 + 0x68]
add r13, 0x74
mov rdx, r13
lea r9, [rsp + 0x70]
lea rax, [rsp + 0x30]
mov r11, qword [rcx]
mov qword [r10 + 0x20], rax
call qword [r11 + 0x40]
mov r13, qword [rsp + 0x38]
test eax, eax
je 0x140014a6d
cmp eax, 1
je 0x140014a72
cmp eax, 3
jne 0x140014a98
mov byte [r13 + 0x71], 0
jmp 0x140014a98
mov byte [r13 + 0x71], 0
mov r8, qword [rsp + 0x30]
lea rax, [rsp + 0x50]
sub r8, rax
je 0x140014a98
mov r9, qword [r13 + 0x80]
lea rcx, [rsp + 0x50]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [r13 + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor edx, edx
lea r11, [r13 + 8]
mov byte [r13 + 0x7c], dl
lea r8, [r13 + 0x10]
mov byte [r13 + 0x71], dl
lea r14, [r13 + 0x28]
mov qword [r13 + 0x18], r11
lea r9, [r13 + 0x30]
mov qword [r13 + 0x20], r8
lea rcx, [r13 + 0x48]
mov qword [r13 + 0x38], r14
lea r10, [r13 + 0x4c]
mov qword [r13 + 0x40], r9
xor eax, eax
mov qword [r8], rax
mov qword [r9], rax
mov dword [r10], edx
mov qword [r11], rax
mov qword [r14], rax
mov dword [rcx], edx
mov r8, qword [0x140190b80]
mov qword [r13 + 0x50], rcx
mov qword [r13 + 0x58], r10
mov qword [rcx + 0x38], rax
mov qword [r13 + 0x74], r8
mov qword [r13 + 0x68], rax
mov rax, qword [sym.imp.MSVCP140.dll_const_std::basic_streambuf_char__struct_std::char_traits_char__::vftable]
mov qword [r13], rax
mov r13, qword [r13 + 0x60]
test r13, r13
je 0x140014b48
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x140014b3b
mov rax, qword [rcx]
call qword [rax + 0x10]
test rax, rax
je 0x140014b3b
mov r8, qword [rax]
mov rcx, rax
mov edx, 1
call qword [r8]
mov rcx, r13
mov edx, 0x10
call fcn.14013ad50
mov rax, qword [rsp + 0x40]
add rbp, 0x1d8
mov r8, qword [sym.imp.MSVCP140.dll_const_std::basic_iostream_char__struct_std::char_traits_char__::vftable]
mov rcx, rbp
mov r11, qword [sym.imp.MSVCP140.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov rdx, qword [rax]
movsxd r9, dword [rdx + 4]
mov rdx, qword [sym.imp.MSVCP140.dll_const_std::basic_istream_char__struct_std::char_traits_char__::vftable]
mov qword [r9 + rax], r8
mov r10, qword [rax + 0x10]
movsxd r13, dword [r10 + 4]
mov qword [r13 + rax + 0x10], r11
mov r14, qword [rax]
movsxd r8, dword [r14 + 4]
mov qword [r8 + rax], rdx
mov rax, qword [sym.imp.MSVCP140.dll_const_std::ios_base::vftable]
mov qword [rbp], rax
call qword [sym.imp.MSVCP140.dll_private:_static_void___cdecl_std::ios_base::_Ios_base_dtor_class_std::ios_base____ptr64_]
mov r13, qword [rsp + 0xd0]
lea rbp, [r13 + 8]
mov qword [rsp + 0x48], rbp
mov rax, qword [rbp]
movsxd rdx, dword [rax + 4]
mov qword [rdx + rbp], rsi
lea rbp, [r13 + 0x20]
mov qword [rbp], r12
cmp qword [rbp + 0x80], 0
je 0x140014be3
mov rsi, qword [rbp + 0x18]
lea rax, [r13 + 0x90]
cmp rax, qword [rsi]
je 0x140014e40
cmp byte [rbp + 0x7c], 0
je 0x140014d20
cmp qword [rbp + 0x80], 0
je 0x140014cbd
mov rsi, qword [rbp + 0x18]
lea rax, [r13 + 0x90]
cmp rax, qword [rsi]
je 0x140014e14
cmp qword [rbp + 0x68], 0
je 0x140014cb0
cmp byte [rbp + 0x71], 0
je 0x140014cb0
mov rax, qword [rbp]
mov rcx, rbp
mov edx, 0xffffffff
mov qword [rsp + 0x40], rbp
call qword [rax + 0x18]
mov rbp, qword [rsp + 0x40]
cmp eax, 0xffffffff
je 0x140014cb0
mov rsi, rsp
lea r8, [rsp + 0x70]
mov rcx, qword [rbp + 0x68]
add rbp, 0x74
mov rdx, rbp
lea r9, [rsp + 0x90]
lea rax, [rsp + 0x38]
mov r10, qword [rcx]
mov qword [rsi + 0x20], rax
call qword [r10 + 0x40]
mov rbp, qword [rsp + 0x40]
test eax, eax
je 0x140014c86
cmp eax, 1
je 0x140014c8a
cmp eax, 3
jne 0x140014cb0
mov byte [rbp + 0x71], 0
jmp 0x140014cb0
mov byte [rbp + 0x71], 0
mov r8, qword [rsp + 0x38]
lea rax, [rsp + 0x70]
sub r8, rax
je 0x140014cb0
mov r9, qword [rbp + 0x80]
lea rcx, [rsp + 0x70]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rbp + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor r11d, r11d
lea r9, [rbp + 8]
mov byte [rbp + 0x7c], r11b
lea rax, [rbp + 0x10]
mov byte [rbp + 0x71], r11b
lea r10, [rbp + 0x28]
mov qword [rbp + 0x18], r9
lea rsi, [rbp + 0x30]
mov qword [rbp + 0x20], rax
lea r12, [rbp + 0x48]
mov qword [rbp + 0x38], r10
lea r8, [rbp + 0x4c]
mov qword [rbp + 0x40], rsi
xor edx, edx
mov qword [rax], rdx
mov qword [rsi], rdx
mov dword [r8], r11d
mov qword [r9], rdx
mov qword [r10], rdx
mov dword [r12], r11d
mov r14, qword [0x140190b80]
mov qword [rbp + 0x50], r12
mov qword [rbp + 0x58], r8
mov qword [rax + 0x70], rdx
mov qword [rbp + 0x74], r14
mov qword [rbp + 0x68], rdx
mov rax, qword [sym.imp.MSVCP140.dll_const_std::basic_streambuf_char__struct_std::char_traits_char__::vftable]
mov qword [rbp], rax
mov rbp, qword [rbp + 0x60]
test rbp, rbp
je 0x140014d62
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140014d55
mov rax, qword [rcx]
call qword [rax + 0x10]
test rax, rax
je 0x140014d55
mov rsi, qword [rax]
mov rcx, rax
mov edx, 1
call qword [rsi]
mov rcx, rbp
mov edx, 0x10
call fcn.14013ad50
mov rcx, qword [rsp + 0x48]
add r13, 0xc0
mov rdx, qword [sym.imp.MSVCP140.dll_const_std::basic_iostream_char__struct_std::char_traits_char__::vftable]
mov r8, qword [sym.imp.MSVCP140.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov rax, qword [rcx]
lea r10, [rcx + 0x10]
mov r12, qword [sym.imp.MSVCP140.dll_const_std::basic_istream_char__struct_std::char_traits_char__::vftable]
movsxd rbp, dword [rax + 4]
mov rax, qword [sym.imp.MSVCP140.dll_const_std::ios_base::vftable]
mov qword [rbp + rcx], rdx
mov rsi, qword [r10]
movsxd r9, dword [rsi + 4]
mov qword [r9 + r10], r8
mov r11, qword [rcx]
movsxd r14, dword [r11 + 4]
mov qword [r14 + rcx], r12
mov rcx, r13
mov qword [r13], rax
call qword [sym.imp.MSVCP140.dll_private:_static_void___cdecl_std::ios_base::_Ios_base_dtor_class_std::ios_base____ptr64_]
mov rcx, qword [rsp + 0x90]
mov qword [rsp + 0x90], 0
xor rcx, rsp
cmp rcx, qword [0x14018b5c0]
jne 0x140014e3b
add rsp, 0xa0
pop rbp
pop r14
pop r13
pop r12
pop rsi
ret
mov rax, qword [r13 + 0x88]
mov r9, qword [r13 + 0x90]
mov qword [r8], rax
sub r9, rax
mov r8, qword [r13 + 0x38]
mov qword [r8], rax
mov r10, qword [r13 + 0x50]
mov dword [r10], r9d
jmp 0x1400149f7
mov rax, qword [rbp + 0x88]
mov r8, qword [rbp + 0x90]
mov qword [rsi], rax
sub r8, rax
mov rsi, qword [rbp + 0x38]
mov qword [rsi], rax
mov r9, qword [rbp + 0x50]
mov dword [r9], r8d
jmp 0x140014c0f
call fcn.14013ad30
mov rax, qword [rbp + 0x88]
mov r8, qword [rbp + 0x90]
mov qword [rsi], rax
sub r8, rax
mov rsi, qword [rbp + 0x38]
mov qword [rsi], rax
mov r9, qword [rbp + 0x50]
mov dword [r9], r8d
jmp 0x140014be3
mov rax, qword [r13 + 0x88]
mov r9, qword [r13 + 0x90]
mov qword [r8], rax
sub r9, rax
mov r8, qword [r13 + 0x38]
mov qword [r8], rax
mov r10, qword [r13 + 0x50]
mov dword [r10], r9d
jmp 0x1400149ca