Function at 0x140005760
Capabilities:
Read file via mapping

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x180], rbx
mov rax, qword [0x1400e5430]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov r15, r8
cmp qword [rdx + 0x18], 0x10
jb 0x1400057a0
mov rdx, qword [rdx]
mov r8, rdx
xor edx, edx
mov ecx, 0xf001f
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14000594b
mov qword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf001f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
jne 0x1400058d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1400ed4f0]
test rcx, rcx
je 0x1400058c5
mov rdx, qword [rcx]
call qword [rdx + 0x18]
test al, al
je 0x1400058c5
mov rsi, qword [0x1400ed4f0]
lea rcx, [rsp + 0x38]
call fcn.140007580
nop
lea rdx, str.Vector_read:_MapViewOfFile_failed:_0x
mov rcx, rax
call fcn.140010e60
mov r8, rax
test rax, rax
jne 0x14000583a
xor ecx, ecx
jmp 0x140005844
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, r8
and dword [rcx + 0x18], 0xfffff9ff
or dword [rcx + 0x18], 0x800
mov edx, ebx
mov rcx, r8
call fcn.140007200
mov rcx, rax
call fcn.14000e570
lea rdx, [rbp + 0x20]
mov rcx, rax
call fcn.1400076e0
nop
mov r9, qword [rsi]
mov edx, 3
mov r8, rax
mov rcx, rsi
call qword [r9 + 0x28]
nop
cmp qword [rbp + 0x38], 0x10
jb 0x140005894
mov rcx, qword [rbp + 0x20]
call fcn.14007f05c
mov qword [rbp + 0x38], shutdown
mov qword [rbp + 0x30], 0
mov byte [rbp + 0x20], 0
lea rcx, [rbp - 0x40]
call fcn.140007660
lea rax, vtable.std::ios_base.0
mov qword [rbp - 0x40], rax
lea rcx, [rbp - 0x40]
call fcn.1400550f8
mov rcx, rdi
call qword [0x1400b4580]
jmp 0x140005a77
mov ebx, dword [rax]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rdi
cmp ebx, 4
jb 0x1400058c8
mov r14d, ebx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf001f
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
test rax, rax
je 0x1400058c5
add ebx, 0xfffffffc
je 0x140005925
mov edx, ebx
mov rcx, r15
call fcn.140007490
lea rdx, [rsi + 4]
mov r8d, ebx
mov rcx, qword [r15]
call fcn.14007e7a0
mov r8, r14
xor edx, edx
mov rcx, rsi
call fcn.1400809a0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rdi
call qword [0x1400b4580]
mov al, 1
jmp 0x140005a79
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1400ed4f0]
test rcx, rcx
je 0x140005a77
mov rdx, qword [rcx]
call qword [rdx + 0x18]
test al, al
je 0x140005a77
mov rbx, qword [0x1400ed4f0]
lea rcx, [rsp + 0x38]
call fcn.140007580
nop
lea rdx, str.Vector_read:_OpenFileMappingA_failed:_0x
mov rcx, rax
call fcn.140010e60
mov r8, rax
test rax, rax
jne 0x14000599e
xor ecx, ecx
jmp 0x1400059a8
mov rax, qword [rax]
movsxd rcx, dword [rax + 4]
add rcx, r8
and dword [rcx + 0x18], 0xfffff9ff
or dword [rcx + 0x18], 0x800
mov edx, edi
mov rcx, r8
call fcn.140007200
mov rcx, rax
call fcn.14000e570
lea rdx, [rbp + 0x20]
mov rcx, rax
call fcn.1400076e0
nop
mov r9, qword [rbx]
mov edx, 3
mov r8, rax
mov rcx, rbx
call qword [r9 + 0x28]
nop
cmp qword [rbp + 0x38], 0x10
jb 0x1400059f8
mov rcx, qword [rbp + 0x20]
call fcn.14007f05c
mov qword [rbp + 0x38], shutdown
mov qword [rbp + 0x30], 0
mov byte [rbp + 0x20], 0
mov rax, qword [rsp + 0x38]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x38], rax
mov rax, qword [rsp + 0x38]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x34], edx
lea rcx, [rsp + 0x40]
call fcn.140007710
mov rax, qword [rsp + 0x38]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x38], rax
mov rax, qword [rsp + 0x38]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x34], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp - 0x40], rax
lea rcx, [rbp - 0x40]
call fcn.1400550f8
xor al, al
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.14007e1c0
mov rbx, qword [rsp + 0x180]
add rsp, 0x150
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret