Function at 0x14000aec0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x170]
sub rsp, 0x270
mov r14, rcx
xor r15d, r15d
mov dword [rsp + 0x30], r15d
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x38], xmm1
mov qword [rsp + 0x48], r15
lea rdx, [rsp + 0x38]
call fcn.140007da0
mov dword [rsp + 0x30], 1
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x14000af8e
mov rbx, rdi
mov rsi, qword [rsp + 0x40]
cmp rdi, rsi
je 0x14000af33
mov rcx, rbx
call fcn.1400086a0
add rbx, 0x60
cmp rbx, rsi
jne 0x14000af22
mov rcx, qword [rsp + 0x48]
sub rcx, rdi
movabs rax, 0x2aaaaaaaaaaaaaab
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rdx, [rdx + rdx*2]
shl rdx, 5
mov rax, rdi
cmp rdx, 0x1000
jb 0x14000af86
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000af86
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.1401896b8
lea rbx, [0x14022d080]
cmp qword [0x14022d098], 0x10
cmovae rbx, qword [0x14022d080]
lea rdi, [0x140000000]
lea rax, [rdi + 0x1a4f98]
mov qword [rsp + 0x60], rax
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x30], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_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 + 0x60]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rsi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rax, [rsp + 0x70]
mov qword [rbp + 0x1a8], rax
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x70], rax
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x10], r15
mov rax, qword [0x14023add8]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], r15
mov r9d, 0x40
lea r8d, [r9 - 0x3f]
mov rdx, rbx
lea rcx, [rsp + 0x70]
call fcn.14000de70
test rax, rax
jne 0x14000b08f
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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 rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], rsi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
mov rcx, qword [rsp + 0x60]
movsxd rax, dword [rcx + 4]
test byte [rsp + rax + 0x70], 6
jne 0x14000b385
lea rax, [rdi + 0x1a4b70]
mov qword [rbp + 0x70], rax
lea rax, [0x1401a4b78]
mov qword [rbp + 0x80], rax
lea rcx, [rbp + 0x108]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x30], 7
xor r8d, r8d
lea rdx, [rbp + 0x88]
lea rcx, [rbp + 0x70]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
nop
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx + 0x70], rdi
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x6c], edx
lea rcx, [rbp + 0x88]
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_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x88], rax
mov qword [rbp + 0xf0], r15
mov dword [rbp + 0xf8], r15d
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x80]
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__::operator___class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
cmp qword [rbp - 0x10], 0
je 0x14000b28f
mov rax, qword [rbp - 0x78]
lea rcx, [rbp - 0x20]
cmp qword [rax], rcx
jne 0x14000b19b
mov rdx, qword [rbp]
mov rcx, qword [rbp - 8]
mov qword [rax], rcx
mov rax, qword [rbp - 0x58]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x40]
mov dword [rax], edx
cmp qword [rbp - 0x28], 0
je 0x14000b1fd
cmp byte [rbp - 0x1f], 0
je 0x14000b1fd
mov rax, qword [rsp + 0x70]
mov edx, 0xffffffff
lea rcx, [rsp + 0x70]
call qword [rax + 0x18]
cmp eax, 0xffffffff
jne 0x14000b1c3
xor al, al
jmp 0x14000b1ff
lea rax, [rbp + 0x1a8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
lea rdx, [rbp - 0x1c]
mov rcx, qword [rbp - 0x28]
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 0x14000b24b
sub eax, 1
je 0x14000b24f
cmp eax, 2
je 0x14000b1f9
xor al, al
jmp 0x14000b1ff
mov byte [rbp - 0x1f], 0
mov al, 1
lea rbx, [rsp + 0x70]
test al, al
cmove rbx, r15
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
cmovne rbx, r15
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x10], r15
mov rax, qword [0x14023add8]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], r15
test rbx, rbx
jne 0x14000b2d3
jmp 0x14000b2b5
mov byte [rbp - 0x1f], 0
lea rax, [rsp + 0x38]
mov rbx, qword [rbp + 0x1a8]
sub rbx, rax
je 0x14000b283
mov r9, qword [rbp - 0x10]
mov r8, rbx
mov edx, 1
lea rcx, [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
je 0x14000b283
xor al, al
jmp 0x14000b1ff
cmp byte [rbp - 0x1f], 0
sete al
jmp 0x14000b1ff
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x10], r15
mov rax, qword [0x14023add8]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], r15
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
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]
lea rdx, [rsp + 0x38]
lea rcx, [rbp + 0x88]
call fcn.14000fa90
mov dword [rsp + 0x30], setsockopt
lea rdx, [rsp + 0x38]
mov rcx, r14
call fcn.1400074b0
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0x10
jb 0x14000b33b
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000b335
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000b335
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401896b8
nop
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x70], rdi
mov rax, qword [rbp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x6c], edx
lea rcx, [rbp + 0x88]
call fcn.140008560
lea rcx, [rbp + 0x90]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x108]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rsp + 0x60]
movsxd rax, dword [rcx + 4]
mov qword [rsp + rax + 0x60], rsi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x70]
call fcn.1400084f0
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rax, r14
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x270
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret