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

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x198
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x110], 0xfffffffffffffffe
mov qword [rbp - 0x20], rcx
mov qword [rbp + 0x88], 0
mov qword [rbp + 0x90], 8
mov qword [rbp + 0x98], 0
mov dword [rbp - 0x10], 0
lea rbx, [rbp + 0xe8]
nop dword [rax]
mov qword [rbp + 0x80], 0
mov dword [rbp + 0x7c], 0
mov dword [rbp - 0x14], 0
lea rax, [rbp - 0x10]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x14]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x7c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xffffffff
xor ecx, ecx
xor edx, edx
mov r8d, 2
lea r9, [rbp + 0x80]
call sub.netapi32.dll_NetUserEnum
test eax, eax
je 0x140197c01
cmp eax, 0xea
jne 0x140198103
mov dword [rbp - 0xc], eax
mov r15, qword [rbp + 0x80]
mov eax, dword [rbp + 0x7c]
lea r14, [r15 + rax*8]
jmp 0x140197c25
call sub.netapi32.dll_NetApiBufferFree
cmp r15, r14
je 0x1401980e0
mov rsi, qword [r15]
add r15, 8
test rsi, rsi
je 0x140197c25
mov qword [rbp + 0xe8], 0
xor ecx, ecx
mov rdx, rsi
mov r8d, 0x17
mov r9, rbx
call sub.netapi32.dll_NetUserGetInfo
test eax, eax
je 0x140197c70
mov rcx, qword [rbp + 0xe8]
test rcx, rcx
jne 0x140197c20
jmp 0x140197c25
mov rcx, qword [rbp + 0xe8]
mov rdi, qword [rcx + 0x20]
test rdi, rdi
je 0x140197c20
mov rcx, rdi
call sub.advapi32.dll_IsValidSid
test eax, eax
je 0x140197c5c
mov rcx, rdi
call sub.advapi32.dll_GetLengthSid
mov r12d, eax
mov dword [rbp + 0x100], eax
mov edx, 1
test eax, eax
je 0x140197d82
mov rcx, r12
call fcn.140016e80
test rax, rax
je 0x14019841b
mov r13, rax
mov ecx, dword [rbp + 0x100]
mov rdx, rax
mov r8, rdi
call sub.advapi32.dll_CopySid
test eax, eax
je 0x140197d99
cmp byte [r13], 1
mov qword [rbp + 0xf0], r12
jne 0x14019842a
mov qword [rbp - 8], r12
mov qword [rbp + 0x10], r13
mov qword [rbp], r13
mov qword [rbp + 8], r12
mov byte [rbp + 0x10f], 1
lea rcx, [rbp + 0xa0]
lea rdx, [rbp - 8]
call fcn.14018efe0
mov r13, qword [rbp + 0xa0]
mov rax, r13
neg rax
jno 0x140197daf
mov r8, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rsi + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140197d30
mov byte [rbp + 0x10f], 1
lea rcx, [rbp + 0x20]
mov rdx, rsi
call fcn.1401de270
mov r13, qword [rbp + 0x20]
mov rax, r13
neg rax
mov rcx, qword [rbp + 0x30]
mov eax, 0
cmovo rcx, rax
mov qword [rbp - 0x28], rcx
mov rdx, qword [rbp + 0x28]
mov ecx, 1
cmovo rdx, rcx
mov qword [rbp + 0x18], rdx
cmovo r13, rax
jmp 0x140197dc5
xor ecx, ecx
mov r8, rdi
call sub.advapi32.dll_CopySid
test eax, eax
je 0x140197c5c
jmp 0x140198473
mov r8d, 1
mov rcx, r13
mov rdx, r12
call fcn.140016e60
jmp 0x140197c5c
mov rax, qword [rbp + 0xa8]
mov qword [rbp + 0x18], rax
mov rax, qword [rbp + 0xb0]
mov qword [rbp - 0x28], rax
mov qword [rbp + 0xf8], 0
mov dword [rbp + 0xe4], 0
mov dword [rbp - 0x18], 0
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0xe4]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0xf8]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0xffffffff
lea rcx, [0x140274830]
mov rdx, rsi
xor r8d, r8d
mov r9d, 1
call sub.netapi32.dll_NetUserGetLocalGroups
test eax, eax
mov qword [rbp - 0x30], r13
je 0x140197e8f
mov qword [rbp + 0xc0], 0
mov qword [rbp + 0xc8], 8
mov qword [rbp + 0x100], 0
mov rcx, qword [rbp + 0xf8]
mov rax, qword [rbp + 0xc0]
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0xc8]
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x100]
mov qword [rbp + 0xb0], rax
test rcx, rcx
je 0x140197f75
call sub.netapi32.dll_NetApiBufferFree
jmp 0x140197f75
mov r12d, dword [rbp + 0xe4]
test r12, r12
je 0x140197ec9
lea rax, [r12*8]
lea rdi, [rax + rax*2]
movzx eax, byte [0x1402e8381]
mov edx, 8
mov rcx, rdi
call fcn.140016e50
test rax, rax
je 0x140198494
mov rsi, rax
jmp 0x140197ece
mov esi, 8
mov qword [rbp + 0xc0], r12
mov qword [rbp + 0xc8], rsi
mov qword [rbp + 0xd0], 0
mov r13, qword [rbp + 0xf8]
test r13, r13
je 0x140197f4b
mov edi, dword [rbp + 0xe4]
cmp r12d, edi
jae 0x140198035
mov byte [rbp + 0x10d], 0
mov qword [rsp + 0x20], 0x18
mov r9d, 8
lea rcx, [rbp + 0xc0]
xor edx, edx
mov r8, rdi
call fcn.1401f0c90
mov rsi, qword [rbp + 0xc8]
mov rax, qword [rbp + 0xd0]
mov qword [rbp + 0x100], rax
test edi, edi
jne 0x140198048
jmp 0x140197e4b
mov rax, qword [rbp + 0xd0]
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp + 0xc0]
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0xc8]
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0xf0]
mov qword [rbp + 0x20], rax
mov rcx, qword [rbp + 0x10]
mov qword [rbp + 0x28], rcx
mov qword [rbp + 0x30], rax
mov dword [rbp + 0x68], 0
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x38], rax
mov rax, qword [rbp + 0x18]
mov qword [rbp + 0x40], rax
mov rax, qword [rbp - 0x28]
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0xb0]
lea rcx, [rbp + 0x50]
mov qword [rcx + 0x10], rax
mov rax, qword [rbp + 0xa0]
mov qword [rcx], rax
mov rax, qword [rbp + 0xa8]
mov qword [rcx + 8], rax
mov rsi, qword [rbp + 0x98]
cmp rsi, qword [rbp + 0x88]
jne 0x140197feb
lea rcx, [rbp + 0x88]
call fcn.1400b3700
mov rax, qword [rbp + 0x90]
lea rcx, [rsi + rsi*4]
shl rcx, 4
movups xmm0, xmmword [rbp + 0x60]
movups xmmword [rax + rcx + 0x40], xmm0
movups xmm0, xmmword [rbp + 0x20]
movups xmm1, xmmword [rbp + 0x30]
movups xmm2, xmmword [rbp + 0x40]
movups xmm3, xmmword [rbp + 0x50]
movups xmmword [rax + rcx + 0x30], xmm3
movups xmmword [rax + rcx + 0x20], xmm2
movups xmmword [rax + rcx + 0x10], xmm1
movups xmmword [rax + rcx], xmm0
inc rsi
mov qword [rbp + 0x98], rsi
jmp 0x140197c5c
mov qword [rbp + 0x100], 0
test edi, edi
je 0x140197e4b
xor r12d, r12d
nop dword [rax + rax]
mov rdx, qword [r13 + r12*8]
mov r8, 0xffffffffffffffff
nop dword [rax]
cmp word [rdx + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140198060
lea rcx, [rbp + 0xa0]
call fcn.1401de270
mov rax, qword [rbp + 0xa0]
mov rcx, rax
neg rcx
mov rcx, qword [rbp + 0xb0]
mov r8d, 0
cmovo rcx, r8
mov rdx, qword [rbp + 0xa8]
mov r9d, 1
cmovo rdx, r9
cmovo rax, r8
mov r9, qword [rbp + 0x100]
lea r8, [r9 + r9*2]
mov qword [rsi + r8*8], rax
mov qword [rsi + r8*8 + 8], rdx
mov qword [rsi + r8*8 + 0x10], rcx
inc r9
mov qword [rbp + 0x100], r9
inc r12
cmp r12, rdi
jne 0x140198050
jmp 0x140197e4b
mov rcx, qword [rbp + 0x80]
cmp dword [rbp - 0xc], 0xea
jne 0x14019810a
test rcx, rcx
je 0x140197ba0
call sub.netapi32.dll_NetApiBufferFree
jmp 0x140197ba0
mov rcx, qword [rbp + 0x80]
test rcx, rcx
je 0x140198114
call sub.netapi32.dll_NetApiBufferFree
mov dword [rbp + 0xe8], 0
mov qword [rbp + 0xf8], 0
lea rcx, [rbp + 0xe8]
lea rdx, [rbp + 0xf8]
call sub.secur32.dll_LsaEnumerateLogonSessions
mov rcx, qword [rbp + 0xf8]
test eax, eax
jne 0x14019816c
mov eax, dword [rbp + 0xe8]
lea rsi, [rcx + rax*8]
lea rbx, [rbp - 8]
lea r15, [rbp + 0x20]
mov qword [rbp + 0xf0], rsi
cmp rcx, rsi
jne 0x1401981b8
mov rcx, qword [rbp + 0xf8]
mov rax, qword [rbp + 0x98]
mov rdx, qword [rbp - 0x20]
mov qword [rdx + 0x10], rax
movups xmm0, xmmword [rbp + 0x88]
movups xmmword [rdx], xmm0
test rcx, rcx
je 0x14019818f
call sub.secur32.dll_LsaFreeReturnBuffer
mov rax, qword [rbp - 0x20]
add rsp, 0x198
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rdi
cmp rcx, rsi
je 0x140198165
lea rdi, [rcx + 8]
mov qword [rbp - 8], 0
mov rdx, rbx
call sub.secur32.dll_LsaGetLogonSessionData
test eax, eax
setne al
mov rcx, qword [rbp - 8]
test rcx, rcx
sete dl
or dl, al
je 0x1401981f0
test rcx, rcx
je 0x1401981b0
call sub.secur32.dll_LsaFreeReturnBuffer
jmp 0x1401981b0
cmp dword [rcx + 0x40], 3
je 0x14019821c
movzx r12d, word [rcx + 0x10]
mov r13, qword [rcx + 0x18]
mov rdx, qword [rcx + 0x48]
mov rcx, r15
call fcn.14018ee50
xor eax, eax
cmp rax, qword [rbp + 0x20]
jno 0x14019822e
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x140198221
call sub.secur32.dll_LsaFreeReturnBuffer
mov rcx, rdi
cmp rcx, rsi
jne 0x1401981b8
jmp 0x140198165
mov r15, qword [rbp + 0x30]
mov qword [rbp + 0xd0], r15
movups xmm0, xmmword [rbp + 0x20]
movaps xmmword [rbp + 0xc0], xmm0
mov rax, qword [rbp + 0x98]
mov rcx, qword [rbp + 0xc8]
mov qword [rbp + 0x100], rcx
test rax, rax
je 0x1401982de
mov r14, qword [rbp + 0x90]
shl rax, 4
lea rsi, [rax + rax*4]
xor ebx, ebx
jmp 0x140198289
add rbx, 0x50
cmp rsi, rbx
je 0x1401982de
cmp qword [r14 + rbx + 0x10], r15
jne 0x140198280
mov rcx, qword [r14 + rbx + 8]
mov rdx, qword [rbp + 0x100]
mov r8, r15
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x140198280
mov rdx, qword [rbp + 0xc0]
test rdx, rdx
mov rsi, qword [rbp + 0xf0]
lea rbx, [rbp - 8]
lea r15, [rbp + 0x20]
je 0x140198213
mov r8d, 1
mov rcx, qword [rbp + 0x100]
call fcn.140016e60
jmp 0x140198213
mov byte [rbp + 0x10e], 1
lea rcx, [rbp + 0xa0]
lea rdx, [rbp + 0xc0]
call fcn.14018efe0
lea r15, [rbp + 0x20]
mov rax, qword [rbp + 0xa0]
mov rcx, rax
neg rcx
jno 0x14019834e
shr r12d, 1
mov byte [rbp + 0x10e], 1
mov rcx, r15
mov rdx, r13
mov r8, r12
call fcn.1401de270
mov rax, qword [rbp + 0x20]
mov rcx, rax
neg rcx
mov r8d, 0
cmovo rax, r8
mov rcx, qword [rbp + 0x28]
mov edx, 1
cmovo rcx, rdx
mov rdx, qword [rbp + 0x30]
cmovo rdx, r8
jmp 0x14019835c
mov rcx, qword [rbp + 0xa8]
mov rdx, qword [rbp + 0xb0]
mov r8, qword [rbp + 0xd0]
mov qword [rbp + 0x30], r8
movaps xmm0, xmmword [rbp + 0xc0]
movaps xmmword [rbp + 0x20], xmm0
mov dword [rbp + 0x68], 0
mov qword [rbp + 0x38], rax
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rdx
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 8
mov qword [rbp + 0x60], 0
mov r14, qword [rbp + 0x98]
cmp r14, qword [rbp + 0x88]
jne 0x1401983b9
lea rcx, [rbp + 0x88]
call fcn.1400b3700
mov rax, qword [rbp + 0x90]
lea rcx, [r14 + r14*4]
shl rcx, 4
movaps xmm0, xmmword [rbp + 0x60]
movups xmmword [rax + rcx + 0x40], xmm0
movaps xmm0, xmmword [rbp + 0x20]
movaps xmm1, xmmword [rbp + 0x30]
movaps xmm2, xmmword [rbp + 0x40]
movaps xmm3, xmmword [rbp + 0x50]
movups xmmword [rax + rcx + 0x30], xmm3
movups xmmword [rax + rcx + 0x20], xmm2
movups xmmword [rax + rcx + 0x10], xmm1
movups xmmword [rax + rcx], xmm0
inc r14
mov qword [rbp + 0x98], r14
mov rcx, qword [rbp - 8]
mov rsi, qword [rbp + 0xf0]
lea rbx, [rbp - 8]
test rcx, rcx
jne 0x1401981e4
jmp 0x1401981b0
mov ecx, 1
mov rdx, r12
call fcn.1401fd4e0
jmp 0x1401984a8
lea rax, str.Expected_SID_revision_to_be_1
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], 1
mov qword [rbp + 0x30], 8
xorps xmm0, xmm0
movups xmmword [rbp + 0x38], xmm0
mov qword [rbp - 0x38], r13
lea rax, str.TC_
mov qword [rsp + 0x20], rax
lea r8, [0x1402743d8]
lea r9, [rbp + 0x20]
xor ecx, ecx
mov rdx, r13
call fcn.1401f8060
jmp 0x1401984a8
mov qword [rbp + 0xf0], r12
mov qword [rbp - 0x38], 1
lea r8, str.C:UsersLenovo.cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.11_srcwindows_sid.rs
xor ecx, ecx
xor edx, edx
call fcn.1401fd880
jmp 0x1401984a8
mov byte [rbp + 0x10d], 1
mov ecx, 8
mov rdx, rdi
call fcn.1401fd4e0
ud2