Function at 0x140047c20
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 - 0x38]
sub rsp, 0x110
mov rax, qword [0x1400ab2e8]
xor rax, rsp
mov qword [rbp], rax
mov r12, rcx
xor r13d, r13d
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x44], r13d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor edx, edx
xor ecx, ecx
lea r8d, [r13 + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
nop dword [rax + rax]
test eax, eax
jne 0x140047d21
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea edi, [r13 + 2]
test byte [0x1400ac300], 8
je 0x140047cdb
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 4
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea rdx, [0x140083b90]
lea rcx, [0x1400a5200]
call fcn.14000466c
test byte [0x1400ac440], 8
je 0x140048248
mov dword [rsp + 0x30], ebx
lea rax, [rsp + 0x30]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 4
lea rax, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea rdx, [0x140083b90]
lea rcx, [0x1400a5320]
call fcn.14000466c
jmp 0x140048248
mov rbx, qword [rsp + 0x38]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.140061ac4
mov qword [rsp + 0x50], 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 [rsp + 0x60], rax
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x40], r13d
mov r14d, r13d
cmp dword [rsp + 0x44], r13d
jbe 0x14004823e
lea rsi, vtable.AppV::LogFormatter.0
mov eax, r14d
lea r15, [rax + rax*2]
mov rax, qword [rsp + 0x38]
cmp dword [rax + r15*8 + 0x10], r13d
je 0x140047e84
mov r8d, SysAllocStringByteLen
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x48]
call fcn.14003a94c
mov rdi, rax
call fcn.14000aaa8
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x10], r13
mov qword [rbp - 8], 7
mov word [rbp - 0x20], r13w
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rbp - 0x20]
call fcn.140003d68
nop
lea r8, [rbp - 0x20]
lea rdx, [rbp - 0x78]
call fcn.14003a914
nop
mov rcx, qword [rsp + 0x38]
lea rdx, [rcx + r15*8]
mov rcx, rax
call fcn.14000d074
mov r8, rax
mov rcx, qword [rsp + 0x38]
mov ecx, dword [rcx + r15*8 + 0x10]
call fcn.140049c94
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
mov rcx, r8
call fcn.1400123a0
mov rbx, rax
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], r13w
lea rdx, str.Client
lea rcx, [rsp + 0x68]
call fcn.140003d68
nop
mov r9, rbx
lea r8, [rsp + 0x68]
mov edx, 4
mov rcx, rdi
call fcn.14003aabc
nop
lea rcx, [rsp + 0x68]
call fcn.140003cf8
nop
mov qword [rbp - 0x78], rsi
lea rcx, [rbp - 0x68]
call fcn.140003cf8
nop
lea rcx, [rbp - 0x20]
call fcn.140003cf8
nop
lea rcx, [rbp - 0x48]
call fcn.14000b438
jmp 0x140048230
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x40], r13d
mov esi, 5
mov dword [rsp + 0x30], esi
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x48]
lea r8d, [rsi + 3]
mov edx, dword [rax + r15*8]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
nop dword [rax + rax]
test eax, eax
je 0x140047f46
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x48]
test rax, rax
je 0x140047f37
test rbx, rbx
je 0x140047ef3
cmp rax, 4
ja 0x140047ef3
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov esi, dword [rsp + 0x30]
jmp 0x140047f37
xor esi, esi
test rbx, rbx
jne 0x140047f0e
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
nop dword [rax + rax]
mov dword [rax], SafeArrayGetElement
jmp 0x140047f26
cmp rax, 4
jbe 0x140047f37
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]
lea rdx, str.AppV::Client::Host::UserManagerImpl::EnumSessions
lea rcx, [rbp - 0x48]
test esi, esi
je 0x140048048
mov r8d, 0xa9
call fcn.14003a94c
mov rdi, rax
call fcn.14000aaa8
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], r13w
lea rdx, str.UserManager_processing_existing_logons__ignoring_session__1__in_state__2_
lea rcx, [rsp + 0x68]
call fcn.140003d68
nop
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x78]
call fcn.14003a914
nop
mov rdx, qword [rsp + 0x38]
lea rdx, [rdx + r15*8]
mov rcx, rax
call fcn.14000d074
mov r8, rax
mov ecx, esi
call fcn.140049c94
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x50]
mov rcx, r8
call fcn.1400123a0
mov rbx, rax
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x10], r13
mov qword [rbp - 8], 7
mov word [rbp - 0x20], r13w
lea rdx, str.Client
lea rcx, [rbp - 0x20]
call fcn.140003d68
nop
mov r9, rbx
lea r8, [rbp - 0x20]
mov edx, 4
mov rcx, rdi
call fcn.14003aabc
nop
lea rcx, [rbp - 0x20]
call fcn.140003cf8
nop
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 0x78], rax
lea rcx, [rbp - 0x68]
call fcn.140003cf8
nop
lea rcx, [rsp + 0x68]
call fcn.140003cf8
nop
lea rcx, [rbp - 0x48]
call fcn.14000b438
jmp 0x140048229
mov r8d, 0xaf
call fcn.14003a94c
mov rdi, rax
call fcn.14000aaa8
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], r13w
lea rdx, str.UserManager_processing_existing_logons__found_active_session__1_
lea rcx, [rsp + 0x68]
call fcn.140003d68
nop
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x78]
call fcn.14003a914
nop
mov rcx, qword [rsp + 0x38]
lea rdx, [rcx + r15*8]
mov rcx, rax
call fcn.14000d074
mov rbx, rax
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x10], r13
mov qword [rbp - 8], 7
mov word [rbp - 0x20], r13w
lea rdx, str.Client
lea rcx, [rbp - 0x20]
call fcn.140003d68
nop
mov r9, rbx
lea r8, [rbp - 0x20]
mov edx, 4
mov rcx, rdi
call fcn.14003aabc
nop
lea rcx, [rbp - 0x20]
call fcn.140003cf8
nop
lea rax, vtable.AppV::LogFormatter.0
mov qword [rbp - 0x78], rax
lea rcx, [rbp - 0x68]
call fcn.140003cf8
nop
lea rcx, [rsp + 0x68]
call fcn.140003cf8
nop
lea rcx, [rbp - 0x48]
call fcn.14000b438
mov rax, qword [r12]
movabs r10, 0xade887895c55b870
mov rcx, qword [rsp + 0x38]
mov edx, dword [rcx + r15*8]
mov rcx, r12
mov rax, qword [rax + 0x20]
call qword [0x14006efd8]
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]
nop dword [rax + rax]
test rax, rax
je 0x140048164
inc rax
jmp 0x140048167
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400ac690]
call fcn.140013434
bt rbx, 0x27
jb 0x140048229
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004819c
inc rax
jmp 0x14004819f
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400ac690]
call fcn.140013434
bt rbx, 0x25
jb 0x140048229
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x1400481d0
inc rax
jmp 0x1400481d3
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400ac690]
call fcn.140013434
mov rax, rbx
shr rax, 0x20
and al, 0x1f
cmp al, 0xe
jne 0x140048229
mov edx, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_strrchr]
nop dword [rax + rax]
test rax, rax
je 0x14004820a
inc rax
jmp 0x14004820d
mov rax, rdi
mov rdx, rax
lea rcx, [0x1400ac690]
call fcn.140013434
shl rax, 0x34
or eax, 0x302
cmp ebx, eax
je 0x14004823e
lea rsi, vtable.AppV::LogFormatter.0
inc r14d
cmp r14d, dword [rsp + 0x44]
jb 0x140047d72
lea rcx, [rsp + 0x60]
call fcn.1400065c4
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140061aa0
lea r11, [rsp + 0x110]
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