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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x158
mov rbx, rcx
movabs r13, 0x8000000000000000
mov rsi, qword [rcx + 8]
mov rdi, qword [rcx + 0x10]
mov qword [rcx + 0x10], 0
test rdi, rdi
je 0x14004561a
add rsi, 0x38
jmp 0x1400455c9
add rsi, 0x50
dec rdi
je 0x14004561a
mov rdx, qword [rsi - 0x38]
test rdx, rdx
je 0x1400455e1
mov rcx, qword [rsi - 0x30]
mov r8d, 1
call fcn.140011dc0
mov rdx, qword [rsi - 0x20]
test rdx, rdx
je 0x1400455f9
mov rcx, qword [rsi - 0x18]
mov r8d, 1
call fcn.140011dc0
mov rdx, qword [rsi - 8]
cmp rdx, r13
je 0x1400455c0
test rdx, rdx
je 0x1400455c0
mov rcx, qword [rsi]
add rdx, rdx
mov r8d, 2
call fcn.140011dc0
jmp 0x1400455c0
mov dword [rsp + 0x118], 0
lea r15, [rsp + 0x48]
lea rbp, [rsp + 0xf8]
mov qword [rsp + 0x90], rbx
nop word [rax + rax]
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x11c], 0
lea rax, [rsp + 0x118]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x11c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xffffffff
xor ecx, ecx
xor edx, edx
mov r8d, 2
lea r9, [rsp + 0x60]
call sub.netapi32.dll_NetUserEnum
test eax, eax
je 0x1400456ab
cmp eax, 0xea
jne 0x1400459f9
mov rdi, qword [rsp + 0x60]
mov r12d, dword [rsp + 0x6c]
test r12, r12
je 0x1400459dc
mov dword [rsp + 0x114], eax
shl r12, 3
xor r14d, r14d
mov qword [rsp + 0x150], rdi
mov qword [rsp + 0x148], r12
jmp 0x140045777
mov rax, qword [rbx + 8]
lea rcx, [rsi + rsi*4]
shl rcx, 4
movups xmm0, xmmword [rsp + 0xe0]
movups xmmword [rax + rcx + 0x40], xmm0
movups xmm0, xmmword [rsp + 0xa0]
movups xmm1, xmmword [rsp + 0xb0]
movups xmm2, xmmword [rsp + 0xc0]
movups xmm3, xmmword [rsp + 0xd0]
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 [rbx + 0x10], rsi
lea r15, [rsp + 0x48]
lea rbp, [rsp + 0xf8]
movabs r13, 0x8000000000000000
mov rdi, qword [rsp + 0x150]
mov r12, qword [rsp + 0x148]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004576a
call sub.netapi32.dll_NetApiBufferFree
add r14, 8
cmp r12, r14
je 0x1400459d0
mov rsi, qword [rdi + r14]
test rsi, rsi
je 0x14004576a
mov qword [rsp + 0x48], 0
xor ecx, ecx
mov rdx, rsi
mov r8d, 0x17
mov r9, r15
call sub.netapi32.dll_NetUserGetInfo
mov rcx, qword [rsp + 0x48]
test eax, eax
je 0x1400457b0
test rcx, rcx
jne 0x140045765
jmp 0x14004576a
mov rdx, qword [rcx + 0x20]
mov rcx, rbp
call fcn.140028bd0
cmp qword [rsp + 0xf8], r13
je 0x14004575b
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x80], rax
movups xmm0, xmmword [rsp + 0xf8]
movaps xmmword [rsp + 0x70], xmm0
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x70]
call fcn.140028d50
mov rbp, qword [rsp + 0x130]
cmp rbp, r13
jne 0x14004585d
mov rax, qword [rdi + r14]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140045877
lea rcx, [rsp + 0xa0]
lea rdx, [rsp + 0x50]
call fcn.140065970
mov rbp, qword [rsp + 0xa0]
cmp rbp, r13
mov r13, qword [rsp + 0xb0]
mov eax, 0
cmove r13, rax
mov rdx, qword [rsp + 0xa8]
mov ecx, 1
cmove rdx, rcx
mov qword [rsp + 0x98], rdx
cmove rbp, rax
jmp 0x140045889
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x98], rax
mov r13, qword [rsp + 0x140]
jmp 0x140045889
mov eax, 1
mov qword [rsp + 0x98], rax
xor r13d, r13d
xor ebp, ebp
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x128], rax
mov r15, qword [rsp + 0x80]
mov qword [rsp + 0xa0], rsi
lea rcx, [rsp + 0xa0]
call fcn.14006c980
mov rbx, rax
mov rsi, rdx
test rdx, rdx
je 0x14004590d
mov rdi, rbp
mov rax, rsi
shr rax, 0x3e
jne 0x140045d1b
mov r12, r13
lea rbp, [rsi + rsi]
mov rax, qword [0x1401a9e18]
movzx eax, byte [rax]
mov r13d, 2
mov edx, 2
mov rcx, rbp
call fcn.140011db0
test rax, rax
je 0x140045d11
mov rcx, rax
mov r13, rax
jmp 0x14004591b
mov r12, r13
mov rdi, rbp
mov r13d, 2
xor ebp, ebp
mov rcx, r13
mov rdx, rbx
mov r8, rbp
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], rdi
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xd0], rsi
mov qword [rsp + 0x120], r13
mov qword [rsp + 0xd8], r13
mov qword [rsp + 0xe0], rsi
mov dword [rsp + 0xe8], 0
mov byte [rsp + 0xec], 1
mov rbx, qword [rsp + 0x90]
mov rsi, qword [rbx + 0x10]
cmp rsi, qword [rbx]
jne 0x1400456e1
mov rcx, rbx
call fcn.140042fd0
jmp 0x1400456e1
mov rdi, qword [rsp + 0x60]
mov eax, dword [rsp + 0x114]
cmp eax, 0xea
jne 0x1400459fe
test rdi, rdi
je 0x140045640
mov rcx, rdi
call sub.netapi32.dll_NetApiBufferFree
jmp 0x140045640
mov rdi, qword [rsp + 0x60]
test rdi, rdi
je 0x140045a0b
mov rcx, rdi
call sub.netapi32.dll_NetApiBufferFree
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x50]
call sub.secur32.dll_LsaEnumerateLogonSessions
mov rdi, qword [rsp + 0x50]
test eax, eax
js 0x140045cef
mov eax, dword [rsp + 0x48]
test rax, rax
je 0x140045cef
lea r14, [rdi + rax*8]
lea r15, [rsp + 0xf8]
lea r12, [rsp + 0xa0]
mov qword [rsp + 0x58], r14
jmp 0x140045ad2
mov rax, qword [rbx + 8]
lea rcx, [rsi + rsi*4]
shl rcx, 4
movaps xmm0, xmmword [rsp + 0xe0]
movups xmmword [rax + rcx + 0x40], xmm0
movaps xmm0, xmmword [rsp + 0xa0]
movaps xmm1, xmmword [rsp + 0xb0]
movaps xmm2, xmmword [rsp + 0xc0]
movaps xmm3, xmmword [rsp + 0xd0]
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 [rbx + 0x10], rsi
mov rcx, qword [rsp + 0xf8]
test rcx, rcx
je 0x140045ac5
call sub.secur32.dll_LsaFreeReturnBuffer
add rdi, 8
cmp rdi, r14
je 0x140045cea
mov qword [rsp + 0xf8], 0
mov rcx, rdi
mov rdx, r15
call sub.secur32.dll_LsaGetLogonSessionData
mov rcx, qword [rsp + 0xf8]
test eax, eax
js 0x140045abb
test rcx, rcx
je 0x140045abb
cmp dword [rcx + 0x40], 3
je 0x140045ac0
movzx esi, word [rcx + 0x10]
mov r13, qword [rcx + 0x18]
mov rdx, qword [rcx + 0x48]
mov rcx, r12
call fcn.140028bd0
movabs rax, 0x8000000000000000
cmp qword [rsp + 0xa0], rax
je 0x140045ab3
mov r15, qword [rsp + 0xb0]
mov qword [rsp + 0x80], r15
movups xmm0, xmmword [rsp + 0xa0]
movaps xmmword [rsp + 0x70], xmm0
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140045bd2
mov rcx, qword [rsp + 0x90]
mov r14, qword [rcx + 8]
mov rbp, qword [rsp + 0x78]
shl rax, 4
lea rbx, [rax + rax*4]
xor r12d, r12d
jmp 0x140045b79
add r12, 0x50
cmp rbx, r12
je 0x140045bd2
cmp qword [r14 + r12 + 0x10], r15
jne 0x140045b70
mov rcx, qword [r14 + r12 + 8]
mov rdx, rbp
mov r8, r15
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x140045b70
mov rdx, qword [rsp + 0x70]
test rdx, rdx
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x58]
lea r15, [rsp + 0xf8]
lea r12, [rsp + 0xa0]
je 0x140045ab3
mov r8d, 1
mov rcx, rbp
call fcn.140011dc0
jmp 0x140045ab3
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x70]
call fcn.140028d50
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x58]
lea r15, [rsp + 0xf8]
lea r12, [rsp + 0xa0]
mov rax, qword [rsp + 0x130]
movabs rcx, 0x8000000000000000
cmp rax, rcx
jne 0x140045c66
shr esi, 1
mov rcx, r12
mov rdx, r13
mov r8, rsi
call fcn.1400f5be0
mov rax, qword [rsp + 0xa0]
movabs r9, 0x8000000000000000
cmp rax, r9
mov r8d, 0
cmove rax, r8
mov rcx, qword [rsp + 0xa8]
mov edx, 1
cmove rcx, rdx
mov rdx, qword [rsp + 0xb0]
cmove rdx, r8
jmp 0x140045c80
mov rcx, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x140]
movabs r9, 0x8000000000000000
mov r8, qword [rsp + 0x80]
mov qword [rsp + 0xb0], r8
movaps xmm0, xmmword [rsp + 0x70]
movaps xmmword [rsp + 0xa0], xmm0
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xc8], rdx
mov qword [rsp + 0xd0], r9
mov dword [rsp + 0xe8], 0
mov byte [rsp + 0xec], 0
mov rsi, qword [rbx + 0x10]
cmp rsi, qword [rbx]
jne 0x140045a60
mov rcx, rbx
call fcn.140042fd0
jmp 0x140045a60
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x140045cfc
mov rcx, rdi
call sub.secur32.dll_LsaFreeReturnBuffer
nop
add rsp, 0x158
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x120], rbp
jmp 0x140045d1e
xor r13d, r13d
mov rcx, r13
mov rdx, qword [rsp + 0x120]
call fcn.1400f33e0
ud2