Function at 0x140012620
Capabilities:
Write file on windows

Disassembly:
push rdi
push r12
push r13
sub rsp, 0x70
mov rdi, rcx
mov rax, qword [0x14018b5c0]
lea r8, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
xor rax, rsp
lea r10, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x68], rax
mov rdx, qword [rdi]
lea r12, [rdi + 8]
mov qword [rsp + 0x40], rdi
movsxd r9, dword [rdx + 4]
mov qword [r9 + rdi], r8
mov qword [r12], r10
cmp qword [r12 + 0x80], 0
je 0x14001267e
mov r8, qword [r12 + 0x18]
lea rax, [rdi + 0x78]
cmp rax, qword [r8]
je 0x140012891
cmp byte [r12 + 0x7c], 0
je 0x1400127c7
cmp qword [r12 + 0x80], 0
je 0x140012760
mov r8, qword [r12 + 0x18]
lea rax, [rdi + 0x78]
cmp rax, qword [r8]
je 0x140012861
cmp qword [r12 + 0x68], 0
je 0x140012752
cmp byte [r12 + 0x71], 0
je 0x140012752
mov rax, qword [r12]
mov rcx, r12
mov edx, 0xffffffff
mov qword [rsp + 0x38], r12
call qword [rax + 0x18]
mov r12, qword [rsp + 0x38]
cmp eax, 0xffffffff
je 0x140012752
mov r10, rsp
lea r8, [rsp + 0x48]
mov rcx, qword [r12 + 0x68]
add r12, 0x74
mov rdx, r12
lea r9, [rsp + 0x68]
lea rax, [rsp + 0x30]
mov r11, qword [rcx]
mov qword [r10 + 0x20], rax
call qword [r11 + 0x40]
mov r12, qword [rsp + 0x38]
test eax, eax
je 0x140012725
cmp eax, 1
je 0x14001272b
cmp eax, 3
jne 0x140012752
mov byte [r12 + 0x71], 0
jmp 0x140012752
mov byte [r12 + 0x71], 0
mov r8, qword [rsp + 0x30]
lea rax, [rsp + 0x48]
sub r8, rax
je 0x140012752
mov r9, qword [r12 + 0x80]
lea rcx, [rsp + 0x48]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [r12 + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor edx, edx
lea r11, [r12 + 8]
mov byte [r11 + 0x74], dl
lea r8, [r12 + 0x10]
mov byte [r8 + 0x61], dl
lea r13, [r12 + 0x28]
mov qword [r8 + 8], r11
lea r9, [r12 + 0x30]
mov qword [r8 + 0x10], r8
lea rcx, [r12 + 0x48]
mov qword [rcx - 0x10], r13
lea r10, [r12 + 0x4c]
mov qword [rcx - 8], r9
xor eax, eax
mov qword [r8], rax
mov qword [r9], rax
mov dword [r10], edx
mov qword [r11], rax
mov qword [r13], rax
mov dword [rcx], edx
mov r8, qword [0x140190b80]
mov qword [rcx + 8], rcx
mov qword [rcx + 0x10], r10
mov qword [rcx + 0x38], rax
mov qword [rcx + 0x2c], r8
mov qword [rcx + 0x20], rax
mov rax, qword [sym.imp.MSVCP140.dll_const_std::basic_streambuf_char__struct_std::char_traits_char__::vftable]
mov qword [r12], rax
mov r12, qword [r12 + 0x60]
test r12, r12
je 0x14001280c
mov rcx, qword [r12 + 8]
test rcx, rcx
je 0x1400127ff
mov rax, qword [rcx]
call qword [rax + 0x10]
test rax, rax
je 0x1400127ff
mov r8, qword [rax]
mov rcx, rax
mov edx, 1
call qword [r8]
mov rcx, r12
mov edx, 0x10
call fcn.14013ad50
mov r9, qword [rsp + 0x40]
add rdi, 0xa8
mov rdx, qword [sym.imp.MSVCP140.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov rcx, rdi
mov r10, qword [sym.imp.MSVCP140.dll_const_std::ios_base::vftable]
mov rax, qword [r9]
movsxd r8, dword [rax + 4]
mov qword [r8 + r9], rdx
mov qword [rdi], r10
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 + 0x68]
mov qword [rsp + 0x68], 0
xor rcx, rsp
cmp rcx, qword [0x14018b5c0]
jne 0x14001288c
add rsp, 0x70
pop r13
pop r12
pop rdi
ret
mov rax, qword [r12 + 0x88]
mov r9, qword [r12 + 0x90]
mov qword [r8], rax
sub r9, rax
mov r8, qword [r12 + 0x38]
mov qword [r8], rax
mov r10, qword [r12 + 0x50]
mov dword [r10], r9d
jmp 0x1400126ab
call fcn.14013ad30
mov rax, qword [r12 + 0x88]
mov r9, qword [r12 + 0x90]
mov qword [r8], rax
sub r9, rax
mov r8, qword [r12 + 0x38]
mov qword [r8], rax
mov r10, qword [r12 + 0x50]
mov dword [r10], r9d
jmp 0x14001267e