Function at 0x140015098
Capabilities:
Access the windows event log

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r15
mov rbp, rsp
sub rsp, 0x70
mov rbx, rdx
mov byte [rbp + 0x30], 0
xor r12d, r12d
lea rax, vtable.HModule.0
mov qword [rbp - 0x18], rax
and qword [rbp - 0x10], r12
and qword [rbp - 0x20], r12
mov ecx, 0x208
call fcn.1400407d8
mov qword [rbp - 0x28], rax
test rbx, rbx
je 0x140015531
lea r15, str.System
mov rdx, r15
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400154e7
lea rcx, [rbp - 0x20]
call fcn.140037e84
mov edi, eax
test eax, eax
js 0x1400155d6
lea rax, str.SystemEvents.txt
mov qword [rsp + 0x28], rax
lea rax, [0x14005829c]
mov qword [rsp + 0x20], rax
mov r9, rbx
lea r8, [0x140058898]
mov edx, 0x104
mov rcx, qword [rbp - 0x28]
call fcn.14000be88
mov edi, eax
test eax, eax
jns 0x140015185
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x140015179
test byte [rcx + 0x1c], 1
je 0x140015179
lea edx, [r12 + 0x30]
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_StringCchPrintfW___failed___X__n
jmp 0x1400155ce
mov rdx, r15
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenEventLogW]
mov r12, rax
test rax, rax
jne 0x1400151dc
call fcn.140038cd4
mov edi, eax
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x1400151d0
test byte [rcx + 0x1c], 1
je 0x1400151d0
lea edx, [r12 + 0x32]
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_OpenEventLog_System__failed___X__n
jmp 0x1400155ce
lea r8, [rbp - 0x10]
mov rbx, qword [rbp - 0x20]
mov rdx, rbx
call fcn.140014d28
mov edi, eax
test eax, eax
jns 0x140015236
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x140015223
test byte [rcx + 0x1c], 1
je 0x140015223
mov edx, 0x33
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_GetMesgFileHandle___failed___X__n
mov edx, edi
call fcn.140006cb0
jmp 0x140015570
xor edx, edx
mov rcx, qword [rbp - 0x28]
call fcn.140006d34
mov edi, eax
test eax, eax
setns byte [rbp + 0x30]
test eax, eax
jns 0x140015287
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x14001527e
test byte [rcx + 0x1c], 1
je 0x14001527e
mov edx, 0x34
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_Failed_to_open_log_file___X__n
jmp 0x14001522a
and dword [rbp - 0x30], 0
and dword [rbp + 0x48], 0
and dword [rbp + 0x40], 0
lea rdx, [rbp - 0x30]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_GetOldestEventLogRecord]
test eax, eax
jne 0x1400152e8
call fcn.140038cd4
mov edi, eax
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x1400152dc
test byte [rcx + 0x1c], 1
je 0x1400152dc
mov edx, 0x35
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_GetOldestEventLogRecord___failed___X__n
jmp 0x14001522a
lea rdx, [rbp + 0x48]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_GetNumberOfEventLogRecords]
test eax, eax
jne 0x14001533d
call fcn.140038cd4
mov edi, eax
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x140015331
test byte [rcx + 0x1c], 1
je 0x140015331
mov edx, 0x36
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_GetNumberOfEventLogRecords___failed___X__n
jmp 0x14001522a
mov edi, dword [rbp + 0x48]
call qword [sym.imp.mpclient.dll_MpClientUtilExportFunctions]
movabs r10, 0xb1e1875a16511370
lea r8, [rbp + 0x40]
mov edx, edi
lea rcx, str.MpSupport_EventLogNumRecsToRead
mov rax, qword [rax + 0xa0]
call qword [0x14004a4e8]
mov edi, eax
test eax, eax
jns 0x1400153ad
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x1400153a1
test byte [rcx + 0x1c], 1
je 0x1400153a1
mov edx, 0x37
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_MpConfigGetMiscDwordValue_MpSupport_EventLogRecordNum__failed___X__n
jmp 0x14001522a
lea rsi, str.___a_
mov r10, qword [str.___a_]
cmp r10, rsi
je 0x1400153f1
test byte [r10 + 0x1c], 4
je 0x1400153f1
mov edx, 0x38
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rbx
mov r9d, dword [rbp + 0x40]
lea r8, [0x14005aa68]
mov rcx, qword [r10 + 0x10]
call fcn.1400138fc
mov r10, qword [str.___a_]
mov eax, dword [rbp + 0x48]
test eax, eax
jne 0x1400153ff
xor edi, edi
jmp 0x140015570
lea r15d, [rax - 1]
add r15d, dword [rbp - 0x30]
cmp r15d, dword [rbp - 0x30]
jb 0x1400154b5
mov r9, qword [rbp - 0x10]
mov r8d, r15d
mov rdx, rbx
mov rcx, r12
call fcn.140013c68
mov edi, eax
test eax, eax
jns 0x140015495
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x14001546e
test byte [rcx + 0x1c], 1
je 0x14001546e
mov edx, 0x3a
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], rbx
mov rax, qword [rbp - 0x28]
mov qword [rsp + 0x20], rax
lea r9, str.System
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.1400137bc
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], r15d
mov r9, rbx
mov r8, qword [rbp - 0x28]
lea rdx, str.System
lea rcx, str.ERROR:_ReadAndProcessEventLogRecord__ls___ls___ls___ld__failed__X_n
call fcn.140006cb0
xor edi, edi
jmp 0x1400154a3
test edi, edi
jne 0x1400154a3
add dword [rbp + 0x40], 0xffffffff
je 0x140015570
dec r15d
cmp r15d, dword [rbp - 0x30]
jb 0x140015570
jmp 0x140015411
mov edi, 0x80070216
cmp r10, rsi
je 0x1400154db
test byte [r10 + 0x1c], 1
je 0x1400154db
mov edx, 0x39
lea r8, [0x14005aa68]
mov rcx, qword [r10 + 0x10]
call fcn.140002150
lea rcx, str.Event_log_record_number_overflow_n
jmp 0x14001556b
mov edi, 0x80070032
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x14001551d
test byte [rcx + 0x1c], 1
je 0x14001551d
mov edx, 0x31
mov r9, r15
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.1400022ac
mov rdx, r15
lea rcx, str.ERROR:_Unsupported_event_log_name_in_EventLogToFile__ls__n
call fcn.140006cb0
jmp 0x1400155d6
mov edi, 0x80070057
lea rsi, str.___a_
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x140015564
test byte [rcx + 0x1c], 1
je 0x140015564
mov edx, 0x2f
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002150
lea rcx, str.ERROR:_NULL_parameter_in_EventLogToFile_...__n
call fcn.140006cb0
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140015584
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
and qword [rbp - 0x10], 0
test r12, r12
je 0x1400155d6
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseEventLog]
test eax, eax
jne 0x1400155d6
call fcn.140038cd4
mov edi, eax
mov rcx, qword [str.___a_]
cmp rcx, rsi
je 0x1400155c7
test byte [rcx + 0x1c], 1
je 0x1400155c7
mov edx, 0x3b
mov r9d, eax
lea r8, [0x14005aa68]
mov rcx, qword [rcx + 0x10]
call fcn.140002534
lea rcx, str.ERROR:_CloseEventLog___failed___X__n
mov edx, edi
call fcn.140006cb0
nop
xor ecx, ecx
xchg qword [rbp - 0x28], rcx
test rcx, rcx
je 0x1400155e7
call fcn.140040784
nop
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400155f7
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140015607
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
cmp byte [rbp + 0x30], 0
je 0x140015636
mov rbx, qword [0x140075280]
and qword [0x140075280], 0
test rbx, rbx
je 0x140015636
mov rcx, rbx
call fcn.140006170
mov edx, 0x40
mov rcx, rbx
call fcn.140040794
mov eax, edi
mov rbx, qword [rsp + 0xa8]
add rsp, 0x70
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret