Function at 0x1401be310
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rsi
nop
mov qword [rsp - 8], rdi
sub rsp, 8
sub rsp, 0x70
mov esi, edx
xchg r9, rdi
mov r9, rcx
xchg rdi, r9
cmp edx, 0xffffffff
jne 0x1401be35f
xor eax, eax
mov rsi, qword [rsp + 0x88]
add rsp, 0x70
push rbx
push rax
push rax
push rcx
push rbx
push rdx
push rax
push rax
xchg qword [rsp + 0x40], rdi
add rsp, 0x48
nop
add rsp, 8
jmp qword [rsp - 8]
xchg rbx, rdx
mov qword [rsp + 0x80], rdx
xchg rbx, rdx
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
test rax, rax
je 0x1401be3bd
xchg rcx, rdi
mov rdi, rcx
xchg rdi, rcx
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const___ptr64]
mov rcx, rdi
xchg rbx, rax
mov rax, rbx
xchg rbx, rax
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
cmp rax, rbx
jae 0x1401be3bd
xchg rcx, r10
mov r10, rdi
xchg rcx, r10
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], sil
mov eax, esi
jmp 0x1401be609
cmp qword [rdi + 0x80], 0
je 0x1401be5e1
xchg rcx, r12
mov r12, rdi
xchg r12, rcx
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, [rdi + 0x70]
cmp rax, rcx
jne 0x1401be40d
xchg r12, rdx
mov r12, qword [rdi + 0x88]
xchg rdx, r12
mov rcx, rdi
mov r9, qword [rdi + 0x90]
xchg rdx, r8
mov rdx, r8
xchg rdx, r8
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]
mov rcx, qword [rdi + 0x68]
test rcx, rcx
jne 0x1401be460
xchg rdx, r12
mov r12, qword [rdi + 0x80]
xchg r12, rdx
movsx ecx, sil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0x60c795dc
xor ecx, 0x31a42008
add ecx, 0x1f2b6949
sub ecx, 0x69c47800
sub ecx, 0x2419946
add ecx, 0xfb76f228
cmp eax, ecx
cmovne ecx, esi
mov eax, ecx
jmp 0x1401be609
lea rax, [rsp + 0x90]
mov byte [rsp + 0x40], sil
mov qword [rsp + 0x38], rax
lea rdx, [rdi + 0x74]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x41]
lea rax, [rsp + 0x48]
xchg rbx, rax
mov qword [rsp + 0x28], rbx
xchg rbx, rax
lea r8, [rsp + 0x40]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1401be506
sub eax, 1
je 0x1401be506
cmp eax, 2
jne 0x1401be5e1
movsx ecx, byte [rsp + 0x40]
mov rdx, qword [rdi + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0x50f7f2fc
add ecx, 0x2dba1ec2
sub ecx, 0x7770b256
xor ecx, 0x18ee4b86
add ecx, 0x40cc75b9
add ecx, 0x9f847558
cmp eax, ecx
cmovne ecx, esi
mov eax, ecx
jmp 0x1401be609
xchg rdx, rbx
mov rdx, qword [rsp + 0x90]
xchg rbx, rdx
lea rax, [rsp + 0x48]
sub rbx, rax
je 0x1401be575
xchg r15, r9
mov r15, qword [rdi + 0x80]
xchg r15, r9
lea rcx, [rsp + 0x48]
xchg r13, rbx
mov r8, r13
xchg r13, rbx
mov edx, 0x36add979
add edx, 0x48dd1c2b
sub edx, 0x6a51e051
add edx, 0x577908dd
sub edx, 0x5de2c744
add edx, 0x194a9bcc
sub edx, 0x2819f2b7
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbx, rax
jne 0x1401be5e1
lea rax, [rsp + 0x40]
mov byte [rdi + 0x71], 0x1a
xor byte [rdi + 0x71], 0x5a
add byte [rdi + 0x71], 0x31
xor byte [rdi + 0x71], 0x2f
sub byte [rdi + 0x71], 0x59
add byte [rdi + 0x71], 0x1b
sub byte [rdi + 0x71], 0x1f
cmp qword [rsp + 0x98], rax
pushf
mov ecx, 0x8363fef
add ecx, 0x1429ad
add ecx, 0x373799fd
sub ecx, 0x33ffdfc6
add ecx, 0x5379da84
sub ecx, 0xa996db0
xor ecx, 0x1598bede
xor ecx, 0x5e97f6e2
add ecx, 0xe0922764
popf
cmovne ecx, esi
mov eax, ecx
jmp 0x1401be609
mov eax, 0x748972c8
sub eax, 0x48909830
add eax, 0x50e2fb6
add eax, 0x174fb0a8
sub eax, 0x271ffc01
xor eax, 0x38fbbd9
sub eax, 0x17a2f725
xor eax, 0xf4e9f1f8
xchg r14, rbx
mov r14, qword [rsp + 0x80]
xchg r14, rbx
xchg rsi, rcx
mov rcx, qword [rsp + 0x88]
xchg rsi, rcx
add rsp, 0x70
nop
xchg qword [rsp], rdi
add rsp, 8
nop
add rsp, 8
jmp qword [rsp - 8]