Function at 0x140005975
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()
mov qword [rbp - 8], 0
jmp 0x140005b26
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
not eax
shr al, 7
test al, al
je 0x1400059e0
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
mov word [rbp - 0xa], ax
add qword [rbp - 8], 1
jmp 0x140005b16
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
movsx eax, al
and eax, 0xe0
cmp eax, 0xc0
sete al
test al, al
je 0x140005a51
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
shl eax, 6
and ax, 0x7c0
mov ebx, eax
mov rax, qword [rbp - 8]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
and eax, 0x3f
or eax, ebx
mov word [rbp - 0xa], ax
add qword [rbp - 8], 2
jmp 0x140005b16
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
movsx eax, al
and eax, 0xf0
cmp eax, 0xe0
sete al
test al, al
je 0x140005add
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
shl eax, 0xc
mov ebx, eax
mov rax, qword [rbp - 8]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
shl eax, 6
and ax, 0xfc0
or ebx, eax
mov rax, qword [rbp - 8]
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long long) const
movzx eax, byte [rax]
cbw
and eax, 0x3f
or eax, ebx
mov word [rbp - 0xa], ax
add qword [rbp - 8], 3
jmp 0x140005b16
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x17
mov edx, 1
lea rax, str.Invalid_UTF_8_sequence_n
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0x20]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()
jmp 0x140005b51
movzx edx, word [rbp - 0xa]
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::push_back(wchar_t)
mov rax, qword [rbp + 0x28]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const
cmp qword [rbp - 8], rax
setb al
test al, al
jne 0x1400059a1
lea rdx, [rbp - 0x30]
mov rax, qword [rbp + 0x20]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()
mov rax, qword [rbp + 0x20]
add rsp, 0x58
pop rbx
pop rbp
ret