Function at 0x1400218a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1070]
mov eax, 0x1170
call fcn.14003b550
sub rsp, rax
mov rax, qword [0x1404b3028]
xor rax, rsp
mov qword [rbp + 0x1060], rax
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x20], 0
test rcx, rcx
jne 0x1400218ee
xor al, al
jmp 0x140021bd0
call fcn.14000ebf0
mov r14, rax
mov rcx, rax
call fcn.14000dd20
mov r9, rbx
mov edx, 1
mov r8d, 0x1000
lea rcx, [rbp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x14002194c
nop dword [rax + rax]
mov r8, rax
lea rdx, [rbp + 0x60]
mov rcx, r14
call fcn.14000dde0
mov r9, rbx
mov edx, 1
mov r8d, 0x1000
lea rcx, [rbp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
jne 0x140021920
mov rcx, r14
call fcn.14000d7b0
mov rdi, rax
mov rcx, r14
call fcn.14000ec40
lea rax, [0x140311a40]
mov qword [rsp + 0x40], rax
lea rax, [0x140311a48]
mov qword [rsp + 0x50], 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 [rsp + 0x20], 1
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x40]
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 [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x40], r14
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x58]
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 [rsp + 0x58], rax
mov qword [rbp - 0x40], 0
mov dword [rbp - 0x38], 0
lea rdx, [0x140022690]
lea rcx, [rsp + 0x50]
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::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
mov edx, reloc.COMCTL32.dll_CreateUpDownControl
lea rcx, [rsp + 0x28]
call sub.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov dl, 0x30
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::fill_char____ptr64]
mov rdx, rdi
mov rcx, rbx
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___unsigned_long_long_unsigned___int64_____ptr64]
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x40], xmm0
movdqa xmm1, xmmword [0x140310660]
movdqu xmmword [rbp + 0x50], xmm1
mov byte [rbp + 0x40], 0
mov dword [rsp + 0x20], 5
movups xmmword [rsp + 0x28], xmm0
mov ecx, dword [rbp - 0x38]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x140021abb
lea rcx, [rsp + 0x58]
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 0x140021ab8
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pbase_void_const___ptr64]
mov rdi, rax
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov rbx, rax
cmp rax, qword [rbp - 0x40]
cmovb rbx, qword [rbp - 0x40]
sub rbx, rdi
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const___ptr64]
jmp 0x140021afb
mov ecx, dword [rbp - 0x38]
test cl, 4
jne 0x140021af1
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const___ptr64]
test rax, rax
je 0x140021af1
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const___ptr64]
mov rdi, rax
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::egptr_void_const___ptr64]
mov rbx, rax
sub rbx, rdi
jmp 0x140021afb
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x140021b10
mov r8, rbx
mov rdx, rdi
lea rcx, [rbp + 0x40]
call fcn.14001a9b0
nop
mov rax, qword [rsi + 0x10]
cmp qword [rsi + 0x18], 0x10
jb 0x140021b1e
mov rsi, qword [rsi]
lea rcx, [rbp + 0x40]
mov rbx, qword [rbp + 0x40]
mov rdi, qword [rbp + 0x58]
cmp rdi, 0x10
cmovae rcx, rbx
mov r8, qword [rbp + 0x50]
cmp r8, rax
jne 0x140021b4c
mov rdx, rsi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x140021b4c
mov sil, 1
jmp 0x140021b4f
xor sil, sil
cmp rdi, 0x10
jb 0x140021b8a
lea rdx, [rdi + 1]
mov rax, rbx
cmp rdx, 0x1000
jb 0x140021b81
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140021b81
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.14003b258
nop
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx + 4]
mov qword [rsp + rdx + 0x40], r14
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0x98]
mov dword [rsp + rdx + 0x3c], r8d
lea rcx, [rsp + 0x58]
call fcn.140020dc0
lea rcx, [rsp + 0x60]
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 - 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, sil
mov rcx, qword [rbp + 0x1060]
xor rcx, rsp
call fcn.14003b100
lea r11, [rsp + 0x1170]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret