Function at 0x140016df0
Capabilities:
Access the windows event log

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x1400512d0]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
xor r15d, r15d
lea rax, [rsp + 0x50]
mov rsi, rcx
lea r9, [rsp + 0x58]
lea r8d, [r15 + 1]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x50], r15d
or r14d, 0xffffffff
mov qword [rsp + 0x20], rax
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
mov r8d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x58]
mov edx, r15d
test r8d, r8d
je 0x140016e90
nop
mov eax, edx
lea rcx, [rax + rax*2]
movups xmm0, xmmword [r10 + rcx*8]
movsd xmm1, qword [r10 + rcx*8 + 0x10]
movsd qword [rbp - 0x78], xmm1
movups xmmword [rsp + 0x78], xmm0
cmp dword [rbp - 0x78], r15d
je 0x140016e8b
inc edx
cmp edx, r8d
jb 0x140016e60
jmp 0x140016e90
mov r14d, dword [rsp + 0x78]
mov rax, qword [rsi + 0x2e8]
mov qword [rsp + 0x2e8], r12
mov rdi, qword [rax]
cmp rdi, rax
je 0x140016fcb
mov r12d, 2
mov r11d, r15d
mov eax, r15d
test r8d, r8d
je 0x140016ee7
mov r9d, dword [rdi + 0x10]
mov ecx, eax
lea rdx, [rcx + rcx*2]
movsd xmm1, qword [r10 + rdx*8 + 0x10]
movsd qword [rbp - 0x78], xmm1
cmp dword [r10 + rdx*8], r9d
je 0x140016ee1
inc eax
cmp eax, r8d
jb 0x140016ec0
jmp 0x140016ee7
mov r11d, 1
test r11d, r11d
jne 0x140016fbb
mov r9d, dword [rdi + 0x10]
lea r8, str.SessionId:_d_no_longer_exist_remove_it_n
lea rcx, [rbp - 0x70]
mov edx, 0x104
call fcn.140022fa4
mov rdx, qword [rsi + 0x58]
xor ecx, ecx
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x140016f75
mov rax, qword [rsi + 0x58]
mov qword [rsp + 0x40], r15
mov edx, 4
mov qword [rsp + 0x60], rax
lea rax, [rbp - 0x70]
lea r8d, [rdx - 3]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r15d
mov rcx, rbx
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x140016f88
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x18], r15
mov rax, qword [rdi + 8]
mov rbx, qword [rdi]
mov qword [rax], rbx
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rcx + 8], rax
dec qword [rsi + 0x2f0]
mov rcx, rdi
call fcn.140021650
mov r10, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x50]
mov rdi, rbx
jmp 0x140016fbe
mov rdi, qword [rdi]
cmp rdi, qword [rsi + 0x2e8]
jne 0x140016eb1
mov ebx, r15d
test r8d, r8d
je 0x140017090
movabs r12, 0x666666666666665
mov eax, ebx
mov r9d, 1
lea rcx, [rax + rax*2]
movups xmm0, xmmword [r10 + rcx*8]
movsd xmm1, qword [r10 + rcx*8 + 0x10]
mov rcx, qword [rsi + 0x2e8]
mov rax, qword [rcx]
movups xmmword [rsp + 0x78], xmm0
movsd qword [rbp - 0x78], xmm1
mov edx, dword [rsp + 0x78]
cmp rax, rcx
je 0x140017028
cmp edx, dword [rax + 0x10]
je 0x140017025
mov rax, qword [rax]
cmp rax, rcx
jne 0x140017016
jmp 0x140017028
mov r9d, r15d
test r9d, r9d
je 0x140017085
mov r8, qword [rcx + 8]
mov dword [rsp + 0x60], edx
lea r9, [rsp + 0x60]
mov rdx, rcx
mov qword [rsp + 0x68], r15
mov dword [rsp + 0x70], r15d
mov rdi, rcx
call fcn.14001c080
mov rdx, qword [rsi + 0x2f0]
mov rcx, rax
mov rax, r12
sub rax, rdx
cmp rax, 1
jb 0x1400170ca
lea rax, [rdx + 1]
mov qword [rsi + 0x2f0], rax
mov qword [rdi + 8], rcx
mov rax, qword [rcx + 8]
mov qword [rax], rcx
mov r10, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x50]
inc ebx
cmp ebx, r8d
jb 0x140016fe1
mov rcx, r10
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov r12, qword [rsp + 0x2e8]
mov eax, r14d
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140021670
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2b0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.list_T__too_long
call fcn.140034e84
int3