Function at 0x140016220
Capabilities:
Read file via mapping

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov qword [rbp + 0x30], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x140036180]
xor rax, rsp
mov qword [rbp + 0x58], rax
mov edi, edx
mov ebx, ecx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
mov dword [0x14003688c], ecx
lea r15, [0x14002a948]
mov qword [rsp + 0x40], r15
lea rcx, [rbp - 0x38]
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 + 0x30], 2
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
lea r12, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + 0x48], r12
mov qword [rbp - 0x50], r14
mov dword [rbp - 0x48], 4
lea rdx, str.ImptRED_CEvent_
lea rcx, [rsp + 0x40]
call fcn.1400158e0
mov rcx, rax
mov edx, edi
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___int____ptr64]
mov rcx, rax
lea rdx, [0x14002a950]
call fcn.1400158e0
mov rcx, rax
mov edx, ebx
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___int____ptr64]
lea rdx, [rbp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.140016770
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x48]
call fcn.140003840
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x38]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea r8, [rbp + 0x38]
cmp qword [rbp + 0x50], 0x10
cmovae r8, qword [rbp + 0x38]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [0x140036858], rax
mov rdx, qword [rbp + 0x50]
cmp rdx, 0x10
jb 0x1400163de
inc rdx
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400163d2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400163d2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140024e48
mov rax, qword [0x140036858]
test rax, rax
je 0x140016561
mov ebx, dword [0x14003688c]
mov qword [rsp + 0x40], r15
lea rcx, [rbp - 0x38]
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 + 0x30], 0xb
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov qword [rsp + 0x48], r12
mov qword [rbp - 0x50], r14
mov dword [rbp - 0x48], 4
lea rdx, str.ImptRED_SEvent_
lea rcx, [rsp + 0x40]
call fcn.1400158e0
mov rcx, rax
mov edx, edi
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___int____ptr64]
mov rcx, rax
lea rdx, [0x14002a950]
call fcn.1400158e0
mov rcx, rax
mov edx, ebx
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___int____ptr64]
lea rdx, [rbp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.140016770
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x48]
call fcn.140003840
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x38]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea r8, [rbp + 0x38]
cmp qword [rbp + 0x50], 0x10
cmovae r8, qword [rbp + 0x38]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [0x140036860], rax
mov rdx, qword [rbp + 0x50]
cmp rdx, 0x10
jb 0x14001654f
inc rdx
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016543
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140016543
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140024e48
mov rax, qword [0x140036860]
test rax, rax
jne 0x140016568
mov rcx, qword [0x140036858]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140016746
mov ebx, dword [0x14003688c]
mov qword [rsp + 0x40], r15
lea rcx, [rbp - 0x38]
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 + 0x30], 0x2f
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov qword [rsp + 0x48], r12
mov qword [rbp - 0x50], r14
mov dword [rbp - 0x48], 4
lea rdx, str.ImptRED_CmdMap_
lea rcx, [rsp + 0x40]
call fcn.1400158e0
mov rcx, rax
mov edx, edi
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___int____ptr64]
mov rcx, rax
lea rdx, [0x14002a950]
call fcn.1400158e0
mov rcx, rax
mov edx, ebx
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___int____ptr64]
lea rdx, [rbp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.140016770
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], rsi
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x48]
call fcn.140003840
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x38]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea r8, [rbp + 0x38]
cmp qword [rbp + 0x50], 0x10
cmovae r8, qword [rbp + 0x38]
xor edx, edx
lea ecx, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov qword [0x140036868], rax
mov rdx, qword [rbp + 0x50]
cmp rdx, 0x10
jb 0x1400166ce
inc rdx
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400166c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400166c2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140024e48
mov rax, qword [0x140036868]
test rax, rax
jne 0x1400166f1
mov rcx, qword [0x140036858]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140036860]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140016746
mov qword [rsp + 0x20], 0x60e4
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [0x140036878], rax
test rax, rax
jne 0x140016744
mov rcx, qword [0x140036858]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140036860]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140036868]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140016746
mov al, 1
mov rcx, qword [rbp + 0x58]
xor rcx, rsp
call fcn.140025890
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret