Function at 0x140029b70
Capabilities:
Get logon sessions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x1401c6780]
xor rax, rsp
mov qword [rbp + 0x38], rax
mov rdi, rcx
xor r15d, r15d
mov dword [rsp + 0x34], r15d
xorps xmm0, xmm0
movups xmmword [rbp + 0x28], xmm0
lea rcx, str.localhost
call qword [sym.imp.WTSAPI32.dll_WTSOpenServerW]
mov rbx, rax
mov byte [rbp - 0x30], r15b
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x50], 1
lea ecx, [r15 + 0x18]
call fcn.1401219f8
mov rsi, rax
mov qword [rsp + 0x38], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
lea rax, vtable.std::_Ref_count_resource_void____ptr64__class__lambda_040515c3665a68edecb46c9d2e5b22cd__.0
mov qword [rsi], rax
mov qword [rsi + 0x10], rbx
mov qword [rbp + 0x28], rbx
mov qword [rbp + 0x30], rsi
mov byte [rsp + 0x50], r15b
test rbx, rbx
jne 0x140029cf2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029c5b
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x140029c5e
mov rax, r15
mov eax, dword [rax + 0x40]
test eax, eax
je 0x140029cd9
cmp eax, 2
jl 0x140029cd9
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029c9c
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
mov rdi, rax
jmp 0x140029c9f
mov rdi, r15
mov edx, ebx
lea rcx, [rsp + 0x58]
call fcn.14002c970
nop
mov r15d, 1
mov dword [rsp + 0x34], r15d
cmp qword [rax + 0x18], 0xf
jbe 0x140029cc1
mov rax, qword [rax]
mov r9, rax
lea r8, str.WindowsImpersonatorAgent_GetActiveLogonUser:_WTSOpenServer_failed__s
mov edx, 2
mov rcx, rdi
call fcn.14001ef20
nop
test r15b, 1
je 0x14002a2e9
lea rcx, [rsp + 0x58]
call fcn.140009880
jmp 0x14002a2e9
lea rax, [rbp - 0x24]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x38]
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x140029de2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029d4d
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x140029d50
mov rax, r15
mov eax, dword [rax + 0x40]
test eax, eax
je 0x140029dc9
cmp eax, 2
jl 0x140029dc9
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029d8e
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
mov rdi, rax
jmp 0x140029d91
mov rdi, r15
mov edx, ebx
lea rcx, [rsp + 0x58]
call fcn.14002c970
nop
mov r15d, 2
mov dword [rsp + 0x34], r15d
cmp qword [rax + 0x18], 0xf
jbe 0x140029db3
mov rax, qword [rax]
mov r9, rax
lea r8, str.WindowsImpersonatorAgent_GetActiveLogonUser:_WTSEnumerateSessions_failed__s
mov edx, r15d
mov rcx, rdi
call fcn.14001ef20
nop
test r15b, 2
je 0x14002a2e9
lea rcx, [rsp + 0x58]
call fcn.140009880
jmp 0x14002a2e9
xorps xmm0, xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x10], xmm1
mov qword [rbp], r15
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x18], r15
lfence
mov ecx, 0x28
call fcn.1401219f8
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
mov word [rax + 0x18], 0x101
mov qword [rbp - 0x20], rax
mov r14d, r15d
mov edx, dword [rbp - 0x24]
mov r12, qword [rbp - 8]
test edx, edx
je 0x140029e95
nop dword [rax]
mov eax, r14d
lea rcx, [rax + rax*2]
mov rax, qword [rbp - 0x38]
lea rsi, [rax + rcx*8]
mov eax, dword [rsi + 0x10]
test eax, eax
je 0x140029e50
cmp eax, 1
je 0x140029e50
cmp eax, 4
jne 0x140029e8d
cmp r12, qword [rbp]
je 0x140029e66
mov eax, dword [rsi]
mov dword [r12], eax
add r12, 4
mov qword [rbp - 8], r12
jmp 0x140029e79
mov r8, rsi
mov rdx, r12
lea rcx, [rbp - 0x10]
call fcn.14002fc60
mov r12, qword [rbp - 8]
mov ebx, dword [rsi + 0x10]
mov rdx, rsi
lea rcx, [rbp - 0x20]
call fcn.14002ecb0
mov dword [rax], ebx
mov edx, dword [rbp - 0x24]
inc r14d
cmp r14d, edx
jb 0x140029e30
mov dword [rbp - 0x28], r15d
mov qword [rbp - 0x40], r15
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x28]
call qword [sym.imp.Secur32.dll_LsaEnumerateLogonSessions]
mov r13, qword [rbp - 0x10]
test eax, eax
je 0x140029f83
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029eee
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x140029ef1
mov rax, r15
mov eax, dword [rax + 0x40]
test eax, eax
je 0x140029f66
cmp eax, 2
jl 0x140029f66
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x140029f2d
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
mov r15, rax
mov edx, ebx
lea rcx, [rsp + 0x78]
call fcn.14002c970
nop
mov edi, 4
mov dword [rsp + 0x34], edi
cmp qword [rax + 0x18], 0xf
jbe 0x140029f4d
mov rax, qword [rax]
mov r9, rax
lea r8, str.WindowsImpersonatorAgent_GetActiveLogonUser:_LsaEnumerateLogonSessions_failed__s
mov edx, 2
mov rcx, r15
call fcn.14001ef20
jmp 0x140029f6a
mov edi, dword [rsp + 0x34]
test dil, 4
je 0x14002a299
lea rcx, [rsp + 0x78]
call fcn.140009880
jmp 0x14002a299
xor bl, bl
mov byte [rsp + 0x30], bl
mov r14d, r15d
nop dword [rax]
cmp r14d, 2
jge 0x14002a241
mov esi, r15d
cmp dword [rbp - 0x28], r15d
jbe 0x14002a0ce
nop word [rax + rax]
mov ecx, esi
mov rax, qword [rbp - 0x40]
lea rcx, [rax + rcx*8]
lea rdx, [rbp - 0x48]
call qword [sym.imp.Secur32.dll_LsaGetLogonSessionData]
mov ebx, eax
test eax, eax
jne 0x14002a176
mov r8, qword [rbp - 0x48]
mov r8d, dword [r8 + 0x44]
mov rdx, r12
mov rcx, r13
call fcn.140120650
test rax, rax
je 0x14002a09a
mov rdx, qword [rbp - 0x48]
mov eax, dword [rdx + 0x40]
cmp eax, 2
je 0x140029fff
cmp eax, 0xa
jne 0x14002a09a
mov rdx, qword [rdx + 0x60]
xorps xmm0, xmm0
movups xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], r15
mov qword [rbp + 0x20], r15
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x14002a020
lea rcx, [rbp + 8]
call fcn.14000c0c0
nop
test r14d, r14d
jne 0x14002a04c
cmp qword [rbp + 0x18], 0
jne 0x14002a04c
lea rcx, [rbp + 8]
call fcn.140009810
jmp 0x14002a0be
mov byte [rsp + 0x30], 1
mov r8, qword [rbp - 0x48]
mov r8d, dword [r8 + 0x44]
mov rdx, qword [rdi + 8]
mov rcx, qword [rdi]
call fcn.1401208e0
mov rdx, qword [rdi + 8]
cmp rax, rdx
jne 0x14002a091
mov r8, qword [rbp - 0x48]
add r8, 0x44
cmp rdx, qword [rdi + 0x10]
je 0x14002a088
mov eax, dword [r8]
mov dword [rdx], eax
add qword [rdi + 8], 4
jmp 0x14002a091
mov rcx, rdi
call fcn.14002fc60
nop
lea rcx, [rbp + 8]
call fcn.140009810
mov rdx, qword [rdi + 8]
mov rcx, qword [rdi]
mov r8, rdx
sub r8, rcx
sar r8, 2
lea r9, [rbp - 0x20]
call fcn.14002f960
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.Secur32.dll_LsaFreeReturnBuffer]
inc esi
cmp esi, dword [rbp - 0x28]
jb 0x140029fb0
movzx ebx, byte [rsp + 0x30]
mov rax, qword [rdi + 8]
sub rax, qword [rdi]
sar rax, 2
test rax, rax
jne 0x14002a241
test bl, bl
jne 0x14002a241
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x14002a119
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x14002a11c
mov rax, r15
mov eax, dword [rax + 0x40]
test eax, eax
je 0x14002a16e
cmp eax, 5
jl 0x14002a16e
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x14002a157
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x14002a15a
mov rax, r15
lea r8, str.WindowsImpersonatorAgent_GetActiveLogonUser:_Logon_server_is_empty_for_all_sessions__retry_with_skipping_checking_it.
mov edx, 5
mov rcx, rax
call fcn.14001ef20
inc r14d
jmp 0x140029f90
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.Secur32.dll_LsaFreeReturnBuffer]
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x14002a1b5
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
jmp 0x14002a1b8
mov rax, r15
mov eax, dword [rax + 0x40]
test eax, eax
je 0x14002a22c
cmp eax, 2
jl 0x14002a22c
xor ecx, ecx
call fcn.140027930
test rax, rax
je 0x14002a1f4
mov dword [rsp + 0x20], 1
lea r9, str.Logger
xor r8d, r8d
lea rdx, [0x14001ccd0]
mov rcx, rax
call fcn.140027c40
mov r15, rax
mov edx, ebx
lea rcx, [rbp - 0x68]
call fcn.14002c970
nop
mov edi, 8
mov dword [rsp + 0x34], edi
cmp qword [rax + 0x18], 0xf
jbe 0x14002a213
mov rax, qword [rax]
mov r9, rax
lea r8, str.WindowsImpersonatorAgent_GetActiveLogonUser:_LsaGetLogonSessionData_failed__s
mov edx, 2
mov rcx, r15
call fcn.14001ef20
jmp 0x14002a230
mov edi, dword [rsp + 0x34]
test dil, 8
je 0x14002a299
lea rcx, [rbp - 0x68]
call fcn.140009880
jmp 0x14002a299
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.Secur32.dll_LsaFreeReturnBuffer]
mov rdi, qword [rbp - 0x20]
mov rbx, qword [rdi + 8]
cmp byte [rbx + 0x19], 0
jne 0x14002a287
nop dword [rax]
mov r8, qword [rbx + 0x10]
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x20]
call fcn.140021f60
mov rcx, rbx
mov rbx, qword [rbx]
mov edx, 0x28
call fcn.1401219f0
cmp byte [rbx + 0x19], 0
je 0x14002a260
mov qword [rdi + 8], rdi
mov qword [rdi], rdi
mov qword [rdi + 0x10], rdi
mov qword [rbp - 0x18], r15
mov ebx, r15d
lea rcx, [rbp - 0x20]
call fcn.140021d60
nop
test r13, r13
je 0x14002a2e4
mov rax, qword [rbp]
sub rax, r13
sar rax, 2
lea rdx, [rax*4]
mov rax, r13
cmp rdx, 0x1000
jb 0x14002a2dc
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002a354
mov rcx, r13
call fcn.1401219f0
mov rsi, qword [rsp + 0x38]
mov rdi, 0xffffffffffffffff
mov eax, edi
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x14002a325
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax]
call qword [case.0x14000aed8.0]
lock xadd dword [rsi + 0xc], edi
cmp edi, 1
jne 0x14002a325
mov rcx, qword [rsi]
mov rax, qword [rcx + 8]
mov rcx, rsi
call qword [case.0x14000aed8.0]
mov eax, ebx
mov rcx, qword [rbp + 0x38]
xor rcx, rsp
call fcn.1401219d0
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14012dcf0
nop
int3