Function at 0x1400440c0
Capabilities:
Get session information
Get session user name

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rbp - 0x71], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1400bc178]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
xor r12d, r12d
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x34], r12d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
lea r13d, [r12 + 1]
mov r8d, r13d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x14004417d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test byte [0x1400bcf00], 8
je 0x140044155
mov r8d, eax
lea rdx, [0x14008b970]
mov rcx, qword [0x1400bcf48]
call fcn.14000fbc0
test byte [0x1400bd100], 8
je 0x14004472c
mov r8d, ebx
lea rdx, [0x14008b970]
mov rcx, qword [0x1400bd108]
call fcn.14000fbc0
jmp 0x14004472c
mov rbx, qword [rsp + 0x40]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.1400618a8
mov qword [rsp + 0x38], rax
lea rcx, vtable.appv::utility::scope_guard_func_impl_class_std::_Binder_struct_std::_Unforced__void____cdecl___void____ptr64___struct__WTS_SESSION_INFOW____ptr64____ptr64__.0
mov qword [rax], rcx
mov rcx, qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rbx
mov qword [rbp - 0x79], rax
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x30], r12d
mov r14d, r12d
cmp dword [rsp + 0x34], r12d
jbe 0x140044723
mov ebx, 7
lea rdi, vtable.AppV::LogFormatter.0
mov eax, r14d
lea rsi, [rax + rax*2]
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + rsi*8 + 0x10]
test ecx, ecx
je 0x140044308
call fcn.1400463e4
mov qword [rsp + 0x38], rax
mov qword [rbp - 9], rbx
mov qword [rbp - 0x11], r12
mov word [rbp - 0x21], r12w
mov r8d, 0x4b
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rbp - 0x21]
call fcn.140003394
nop
mov qword [rbp - 0x29], rbx
mov qword [rbp - 0x31], r12
mov word [rbp - 0x41], r12w
movzx eax, word [str.Client]
neg ax
sbb r8, r8
and r8d, 6
lea rdx, str.Client
lea rcx, [rbp - 0x41]
call fcn.140003394
nop
call fcn.140007e38
lea r8, [rbp - 0x21]
lea rdx, [rbp - 1]
call fcn.1400377c0
mov rbx, rax
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x69]
call fcn.140003144
mov dword [rbp - 0x49], SysAllocStringByteLen
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + rsi*8]
mov rcx, rbx
call fcn.14000a5c4
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.14000e71c
mov r9, rax
lea r8, [rbp - 0x41]
mov edx, 4
lea rcx, [rbp - 0x69]
call fcn.1400379a4
nop
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x1400442c0
inc rdx
mov r8, r13
mov rcx, qword [rbp - 0x69]
call fcn.1400029dc
mov qword [rbp - 0x51], SafeArrayGetDim
mov qword [rbp - 0x59], r12
mov byte [rbp - 0x69], r12b
mov qword [rbp - 1], rdi
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp + 0xf]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x41]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x21]
call fcn.14000328c
jmp 0x140044710
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x30], r12d
mov edi, 5
mov dword [rsp + 0x38], edi
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x48]
lea r8d, [rdi + 3]
mov edx, dword [rax + rsi*8]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x1400443bc
mov ecx, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400443ae
test rbx, rbx
je 0x14004436c
cmp rcx, 4
ja 0x14004436c
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x38]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edi, dword [rsp + 0x38]
jmp 0x1400443ae
xor edi, edi
mov eax, r12d
test rbx, rbx
setne al
test eax, eax
jne 0x140044389
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [rax], SafeArrayUnaccessData
jmp 0x1400443a3
mov eax, r12d
cmp rcx, 4
setbe al
test eax, eax
jne 0x1400443ae
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [rax], 0x22
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo]
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ebx, 7
test edi, edi
je 0x1400444eb
mov ecx, edi
call fcn.1400463e4
mov qword [rsp + 0x38], rax
mov qword [rbp - 0x29], rbx
mov qword [rbp - 0x31], r12
mov word [rbp - 0x41], r12w
mov r8d, 0x4b
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rbp - 0x41]
call fcn.140003394
nop
mov qword [rbp - 9], rbx
mov qword [rbp - 0x11], r12
mov word [rbp - 0x21], r12w
movzx eax, word [str.Client]
neg ax
sbb r8, r8
and r8d, 6
lea rdx, str.Client
lea rcx, [rbp - 0x21]
call fcn.140003394
nop
call fcn.140007e38
lea r8, [rbp - 0x41]
lea rdx, [rbp - 1]
call fcn.1400377c0
mov rbx, rax
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x69]
call fcn.140003144
mov dword [rbp - 0x49], 0xa9
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + rsi*8]
mov rcx, rbx
call fcn.14000a5c4
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.14000e71c
mov r9, rax
lea r8, [rbp - 0x21]
mov edx, 4
lea rcx, [rbp - 0x69]
call fcn.1400379a4
nop
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x14004449c
inc rdx
mov r8, r13
mov rcx, qword [rbp - 0x69]
call fcn.1400029dc
mov qword [rbp - 0x51], SafeArrayGetDim
mov qword [rbp - 0x59], r12
mov byte [rbp - 0x69], r12b
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 1], rax
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp + 0xf]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x21]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x41]
call fcn.14000328c
jmp 0x140044709
mov qword [rbp - 0x29], rbx
mov qword [rbp - 0x31], r12
mov word [rbp - 0x41], r12w
mov r8d, 0x40
lea rdx, str.UserManager_processing_existing_logons__found_active_session__1_
lea rcx, [rbp - 0x41]
call fcn.140003394
nop
mov qword [rbp - 9], rbx
mov qword [rbp - 0x11], r12
mov word [rbp - 0x21], r12w
movzx eax, word [str.Client]
neg ax
sbb r8, r8
and r8d, 6
lea rdx, str.Client
lea rcx, [rbp - 0x21]
call fcn.140003394
nop
call fcn.140007e38
lea r8, [rbp - 0x41]
lea rdx, [rbp - 1]
call fcn.1400377c0
mov rbx, rax
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x69]
call fcn.140003144
mov dword [rbp - 0x49], 0xaf
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + rsi*8]
mov rcx, rbx
call fcn.14000a5c4
mov r9, rbx
lea r8, [rbp - 0x21]
mov edx, 4
lea rcx, [rbp - 0x69]
call fcn.1400379a4
nop
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x1400445aa
inc rdx
mov r8, r13
mov rcx, qword [rbp - 0x69]
call fcn.1400029dc
mov qword [rbp - 0x51], SafeArrayGetDim
mov qword [rbp - 0x59], r12
mov byte [rbp - 0x69], r12b
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 1], rax
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp + 0xf]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x21]
call fcn.14000328c
nop
xor r8d, r8d
mov dl, r13b
lea rcx, [rbp - 0x41]
call fcn.14000328c
mov rax, qword [rsp + 0x40]
mov r8b, r13b
mov edx, dword [rax + rsi*8]
mov rcx, r15
call fcn.1400455d8
mov rbx, rax
mov esi, 0x5c
mov edx, esi
lea rdi, str.admin_appman_appvclienthostcommonusermanagerimpl.cpp
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x14004462b
add rax, r13
jmp 0x14004462e
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400bd408]
call fcn.14000fa54
shl rax, 0x34
xor rax, rbx
movabs rcx, 0x8000000000
test rcx, rax
jne 0x140044709
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x14004466c
add rax, r13
jmp 0x14004466f
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400bd408]
call fcn.14000fa54
shl rax, 0x34
xor rax, rbx
movabs rcx, 0x2000000000
test rcx, rax
jne 0x140044709
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x1400446a9
add rax, r13
jmp 0x1400446ac
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400bd408]
call fcn.14000fa54
shl rax, 0x34
shr rax, 0x20
and al, 0x11
or al, 0xe
mov rcx, rbx
shr rcx, 0x20
and cl, 0x1f
cmp cl, al
jne 0x140044709
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
test rax, rax
je 0x1400446ea
add rax, r13
jmp 0x1400446ed
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400bd408]
call fcn.14000fa54
shl rax, 0x34
or eax, 0x302
cmp ebx, eax
je 0x140044723
lea rdi, vtable.AppV::LogFormatter.0
add r14d, r13d
cmp r14d, dword [rsp + 0x34]
mov ebx, 7
jb 0x1400441d2
lea rcx, [rbp - 0x79]
call fcn.1400062a4
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140061880
lea r11, [rsp + 0x100]
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