Function at 0x140049dd4
Capabilities:
Get session user name

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x740
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x140099938]
xor rax, rsp
mov qword [rsp + 0x730], rax
mov r13, rcx
lea r8, [0x140081e20]
lea r15, str.CUserPrivilege::ImpersonateActiveSessionUser
mov rdx, r15
mov ecx, 5
call fcn.140009480
lea rcx, [rsp + 0x60]
call fcn.140055364
nop
xor r14d, r14d
mov rbx, r14
mov r12d, r14d
mov qword [rsp + 0x30], r14
lea rcx, str.Advapi32.dll
call fcn.140002494
mov rbp, rax
cmp rax, r14
jne 0x140049e71
lea r8, str.Advapi32.dll_SAW_LoadLibrary_failed._n
mov rdx, r15
lea ecx, [r14 + 4]
call fcn.140009480
jmp 0x14004a06a
cmp dword [rsp + 0xcc], r14d
je 0x14004a06a
mov word [rsp + 0x520], r14w
mov ebx, 0x206
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x522]
call fcn.14005bb90
mov word [rsp + 0x310], r14w
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x312]
call fcn.14005bb90
mov dword [rsp + 0x38], 0x104
lea rcx, str.Wtsapi32.dll
call fcn.140002494
mov rbx, rax
cmp rax, r14
jne 0x140049eef
lea r8, str.Wtsapi32.dll_SAW_LoadLibrary_failed._n
mov rdx, r15
mov ecx, 4
call fcn.140009480
jmp 0x14004a06a
lea rdx, str.WTSQuerySessionInformationW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
cmp rax, r14
jne 0x140049f20
lea r8, str.WTSQuerySessionInformationW_GetProcAddress_failed._n
mov rdx, r15
mov ecx, 4
call fcn.140009480
jmp 0x14004a06a
lea rdx, str.WTSFreeMemory
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
cmp rax, r14
jne 0x140049f51
lea r8, str.WTSFreeMemory_GetProcAddress_failed._n
mov rdx, r15
mov ecx, 4
call fcn.140009480
jmp 0x14004a06a
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
mov r8d, 5
or edx, 0xffffffff
xor ecx, ecx
call rdi
cmp eax, r14d
jne 0x140049f8b
lea r8, str.GetUserName_failed._n
mov rdx, r15
mov ecx, 4
call fcn.140009480
jmp 0x14004a06a
mov r8, qword [rsp + 0x40]
mov edx, 0x104
lea rcx, [rsp + 0x520]
call fcn.14005ceb0
mov rcx, qword [rsp + 0x40]
call rsi
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x310]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
cmp eax, r14d
jne 0x140049fda
lea r8, str.GetUserName_failed._n
mov rdx, r15
mov ecx, 4
call fcn.140009480
jmp 0x14004a06a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rbx, r14
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0x520]
call fcn.14005c7d4
cmp eax, r14d
je 0x14004a06a
lea r8, str.GetExplorerUserToken.__n
mov rdx, r15
mov ecx, 4
call fcn.140009480
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.1400497e8
cmp eax, r14d
je 0x14004a06a
lea r8, str.Start_Impersonation.__n
mov rdx, r15
mov ecx, 4
call fcn.140009480
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov r12d, eax
cmp eax, r14d
jne 0x14004a06a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.ImpersonateLoggedOnUser_failed.___1_d___n
mov rdx, r15
mov ecx, 4
call fcn.140009480
mov rcx, qword [rsp + 0x30]
cmp rcx, r14
je 0x14004a07f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x30], r14
cmp rbp, r14
je 0x14004a08d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp rbx, r14
je 0x14004a09b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r8, [0x140081e40]
mov rdx, r15
mov ecx, 5
call fcn.140009480
nop
lea rcx, [rsp + 0x60]
call fcn.140055358
mov eax, r12d
mov rcx, qword [rsp + 0x730]
xor rcx, rsp
call fcn.14005bad0
lea r11, [rsp + 0x740]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret