Function at 0x140020980
Capabilities:
Get logon sessions
List groups for user account
List user accounts

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x168
mov qword [rsp + 0x150], rcx
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 8
mov qword [rsp + 0xb8], 0
mov dword [rsp + 0x144], 0
lea r15, [rsp + 0x50]
nop
mov qword [rsp + 0xc0], 0
mov dword [rsp + 0xcc], 0
mov dword [rsp + 0x148], 0
lea rax, [rsp + 0x144]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x148]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xcc]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xffffffff
xor ecx, ecx
xor edx, edx
mov r8d, 2
lea r9, [rsp + 0xc0]
call sub.NETAPI32.dll_NetUserEnum
test eax, eax
je 0x140020a47
cmp eax, 0xea
jne 0x140020f9c
mov rsi, qword [rsp + 0xc0]
mov ecx, dword [rsp + 0xcc]
test rcx, rcx
je 0x140020f7f
mov dword [rsp + 0x140], eax
lea r12, [rsi + rcx*8]
jmp 0x140020a7d
add rsi, 8
cmp rsi, r12
je 0x140020f70
mov r14, qword [rsi]
test r14, r14
je 0x140020a70
mov qword [rsp + 0x50], 0
xor ecx, ecx
mov rdx, r14
mov r8d, 0x17
mov r9, r15
call sub.NETAPI32.dll_NetUserGetInfo
mov rcx, qword [rsp + 0x50]
test eax, eax
je 0x140020ac0
test rcx, rcx
jne 0x140020f5e
jmp 0x140020a70
mov rdi, qword [rcx + 0x20]
test rdi, rdi
je 0x140020f50
mov rcx, rdi
call sub.ADVAPI32.dll_IsValidSid
test eax, eax
je 0x140020f50
mov rcx, rdi
call sub.ADVAPI32.dll_GetLengthSid
test eax, eax
je 0x140020bea
mov ebp, eax
mov edx, 1
mov rcx, rbp
call sym.__rust_alloc_zeroed
test rax, rax
je 0x1400212f1
mov rbx, rax
mov ecx, ebp
mov rdx, rax
mov r8, rdi
call sub.ADVAPI32.dll_CopySid
test eax, eax
je 0x140020c06
cmp byte [rbx], 1
jne 0x140021300
mov qword [rsp + 0x128], rbp
mov qword [rsp + 0x130], rbx
mov qword [rsp + 0x138], rbp
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x128]
call sym.sysinfo::windows::sid::Sid::account_name::he7d223a6373dcb65
mov r13, qword [rsp + 0x80]
movabs rax, 0x8000000000000000
cmp r13, rax
jne 0x140020c1c
mov r8, 0xffffffffffffffff
nop word cs:[rax + rax]
cmp word [r14 + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140020b80
lea rcx, [rsp + 0xd0]
mov rdx, r14
call sym.alloc::string::String::from_utf16::h92bc63552228ad98
mov r13, qword [rsp + 0xd0]
movabs rax, 0x8000000000000000
cmp r13, rax
mov rcx, qword [rsp + 0xe0]
mov eax, 0
cmove rcx, rax
mov qword [rsp + 0x158], rcx
mov rdx, qword [rsp + 0xd8]
mov ecx, 1
cmove rdx, rcx
mov qword [rsp + 0x120], rdx
cmove r13, rax
jmp 0x140020c3c
mov edx, 1
xor ecx, ecx
mov r8, rdi
call sub.ADVAPI32.dll_CopySid
test eax, eax
je 0x140020f50
jmp 0x14002135c
mov r8d, 1
mov rcx, rbx
mov rdx, rbp
call sym.__rust_dealloc
jmp 0x140020f50
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x158], rax
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x14c], 0
lea rax, [rsp + 0x14c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0xffffffff
lea rcx, [0x1401a9b08]
mov rdx, r14
xor r8d, r8d
mov r9d, 1
call sub.NETAPI32.dll_NetUserGetLocalGroups
test eax, eax
mov qword [rsp + 0x160], r13
je 0x140020cc6
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 8
xor ebx, ebx
jmp 0x140020e18
mov ebx, dword [rsp + 0x5c]
test rbx, rbx
je 0x140020d00
lea rax, [rbx*8]
lea rdi, [rax + rax*2]
mov rax, qword [0x1401d2a88]
movzx eax, byte [rax]
mov edx, 8
mov rcx, rdi
call sym.__rust_alloc
test rax, rax
je 0x14002136e
mov r14, rax
jmp 0x140020d06
mov r14d, 8
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], 0
mov r13, qword [rsp + 0x48]
test r13, r13
je 0x140020d46
mov edi, dword [rsp + 0x5c]
cmp edi, ebx
jbe 0x140020d72
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8, rdi
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h3e6208812979902f
mov r14, qword [rsp + 0x68]
mov rax, qword [rsp + 0x70]
jmp 0x140020d85
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
jmp 0x140020e4e
mov ebx, 0
mov eax, 0
test rdi, rdi
je 0x140020e18
mov rbx, rax
xor r15d, r15d
nop dword [rax + rax]
mov rdx, qword [r13 + r15*8]
mov r8, 0xffffffffffffffff
nop dword [rax]
cmp word [rdx + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140020da0
lea rcx, [rsp + 0x80]
call sym.alloc::string::String::from_utf16::h92bc63552228ad98
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8000000000000000
cmp rax, rcx
mov rcx, qword [rsp + 0x90]
mov r8d, 0
cmove rcx, r8
mov rdx, qword [rsp + 0x88]
mov r9d, 1
cmove rdx, r9
cmove rax, r8
lea r8, [rbx + rbx*2]
mov qword [r14 + r8*8], rax
mov qword [r14 + r8*8 + 8], rdx
mov qword [r14 + r8*8 + 0x10], rcx
inc rbx
inc r15
cmp r15, rdi
jne 0x140020d90
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rbx
test rcx, rcx
lea r15, [rsp + 0x50]
je 0x140020e4e
call sub.NETAPI32.dll_NetApiBufferFree
mov qword [rsp + 0xd0], rbp
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xe0], rbp
mov dword [rsp + 0x118], 0
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x158]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0x90]
lea rcx, [rsp + 0x100]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x80]
mov qword [rcx], rax
mov rax, qword [rsp + 0x88]
mov qword [rcx + 8], rax
mov rdi, qword [rsp + 0xb8]
cmp rdi, qword [rsp + 0xa8]
jne 0x140020ef3
lea rcx, [rsp + 0xa8]
call sym.alloc::raw_vec::RawVec_T_A_::grow_one::h615732b1db4fee36
mov rax, qword [rsp + 0xb0]
lea rcx, [rdi + rdi*4]
shl rcx, 4
movups xmm0, xmmword [rsp + 0x110]
movups xmmword [rax + rcx + 0x40], xmm0
movups xmm0, xmmword [rsp + 0xd0]
movups xmm1, xmmword [rsp + 0xe0]
movups xmm2, xmmword [rsp + 0xf0]
movups xmm3, xmmword [rsp + 0x100]
movups xmmword [rax + rcx + 0x30], xmm3
movups xmmword [rax + rcx + 0x20], xmm2
movups xmmword [rax + rcx + 0x10], xmm1
movups xmmword [rax + rcx], xmm0
inc rdi
mov qword [rsp + 0xb8], rdi
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140020a70
call sub.NETAPI32.dll_NetApiBufferFree
jmp 0x140020a70
mov rsi, qword [rsp + 0xc0]
mov eax, dword [rsp + 0x140]
cmp eax, 0xea
jne 0x140020fa4
test rsi, rsi
je 0x1400209d0
mov rcx, rsi
call sub.NETAPI32.dll_NetApiBufferFree
jmp 0x1400209d0
mov rsi, qword [rsp + 0xc0]
test rsi, rsi
je 0x140020fb1
mov rcx, rsi
call sub.NETAPI32.dll_NetApiBufferFree
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x48]
call sub.Secur32.dll_LsaEnumerateLogonSessions
mov rsi, qword [rsp + 0x48]
test eax, eax
jne 0x1400212a9
mov eax, dword [rsp + 0x50]
test rax, rax
je 0x1400212a9
lea rdi, [rsi + rax*8]
lea rbx, [rsp + 0x128]
lea r14, [rsp + 0xd0]
mov qword [rsp + 0xa0], rdi
jmp 0x140021028
mov rcx, qword [rsp + 0x128]
test rcx, rcx
je 0x14002101b
call sub.Secur32.dll_LsaFreeReturnBuffer
add rsi, 8
cmp rsi, rdi
je 0x1400212a4
mov qword [rsp + 0x128], 0
mov rcx, rsi
mov rdx, rbx
call sub.Secur32.dll_LsaGetLogonSessionData
mov rcx, qword [rsp + 0x128]
test eax, eax
jne 0x140021011
test rcx, rcx
je 0x140021011
cmp dword [rcx + 0x40], 3
je 0x140021016
movzx ebp, word [rcx + 0x10]
mov r12, qword [rcx + 0x18]
mov rdx, qword [rcx + 0x48]
mov rcx, r14
call sym.sysinfo::windows::sid::Sid::from_psid::h2f8e59f713928e97
movabs rax, 0x8000000000000000
cmp qword [rsp + 0xd0], rax
je 0x140021009
mov r14, qword [rsp + 0xe0]
mov qword [rsp + 0x70], r14
movups xmm0, xmmword [rsp + 0xd0]
movaps xmmword [rsp + 0x60], xmm0
mov rax, qword [rsp + 0xb8]
mov r13, qword [rsp + 0x68]
test rax, rax
je 0x14002111d
mov rbx, qword [rsp + 0xb0]
shl rax, 4
lea rdi, [rax + rax*4]
xor r15d, r15d
jmp 0x1400210c9
add r15, 0x50
cmp rdi, r15
je 0x14002111d
cmp qword [rbx + r15 + 0x10], r14
jne 0x1400210c0
mov rcx, qword [rbx + r15 + 8]
mov rdx, r13
mov r8, r14
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1400210c0
mov rdx, qword [rsp + 0x60]
test rdx, rdx
mov rdi, qword [rsp + 0xa0]
lea rbx, [rsp + 0x128]
lea r14, [rsp + 0xd0]
je 0x140021009
mov r8d, 1
mov rcx, r13
call sym.__rust_dealloc
jmp 0x140021009
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x60]
call sym.sysinfo::windows::sid::Sid::account_name::he7d223a6373dcb65
lea r14, [rsp + 0xd0]
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8000000000000000
cmp rax, rcx
jne 0x14002119c
shr ebp, 1
mov rcx, r14
mov rdx, r12
mov r8, rbp
call sym.alloc::string::String::from_utf16::h92bc63552228ad98
mov rax, qword [rsp + 0xd0]
movabs rcx, 0x8000000000000000
cmp rax, rcx
mov r8d, 0
cmove rax, r8
mov rcx, qword [rsp + 0xd8]
mov edx, 1
cmove rcx, rdx
mov rdx, qword [rsp + 0xe0]
cmove rdx, r8
jmp 0x1400211ac
mov rcx, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x70]
mov qword [rsp + 0xe0], r8
movaps xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0xd0], xmm0
mov dword [rsp + 0x118], 0
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0xf0], rcx
mov qword [rsp + 0xf8], rdx
mov qword [rsp + 0x100], 0
mov qword [rsp + 0x108], 8
mov qword [rsp + 0x110], 0
mov rbx, qword [rsp + 0xb8]
cmp rbx, qword [rsp + 0xa8]
jne 0x14002122c
lea rcx, [rsp + 0xa8]
call sym.alloc::raw_vec::RawVec_T_A_::grow_one::h615732b1db4fee36
mov rax, qword [rsp + 0xb0]
lea rcx, [rbx + rbx*4]
shl rcx, 4
movaps xmm0, xmmword [rsp + 0x110]
movups xmmword [rax + rcx + 0x40], xmm0
movaps xmm0, xmmword [rsp + 0xd0]
movaps xmm1, xmmword [rsp + 0xe0]
movaps xmm2, xmmword [rsp + 0xf0]
movaps xmm3, xmmword [rsp + 0x100]
movups xmmword [rax + rcx + 0x30], xmm3
movups xmmword [rax + rcx + 0x20], xmm2
movups xmmword [rax + rcx + 0x10], xmm1
movups xmmword [rax + rcx], xmm0
inc rbx
mov qword [rsp + 0xb8], rbx
mov rcx, qword [rsp + 0x128]
mov rdi, qword [rsp + 0xa0]
lea rbx, [rsp + 0x128]
jmp 0x140021011
mov rsi, qword [rsp + 0x48]
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x150]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rsp + 0xa8]
movups xmmword [rcx], xmm0
test rsi, rsi
je 0x1400212d5
mov rcx, rsi
call sub.Secur32.dll_LsaFreeReturnBuffer
mov rax, qword [rsp + 0x150]
add rsp, 0x168
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 1
mov rdx, rbp
call sym.alloc::raw_vec::handle_error::hd43ffb3afada7951
jmp 0x14002137b
lea rax, str.Expected_SID_revision_to_be_1
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xd8], 1
mov qword [rsp + 0xe0], 8
xorps xmm0, xmm0
movups xmmword [rsp + 0xe8], xmm0
lea rax, [0x1401a9350]
mov qword [rsp + 0x20], rax
lea r8, [0x1401a9348]
lea r9, [rsp + 0xd0]
xor ecx, ecx
mov rdi, rbx
mov rdx, rbx
call sym.core::panicking::assert_failed::h364faed2758c56ad
jmp 0x14002137b
lea r8, [0x1401a9300]
xor ecx, ecx
xor edx, edx
call sym.core::panicking::panic_bounds_check::hf065bc95f1c7a8f7
jmp 0x14002137b
mov ecx, 8
mov rdx, rdi
call sym.alloc::raw_vec::handle_error::hd43ffb3afada7951
ud2