Function at 0x140036680
Capabilities:
Access the windows event log

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x238]
sub rsp, 0x310
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1400a8020]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov r14, r8
mov rsi, rcx
lea rdx, [rcx + 0x28]
cmp qword [rdx + 0x18], 0x10
jb 0x1400366ce
mov rdx, qword [rdx]
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
xor r15d, r15d
mov qword [rsp + 0x68], r15
mov byte [rsp + 0x58], r15b
cmp byte [rdx], r15b
jne 0x1400366ee
mov r8d, r15d
jmp 0x1400366fb
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r15b
jne 0x1400366f2
lea rcx, [rsp + 0x58]
call fcn.140022620
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x60]
call fcn.14001c0f0
nop
mov ebx, r15d
nop word [rax + rax]
inc ebx
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 8
cmovae rdx, qword [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rdi, rax
test rax, rax
jne 0x140036805
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 3
jl 0x140036720
mov qword [rbp - 0x28], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x30], r15
mov byte [rbp - 0x40], dil
lea r8d, [rdi + 0x1a]
lea rdx, str.iusl::EventLog::StoreEvent
lea rcx, [rbp - 0x40]
call fcn.140022620
nop
mov qword [rbp - 0x70], 7
mov qword [rbp - 0x78], r15
mov word [rsp + 0x78], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x78]
call fcn.140022390
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x20]
call fcn.14001bf20
mov rbx, rax
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x100]
call fcn.140036ae0
lea rdi, vtable.EventLogAccessException.0
mov qword [rbp + 0x100], rdi
mov rdx, rbx
lea rcx, [rbp + 0x100]
call fcn.140036e90
mov rdx, rax
lea rcx, [rbp]
call fcn.140036950
mov qword [rbp], rdi
lea rdx, [0x1400a3cd8]
lea rcx, [rbp]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov r12d, 1
xor r8d, r8d
mov rax, qword [rsi + 0x48]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r15d
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r15
mov r9d, 0xc0021f96
movzx edx, word [rax]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x1400368d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x1400368a3
mov ebx, r15d
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r8d, r8d
mov rax, qword [rsi + 0x48]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r15d
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r15
mov r9d, 0xc0021f96
movzx edx, word [rax]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x1400368d1
inc ebx
cmp ebx, 5
jl 0x140036854
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
lea rcx, [rbp]
call fcn.140036cc0
lea rdi, vtable.EventLogAccessException.0
mov qword [rbp], rdi
lea rdx, [0x1400a3cd8]
lea rcx, [rbp]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
nop
mov r8, qword [rbp - 0x48]
cmp r8, 8
jb 0x1400368f1
inc r8
mov rdx, qword [rbp - 0x60]
call fcn.140022b80
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.1400522f0
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret