Function at 0x140002920
Capabilities:
Read file on windows

Disassembly:
push rsi
sub rsp, 0x140
mov qword [rsp + 0x130], rcx
mov rax, qword [rsp + 0x130]
mov qword [rsp + 0xc8], rax
cmp qword [rax + 0x78], 0
jne 0x14000295c
call method.std::__1::char_traits_char_.eof_abi:ne180100___
mov dword [rsp + 0x13c], eax
jmp 0x140002f77
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_filebuf_char__std::__1::char_traits_char___.__read_mode__
mov rcx, qword [rsp + 0xc8]
and al, 1
mov byte [rsp + 0x12f], al
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
cmp rax, 0
jne 0x1400029b6
mov rcx, qword [rsp + 0xc8]
lea r8, [rsp + 0x12e]
add r8, 1
lea r9, [rsp + 0x12e]
add r9, 1
lea rdx, [rsp + 0x12e]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.setg_abi:ne180100__char__char__char_
test byte [rsp + 0x12f], 1
je 0x1400029d3
xor eax, eax
mov qword [rsp + 0xc0], rax
jmp 0x140002a41
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.egptr_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0xb8], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, rax
mov rax, qword [rsp + 0xb8]
sub rax, rcx
mov ecx, 2
cqo
idiv rcx
mov qword [rsp + 0x118], rax
mov qword [rsp + 0x110], 4
lea rcx, [rsp + 0x118]
lea rdx, [rsp + 0x110]
call method.unsigned_long_long_const_std::__1.min_abi:ne180100__unsigned_long_long__unsigned_long_long_const__unsigned_long_long_const_
mov rax, qword [rax]
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x120], rax
call method.std::__1::char_traits_char_.eof_abi:ne180100___
mov rcx, qword [rsp + 0xc8]
mov dword [rsp + 0x10c], eax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0xb0], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.egptr_abi:ne180100____const
mov rcx, rax
mov rax, qword [rsp + 0xb0]
cmp rax, rcx
jne 0x140002f18
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0xa8], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.egptr_abi:ne180100____const
mov rcx, qword [rsp + 0xa8]
mov rdx, rax
xor eax, eax
sub rax, qword [rsp + 0x120]
add rdx, rax
mov r8, qword [rsp + 0x120]
shl r8, 0
call sym.memmove
mov rax, qword [rsp + 0xc8]
test byte [rax + 0xa2], 1
je 0x140002c0f
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.egptr_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0xa0], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov rdx, rax
mov rax, qword [rsp + 0xa0]
sub rax, rdx
sub rax, qword [rsp + 0x120]
mov qword [rsp + 0x100], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, rax
mov rax, qword [rsp + 0xc8]
add rcx, qword [rsp + 0x120]
mov r8, qword [rsp + 0x100]
mov r9, qword [rax + 0x78]
mov edx, 1
call sym.fread
mov qword [rsp + 0x100], rax
cmp qword [rsp + 0x100], 0
je 0x140002c0a
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0x90], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
add rax, qword [rsp + 0x120]
mov qword [rsp + 0x98], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x98]
mov rcx, qword [rsp + 0xc8]
mov r9, rax
add r9, qword [rsp + 0x120]
add r9, qword [rsp + 0x100]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.setg_abi:ne180100__char__char__char_
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
mov cl, byte [rax]
call method.std::__1::char_traits_char_.to_int_type_abi:ne180100__char_
mov dword [rsp + 0x10c], eax
jmp 0x140002f13
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx + 0x50]
cmp rax, qword [rcx + 0x48]
je 0x140002c45
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rax + 0x40]
mov rdx, qword [rax + 0x48]
mov r8, qword [rax + 0x50]
mov rax, qword [rax + 0x48]
sub r8, rax
call sym.memmove
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx + 0x40]
mov rdx, qword [rcx + 0x50]
mov r8, qword [rcx + 0x48]
sub rdx, r8
add rax, rdx
mov qword [rcx + 0x48], rax
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x88], rax
mov rax, qword [rcx + 0x40]
add rcx, 0x58
cmp rax, rcx
jne 0x140002c92
mov eax, 8
mov qword [rsp + 0x80], rax
jmp 0x140002ca6
mov rax, qword [rsp + 0xc8]
mov rax, qword [rax + 0x60]
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x80]
add rax, rdx
mov qword [rcx + 0x50], rax
mov rax, qword [rcx + 0x70]
sub rax, qword [rsp + 0x120]
mov qword [rsp + 0xf0], rax
mov rax, qword [rcx + 0x50]
mov rcx, qword [rcx + 0x48]
sub rax, rcx
mov qword [rsp + 0xe8], rax
lea rcx, [rsp + 0xf0]
lea rdx, [rsp + 0xe8]
call method.unsigned_long_long_const_std::__1.min_abi:ne180100__unsigned_long_long__unsigned_long_long_const__unsigned_long_long_const_
mov rcx, rax
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rcx]
mov qword [rsp + 0xf8], rcx
mov rcx, qword [rax + 0x88]
mov qword [rax + 0x90], rcx
mov rcx, qword [rax + 0x48]
mov r8, qword [rsp + 0xf8]
mov r9, qword [rax + 0x78]
mov edx, 1
call sym.fread
mov qword [rsp + 0xd8], rax
cmp qword [rsp + 0xd8], 0
je 0x140002f0e
mov rax, qword [rsp + 0xc8]
cmp qword [rax + 0x80], 0
jne 0x140002d71
call method.std::__1.__throw_bad_cast_abi:ne180100___
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx + 0x48]
add rax, qword [rsp + 0xd8]
mov qword [rcx + 0x50], rax
mov rax, qword [rcx + 0x80]
mov qword [rsp + 0x58], rax
mov rax, rcx
add rax, 0x88
mov qword [rsp + 0x60], rax
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x68], rax
mov rax, qword [rcx + 0x50]
mov qword [rsp + 0x70], rax
mov rsi, rcx
add rsi, 0x48
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
add rax, qword [rsp + 0x120]
mov qword [rsp + 0x78], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
mov r9, qword [rsp + 0x70]
mov r11, qword [rsp + 0x78]
mov r10, rax
mov rax, qword [rsp + 0xc8]
add r10, qword [rax + 0x70]
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x28], r11
mov qword [rsp + 0x30], r10
mov qword [rsp + 0x38], rax
call method.std::__1::codecvt_char__char___Mbstatet_.in_abi:ne180100___Mbstatet__char_const__char_const__char_const__char__char__char__const
mov dword [rsp + 0xe4], eax
cmp dword [rsp + 0xe4], 3
jne 0x140002e72
mov rcx, qword [rsp + 0xc8]
mov rdx, qword [rcx + 0x40]
mov r8, qword [rcx + 0x40]
mov r9, qword [rcx + 0x50]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.setg_abi:ne180100__char__char__char_
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
mov cl, byte [rax]
call method.std::__1::char_traits_char_.to_int_type_abi:ne180100__char_
mov dword [rsp + 0x10c], eax
jmp 0x140002f09
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x50], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, rax
mov rax, qword [rsp + 0x50]
add rcx, qword [rsp + 0x120]
cmp rax, rcx
je 0x140002f04
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0x48], rax
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
mov r8, rax
add r8, qword [rsp + 0x120]
mov r9, qword [rsp + 0xd0]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.setg_abi:ne180100__char__char__char_
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
mov cl, byte [rax]
call method.std::__1::char_traits_char_.to_int_type_abi:ne180100__char_
mov dword [rsp + 0x10c], eax
jmp 0x140002f09
jmp 0x140002f0e
jmp 0x140002f13
jmp 0x140002f33
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.gptr_abi:ne180100____const
mov cl, byte [rax]
call method.std::__1::char_traits_char_.to_int_type_abi:ne180100__char_
mov dword [rsp + 0x10c], eax
mov rcx, qword [rsp + 0xc8]
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.eback_abi:ne180100____const
lea rcx, [rsp + 0x12e]
cmp rax, rcx
jne 0x140002f69
mov rcx, qword [rsp + 0xc8]
xor eax, eax
mov r9d, eax
mov rdx, r9
mov r8, r9
call method.std::__1::basic_streambuf_char__std::__1::char_traits_char___.setg_abi:ne180100__char__char__char_
mov eax, dword [rsp + 0x10c]
mov dword [rsp + 0x13c], eax
mov eax, dword [rsp + 0x13c]
add rsp, 0x140
pop rsi
ret