Function at 0x10020740
Capabilities:
Get logon sessions
List user accounts

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x90
mov eax, dword [ebp + 8]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov dword [eax + 8], 0
test edi, edi
je 0x100207bc
add esi, 0x1c
jmp 0x10020776
add esi, 0x2c
dec edi
je 0x100207bc
mov eax, dword [esi - 0x1c]
test eax, eax
je 0x1002078b
push 1
push eax
push dword [esi - 0x18]
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [esi - 0x10]
test eax, eax
je 0x100207a0
push 1
push eax
push dword [esi - 0xc]
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [esi - 4]
mov ecx, eax
neg ecx
jo 0x10020770
jae 0x10020770
add eax, eax
push 2
push eax
push dword [esi]
call sym.___rust_dealloc
add esp, 0xc
jmp 0x10020770
mov dword [ebp - 0x98], 0
nop word cs:[eax + eax]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x9c], 0
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x2c]
push eax
push 2
push 0
push 0
call sub.netapi32.dll_NetUserEnum
test eax, eax
je 0x1002081a
cmp eax, 0xea
jne 0x10020aa2
mov edi, dword [ebp - 0x7c]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x8c], eax
test edi, edi
je 0x10020a83
shl edi, 2
jmp 0x1002084c
add esi, 4
add edi, 0xfffffffc
je 0x10020a80
mov ebx, dword [esi]
test ebx, ebx
je 0x10020840
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push 0x17
push ebx
push 0
call sub.netapi32.dll_NetUserGetInfo
test eax, eax
mov eax, dword [ebp - 0x14]
je 0x10020880
test eax, eax
jne 0x10020a73
jmp 0x10020840
push dword [eax + 0x10]
lea eax, [ebp - 0x78]
push eax
call sym.sysinfo::windows::sid::Sid::from_psid::h0aea9e5edd0a3ed8
add esp, 8
xor eax, eax
cmp eax, dword [ebp - 0x78]
jo 0x10020a68
mov eax, dword [ebp - 0x70]
movsd xmm0, qword [ebp - 0x78]
mov dword [ebp - 0x30], eax
movsd qword [ebp - 0x38], xmm0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x88]
push eax
call sym.sysinfo::windows::sid::Sid::account_name::hbe0325a9541bcad2
add esp, 8
mov ecx, dword [ebp - 0x88]
mov eax, ecx
neg eax
jno 0x1002090f
mov eax, dword [esi]
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x10020923
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x68]
push eax
call sym.windows_core::strings::pwstr::PWSTR::to_string::hc98fbd9c8eb4e383
add esp, 8
mov edx, dword [ebp - 0x68]
mov ecx, 0
mov eax, edx
neg eax
mov eax, dword [ebp - 0x60]
cmovo eax, ecx
mov ecx, 1
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x64]
cmovo eax, ecx
mov ecx, 0
cmovo edx, ecx
mov dword [ebp - 0x10], eax
jmp 0x10020933
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x6c], ecx
jmp 0x10020936
xor edx, edx
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x68]
push eax
call sym.windows_core::strings::pwstr::PWSTR::as_wide::h84c12c18066dfb98
add esp, 4
mov ecx, eax
xor eax, eax
test edx, edx
js 0x10020cfd
lea ebx, [edx + edx]
cmp ebx, 0x7ffffffe
ja 0x10020cfd
test ebx, ebx
mov dword [ebp - 0x28], edx
je 0x100209ab
mov eax, dword [0x1017b554]
mov dword [ebp - 0x90], ecx
movzx eax, byte [eax]
push 2
push ebx
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x10020cf5
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x90]
jmp 0x100209b7
mov eax, 2
mov dword [ebp - 0x20], 0
push ebx
push ecx
push eax
mov ebx, eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x40], 1
mov ebx, dword [eax + 8]
cmp ebx, dword [eax]
jne 0x10020a1e
push eax
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::grow_one::h3143b41d362ea92e
mov eax, dword [ebp + 8]
add esp, 4
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x40]
imul ecx, ebx, 0x2c
inc ebx
mov dword [eax + ecx + 0x28], edx
movsd xmm0, qword [ebp - 0x48]
movsd qword [eax + ecx + 0x20], xmm0
movsd xmm0, qword [ebp - 0x50]
movsd qword [eax + ecx + 0x18], xmm0
movsd xmm0, qword [ebp - 0x58]
movsd qword [eax + ecx + 0x10], xmm0
movsd xmm0, qword [ebp - 0x68]
movsd xmm1, qword [ebp - 0x60]
movsd qword [eax + ecx + 8], xmm1
movsd qword [eax + ecx], xmm0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], ebx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10020840
push eax
call sub.netapi32.dll_NetApiBufferFree
jmp 0x10020840
mov esi, dword [ebp - 0x2c]
cmp dword [ebp - 0x8c], 0xea
jne 0x10020aa5
test esi, esi
je 0x100207d0
push esi
call sub.netapi32.dll_NetApiBufferFree
jmp 0x100207d0
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x10020aaf
push esi
call sub.netapi32.dll_NetApiBufferFree
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call sub.secur32.dll_LsaEnumerateLogonSessions
mov esi, dword [ebp - 0x1c]
test eax, eax
js 0x10020ce0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10020ce0
lea edi, [esi + eax*8]
xor ebx, ebx
mov dword [ebp - 0x24], edi
jmp 0x10020b02
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x10020af7
push eax
call sub.secur32.dll_LsaFreeReturnBuffer
add esi, 8
cmp esi, edi
je 0x10020cdd
mov dword [ebp - 0x78], 0
lea eax, [ebp - 0x78]
push eax
push esi
call sub.secur32.dll_LsaGetLogonSessionData
test eax, eax
mov eax, dword [ebp - 0x78]
sets cl
test eax, eax
sete dl
or dl, cl
je 0x10020b30
test eax, eax
je 0x10020af7
jmp 0x10020af1
cmp dword [eax + 0x24], 3
je 0x10020af1
mov edx, dword [eax + 0x10]
movzx ecx, word [eax + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x3c], edx
push dword [eax + 0x2c]
lea eax, [ebp - 0x68]
push eax
call sym.sysinfo::windows::sid::Sid::from_psid::h0aea9e5edd0a3ed8
add esp, 8
cmp ebx, dword [ebp - 0x68]
jo 0x10020aea
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x60]
movsd xmm0, qword [ebp - 0x68]
mov dword [ebp - 0x10], esi
mov eax, dword [eax + 8]
mov dword [ebp - 0x30], edi
movsd qword [ebp - 0x38], xmm0
test eax, eax
je 0x10020bd8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x34]
imul esi, eax, 0x2c
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x28], edx
add ebx, 8
jmp 0x10020b98
add ebx, 0x2c
add esi, 0xffffffd4
je 0x10020bd8
cmp dword [ebx], edi
jne 0x10020b90
push edi
push dword [ebp - 0x28]
push dword [ebx - 4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10020b90
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x24]
mov ebx, 0
test eax, eax
je 0x10020aea
push 1
push eax
push dword [ebp - 0x28]
call sym.___rust_dealloc
add esp, 0xc
jmp 0x10020aea
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x88]
push eax
call sym.sysinfo::windows::sid::Sid::account_name::hbe0325a9541bcad2
add esp, 8
xor ebx, ebx
mov eax, dword [ebp - 0x88]
mov ecx, eax
neg ecx
jno 0x10020c2b
mov eax, dword [ebp - 0x18]
shr eax, 1
push eax
push dword [ebp - 0x3c]
lea eax, [ebp - 0x68]
push eax
call sym.alloc::string::String::from_utf16::h962af4e330e52bed
add esp, 0xc
mov eax, dword [ebp - 0x68]
mov edx, 1
mov ecx, eax
neg ecx
mov ecx, dword [ebp - 0x64]
cmovo eax, ebx
cmovo ecx, edx
mov edx, dword [ebp - 0x60]
cmovo edx, ebx
jmp 0x10020c34
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp - 0x80]
mov esi, dword [ebp - 0x30]
mov edi, dword [ebp + 8]
movsd xmm0, qword [ebp - 0x38]
mov dword [ebp - 0x60], esi
mov esi, dword [edi + 8]
movsd qword [ebp - 0x68], xmm0
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], 0x80000000
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x40], 0
cmp esi, dword [edi]
jne 0x10020c80
push edi
call sym.alloc::raw_vec::RawVec_LT_T_C_A_GT_::grow_one::h3143b41d362ea92e
add esp, 4
mov eax, dword [edi + 4]
mov edx, dword [ebp - 0x40]
imul ecx, esi, 0x2c
inc esi
mov dword [eax + ecx + 0x28], edx
movsd xmm0, qword [ebp - 0x48]
movsd qword [eax + ecx + 0x20], xmm0
movsd xmm0, qword [ebp - 0x50]
movsd qword [eax + ecx + 0x18], xmm0
movsd xmm0, qword [ebp - 0x58]
movsd qword [eax + ecx + 0x10], xmm0
movsd xmm0, qword [ebp - 0x68]
movsd xmm1, qword [ebp - 0x60]
movsd qword [eax + ecx + 8], xmm1
movsd qword [eax + ecx], xmm0
mov dword [edi + 8], esi
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x78]
test eax, eax
jne 0x10020b28
jmp 0x10020af7
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x10020cea
push esi
call sub.secur32.dll_LsaFreeReturnBuffer
add esp, 0x90
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 2
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x20]
push eax
call sym.alloc::raw_vec::handle_error::he63c9115d026ec98
add esp, 8
ud2