Function at 0x14006da40
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
xor r14d, r14d
mov dword [rbp + 0xb0], r14d
cmp qword [rcx + 0x18], 7
jbe 0x14006da75
mov rbx, qword [rcx]
lea rax, [0x1400e39c0]
mov qword [rsp + 0x30], rax
lea rcx, [rbp - 0x28]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rbp + 0xb0], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea r15, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x30], r15
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x2c], edx
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x38], rax
mov byte [rbp - 0x4c], 0
mov byte [rbp - 0x57], 0
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x48], r14
mov rax, qword [0x1402093f8]
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x60], r14
mov r9d, 0x40
lea r8d, [r9 - 0x1e]
mov rdx, rbx
lea rcx, [rsp + 0x38]
call fcn.14006e360
test rax, rax
jne 0x14006db4d
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov r8, rdi
mov rdx, rsi
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
lea rcx, [rsp + 0x38]
test al, al
je 0x14006dcfb
cmp qword [rbp - 0x48], 0
je 0x14006dcb5
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const___ptr64]
lea rcx, [rbp - 0x58]
cmp rax, rcx
jne 0x14006dbab
mov r9, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x40]
mov r8, rdx
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char____ptr64__char____ptr64__char____ptr64____ptr64]
cmp qword [rbp - 0x60], 0
je 0x14006dc22
cmp byte [rbp - 0x57], 0
je 0x14006dc22
mov rax, qword [rsp + 0x38]
mov r8, qword [rax + 0x18]
lea rax, [fcn.14005e510]
mov edx, 0xffffffff
lea rcx, [rsp + 0x38]
cmp r8, rax
jne 0x14006dbde
call fcn.14005e510
jmp 0x14006dbe1
call r8
cmp eax, 0xffffffff
jne 0x14006dbea
xor bl, bl
jmp 0x14006dc24
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x60]
lea r8, [rbp + 0x40]
lea rdx, [rbp - 0x54]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14006dc73
sub eax, 1
je 0x14006dc77
cmp eax, 2
je 0x14006dc1e
xor bl, bl
jmp 0x14006dc24
mov byte [rbp - 0x57], 0
mov bl, 1
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, [rsp + 0x38]
test bl, bl
cmove rcx, r14
mov rbx, r14
test eax, eax
cmove rbx, rcx
mov byte [rbp - 0x4c], 0
mov byte [rbp - 0x57], 0
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x48], r14
mov rax, qword [0x1402093f8]
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x60], r14
test rbx, rbx
jne 0x14006dcf4
jmp 0x14006dcd6
mov byte [rbp - 0x57], 0
lea rax, [rbp + 0x40]
mov rbx, qword [rbp + 0xb0]
sub rbx, rax
je 0x14006dca9
mov r9, qword [rbp - 0x48]
mov r8, rbx
mov edx, 1
lea rcx, [rbp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x14006dca9
xor bl, bl
jmp 0x14006dc24
cmp byte [rbp - 0x57], 0
sete bl
jmp 0x14006dc24
mov byte [rbp - 0x4c], 0
mov byte [rbp - 0x57], 0
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x48], r14
mov rax, qword [0x1402093f8]
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x60], r14
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
xor bl, bl
jmp 0x14006de79
cmp qword [rbp - 0x48], 0
je 0x14006de38
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const___ptr64]
lea rcx, [rbp - 0x58]
cmp rax, rcx
jne 0x14006dd2b
mov r9, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x40]
mov r8, rdx
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char____ptr64__char____ptr64__char____ptr64____ptr64]
cmp qword [rbp - 0x60], 0
je 0x14006dda5
cmp byte [rbp - 0x57], 0
je 0x14006dda5
mov rax, qword [rsp + 0x38]
mov r8, qword [rax + 0x18]
lea rax, [fcn.14005e510]
mov edx, 0xffffffff
lea rcx, [rsp + 0x38]
cmp r8, rax
jne 0x14006dd5e
call fcn.14005e510
jmp 0x14006dd61
call r8
cmp eax, 0xffffffff
jne 0x14006dd6a
xor bl, bl
jmp 0x14006dda7
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x80]
lea r8, [rbp + 0x60]
lea rdx, [rbp - 0x54]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14006ddf6
sub eax, 1
je 0x14006ddfa
cmp eax, 2
je 0x14006dda1
xor bl, bl
jmp 0x14006dda7
mov byte [rbp - 0x57], 0
mov bl, 1
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, [rsp + 0x38]
test bl, bl
cmove rcx, r14
mov rbx, r14
test eax, eax
cmove rbx, rcx
mov byte [rbp - 0x4c], 0
mov byte [rbp - 0x57], 0
lea rcx, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x48], r14
mov rax, qword [0x1402093f8]
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x60], r14
test rbx, rbx
jne 0x14006de77
jmp 0x14006de59
mov byte [rbp - 0x57], 0
lea rax, [rbp + 0x60]
mov rbx, qword [rbp + 0xb0]
sub rbx, rax
je 0x14006de2c
mov r9, qword [rbp - 0x48]
mov r8, rbx
mov edx, 1
lea rcx, [rbp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x14006de2c
xor bl, bl
jmp 0x14006dda7
cmp byte [rbp - 0x57], 0
sete bl
jmp 0x14006dda7
mov byte [rbp - 0x4c], 0
mov byte [rbp - 0x57], 0
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x48], r14
mov rax, qword [0x1402093f8]
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x60], r14
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov bl, 1
mov rcx, qword [rsp + 0x30]
movsxd rdx, dword [rcx + 4]
mov qword [rsp + rdx + 0x30], r15
mov rcx, qword [rsp + 0x30]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0xa8]
mov dword [rsp + rdx + 0x2c], r8d
lea rcx, [rsp + 0x38]
call fcn.14005b030
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x28]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
movzx eax, bl
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x180
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret