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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov rax, qword [0x1400b35a8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r15, rcx
xor r12d, r12d
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x3c], r12d
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
xor edx, edx
xor ecx, ecx
lea r8d, [r12 + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
nop dword [rax + rax]
test eax, eax
jne 0x14004b37b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea edi, [r12 + 2]
test byte [0x1400b45c0], 8
je 0x14004b335
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], 4
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea rdx, [0x140088138]
lea rcx, [0x1400ad200]
call fcn.140004eac
test byte [0x1400b4800], 8
je 0x14004b858
mov dword [rsp + 0x30], ebx
lea rax, [rsp + 0x30]
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], 4
lea rax, [rbp + 7]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea rdx, [0x140088138]
lea rcx, [0x1400ad360]
call fcn.140004eac
jmp 0x14004b858
mov rbx, qword [rsp + 0x40]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.140067698
mov qword [rsp + 0x30], 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 + 0x38], r12d
mov esi, r12d
cmp dword [rsp + 0x3c], r12d
jbe 0x14004b84f
mov ebx, 7
lea r13, str.admin_appman_appvclienthostcommonusermanagerimpl.cpp
mov eax, esi
lea r14, [rax + rax*2]
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + r14*8 + 0x10]
test ecx, ecx
je 0x14004b4c6
call fcn.14004d4b0
mov qword [rsp + 0x30], rax
mov qword [rbp + 0x17], r12
mov qword [rbp + 0x1f], rbx
mov word [rbp + 7], r12w
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rbp + 7]
call fcn.140004374
nop
mov qword [rbp - 0x61], r12
mov qword [rbp - 0x59], rbx
mov word [rbp - 0x71], r12w
lea rdx, str.Client
lea rcx, [rbp - 0x71]
call fcn.140004374
nop
call fcn.14000f37c
lea r8, [rbp + 7]
lea rdx, [rbp - 0x51]
call fcn.14003e718
mov rbx, rax
mov r8d, SysAllocStringByteLen
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x21]
call fcn.14003e750
mov rdi, rax
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + r14*8]
mov rcx, rbx
call fcn.140011bf4
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.1400168e4
mov r9, rax
lea r8, [rbp - 0x71]
mov edx, 4
mov rcx, rdi
call fcn.14003ea28
nop
lea rcx, [rbp - 0x21]
call fcn.140007374
nop
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 0x51], rax
lea rcx, [rbp - 0x41]
call fcn.1400042d4
nop
lea rcx, [rbp - 0x71]
call fcn.1400042d4
nop
lea rcx, [rbp + 7]
call fcn.1400042d4
jmp 0x14004b83e
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x38], r12d
mov edi, 5
mov dword [rsp + 0x30], edi
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x48]
lea r8d, [rdi + 3]
mov edx, dword [rax + r14*8]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
nop dword [rax + rax]
test eax, eax
je 0x14004b58d
mov eax, dword [rsp + 0x38]
mov rbx, qword [rsp + 0x48]
test rax, rax
je 0x14004b579
test rbx, rbx
je 0x14004b535
cmp rax, 4
ja 0x14004b535
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edi, dword [rsp + 0x30]
jmp 0x14004b579
xor edi, edi
test rbx, rbx
jne 0x14004b550
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
nop dword [rax + rax]
mov dword [rax], SafeArrayGetElement
jmp 0x14004b568
cmp rax, 4
jbe 0x14004b579
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
nop dword [rax + rax]
mov dword [rax], 0x22
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
nop dword [rax + rax]
mov ebx, 7
test edi, edi
je 0x14004b670
mov ecx, edi
call fcn.14004d4b0
mov qword [rsp + 0x30], rax
mov qword [rbp - 0x61], r12
mov qword [rbp - 0x59], rbx
mov word [rbp - 0x71], r12w
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rbp - 0x71]
call fcn.140004374
nop
mov qword [rbp + 0x17], r12
mov qword [rbp + 0x1f], rbx
mov word [rbp + 7], r12w
lea rdx, str.Client
lea rcx, [rbp + 7]
call fcn.140004374
nop
call fcn.14000f37c
lea r8, [rbp - 0x71]
lea rdx, [rbp - 0x51]
call fcn.14003e718
mov rbx, rax
mov r8d, 0xa9
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x21]
call fcn.14003e750
mov rdi, rax
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + r14*8]
mov rcx, rbx
call fcn.140011bf4
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.1400168e4
mov r9, rax
lea r8, [rbp + 7]
mov edx, 4
mov rcx, rdi
call fcn.14003ea28
nop
lea rcx, [rbp - 0x21]
call fcn.140007374
nop
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 0x51], rax
lea rcx, [rbp - 0x41]
call fcn.1400042d4
nop
lea rcx, [rbp + 7]
call fcn.1400042d4
nop
lea rcx, [rbp - 0x71]
jmp 0x14004b4bc
mov qword [rbp - 0x61], r12
mov qword [rbp - 0x59], rbx
mov word [rbp - 0x71], r12w
lea rdx, str.UserManager_processing_existing_logons__found_active_session__1_
lea rcx, [rbp - 0x71]
call fcn.140004374
nop
mov qword [rbp + 0x17], r12
mov qword [rbp + 0x1f], rbx
mov word [rbp + 7], r12w
lea rdx, str.Client
lea rcx, [rbp + 7]
call fcn.140004374
nop
call fcn.14000f37c
lea r8, [rbp - 0x71]
lea rdx, [rbp - 0x51]
call fcn.14003e718
mov rdi, rax
mov r8d, 0xaf
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x21]
call fcn.14003e750
mov rbx, rax
mov rcx, qword [rsp + 0x40]
lea rdx, [rcx + r14*8]
mov rcx, rdi
call fcn.140011bf4
mov r9, rax
lea r8, [rbp + 7]
mov edx, 4
mov rcx, rbx
call fcn.14003ea28
nop
lea rcx, [rbp - 0x21]
call fcn.140007374
nop
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 0x51], rax
lea rcx, [rbp - 0x41]
call fcn.1400042d4
nop
lea rcx, [rbp + 7]
call fcn.1400042d4
nop
lea rcx, [rbp - 0x71]
call fcn.1400042d4
mov rax, qword [rsp + 0x40]
mov r8b, 1
mov edx, dword [rax + r14*8]
mov rcx, r15
call fcn.14004c7b4
mov rbx, rax
mov edi, 0x5c
mov edx, edi
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004b769
inc rax
jmp 0x14004b76c
mov rax, r13
mov rdx, rax
lea rcx, [0x1400b4a50]
call fcn.140017744
movabs rax, 0x8000000000
test rax, rbx
jne 0x14004b83e
mov edx, edi
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004b7a9
inc rax
jmp 0x14004b7ac
mov rax, r13
mov rdx, rax
lea rcx, [0x1400b4a50]
call fcn.140017744
movabs rax, 0x2000000000
test rax, rbx
jne 0x14004b83e
mov edx, edi
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004b7e5
inc rax
jmp 0x14004b7e8
mov rax, r13
mov rdx, rax
lea rcx, [0x1400b4a50]
call fcn.140017744
mov rax, rbx
shr rax, 0x20
and al, 0x1f
cmp al, 0xe
jne 0x14004b83e
mov edx, edi
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004b81f
inc rax
jmp 0x14004b822
mov rax, r13
mov rdx, rax
lea rcx, [0x1400b4a50]
call fcn.140017744
shl rax, 0x34
or eax, 0x302
cmp ebx, eax
je 0x14004b84f
inc esi
cmp esi, dword [rsp + 0x3c]
mov ebx, 7
jb 0x14004b3d0
lea rcx, [rbp - 0x79]
call fcn.140006eb4
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140067670
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