Function at 0x140051ae0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x1b8], rbx
mov rax, qword [0x1400ab020]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov edi, r8d
mov rsi, rdx
mov rbx, rcx
xor r15d, r15d
mov dword [rsp + 0x30], r15d
test rdx, rdx
je 0x140051d41
add rcx, 8
call fcn.140050c30
cmp eax, edi
jb 0x140051cb2
mov rax, qword [rbx + 0x28]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140051b53
mov rcx, rbx
call fcn.140051150
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rbx
call fcn.140050e50
mov dword [rsp + 0x34], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x34]
mov r8d, edi
mov rdx, rsi
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140051dd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r15
mov word [rsp + 0x48], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x48]
call fcn.1400222e0
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.14001be70
mov rbx, rax
lea rcx, [rbp]
call fcn.14001bb40
nop
lea rdx, str.Error_when_reading_file
mov rcx, rax
call fcn.1400243f0
mov rcx, rax
mov rdx, rbx
call fcn.14002fae0
mov rcx, rax
lea rdx, str.Last_error:
call fcn.1400243f0
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.140032100
mov rbx, rax
lea rax, vtable.std::exception.0
mov qword [rbp - 0x60], rax
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
lea rcx, [rbx + 8]
lea rdx, [rbp - 0x58]
call qword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
nop
lea rax, vtable.BaseException.0
mov qword [rbp - 0x60], rax
lea rdx, [rbx + 0x18]
mov qword [rbp - 0x30], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x38], r15
mov byte [rbp - 0x48], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rbp - 0x48]
call fcn.1400226a0
nop
lea rax, vtable.ExceptionStream_class_Exception__class_BaseException_.0
mov qword [rbp - 0x60], rax
lea rdx, [rbx + 0x38]
mov qword [rbp - 0x10], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x18], r15
mov byte [rbp - 0x28], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rbp - 0x28]
call fcn.1400226a0
nop
lea rax, vtable.Exception.0
mov qword [rbp - 0x60], rax
lea rdx, [0x1400a7580]
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov qword [rsp + 0x60], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x58], r15
mov byte [rsp + 0x48], 0
mov r8d, reloc.WS2_32.dll_send
lea rdx, str.Invalid_size_passed
lea rcx, [rsp + 0x48]
call fcn.140022570
nop
mov dword [rsp + 0x30], 2
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea rax, vtable.BaseException.0
mov qword [rsp + 0x68], rax
mov qword [rbp - 0x68], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x70], r15
mov byte [rbp - 0x80], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x80]
call fcn.1400226a0
nop
lea rax, vtable.AssertException.0
mov qword [rsp + 0x68], rax
lea rdx, [0x1400a7408]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov qword [rsp + 0x60], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x58], r15
mov byte [rsp + 0x48], r15b
mov r8d, reloc.WS2_32.dll_send
lea rdx, str.Invalid_data_passed
lea rcx, [rsp + 0x48]
call fcn.140022570
nop
mov dword [rsp + 0x30], 1
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea rax, vtable.BaseException.0
mov qword [rsp + 0x68], rax
mov qword [rbp - 0x68], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x70], r15
mov byte [rbp - 0x80], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x80]
call fcn.1400226a0
nop
lea rax, vtable.AssertException.0
mov qword [rsp + 0x68], rax
lea rdx, [0x1400a7408]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140054e30
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x170
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret