Function at 0x140051ba0
Capabilities:
Enumerate processes on remote desktop session host
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x47]
sub rsp, 0x90
mov rax, qword [0x14039bc30]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor r15d, r15d
mov qword [rbp + 0x27], r15
mov dword [rbp + 0x1f], r15d
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x27]
xor edx, edx
xor ecx, ecx
lea r8d, [r15 + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x140051c2d
lea ecx, [rax + 5]
call fcn.1400b2690
test eax, eax
je 0x140051c71
lea rax, str.WTSEnumerateSessions_failed
mov qword [rsp + 0x20], rax
lea r9d, [r15 + 0x67]
lea r8, str.McAfee::DAD::ImpersonateLoggedInUser::GetActiveSessionID
lea rdx, str.E:BT2b930805_726b_4e13_82a8_9915837eb5a8DynamicAppDownloaderPluginsBSIUpdaterPlugin_srcImpersonateLoggedInUser.cpp
lea ecx, [r15 + 5]
call fcn.1400297c0
jmp 0x140051c71
mov edx, r15d
mov r8, qword [rbp + 0x27]
mov r9d, dword [rbp + 0x1f]
test r9d, r9d
je 0x140051c68
nop dword [rax]
mov eax, edx
lea rcx, [rax + rax*2]
movups xmm0, xmmword [r8 + rcx*8]
movups xmmword [rbp + 7], xmm0
movsd xmm1, qword [r8 + rcx*8 + 0x10]
movsd qword [rbp + 0x17], xmm1
cmp dword [rbp + 0x17], r15d
je 0x140051c9c
inc edx
cmp edx, r9d
jb 0x140051c40
mov rcx, r8
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
xor al, al
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.14013af80
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov rcx, r8
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov qword [rbp - 0x19], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], 7
mov r8d, 0xc
lea rdx, str.explorer.exe
lea rcx, [rbp - 0x19]
call fcn.140032810
cmp qword [rbp - 9], r15
je 0x140051d86
mov qword [rbp + 0x27], r15
mov dword [rbp + 0x1f], r15d
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x27]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x140051d86
mov rcx, qword [rbp + 0x27]
test rcx, rcx
je 0x140051d86
mov ebx, r15d
mov edx, dword [rbp + 0x1f]
test edx, edx
je 0x140051d80
mov r14d, dword [rbp + 7]
nop dword [rax + rax]
mov edi, ebx
lea rax, [rdi + rdi*2]
lea rsi, [rax*8]
cmp r14d, dword [rsi + rcx]
jne 0x140051d7a
cmp qword [rsi + rcx + 8], r15
je 0x140051d7a
mov rcx, qword [rsi + rcx + 8]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, [0x140331998]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, qword [rbp + 0x27]
lea rcx, [rbp - 0x19]
cmp qword [rbp - 1], 8
cmovae rcx, qword [rbp - 0x19]
mov rdx, qword [rsi + rax + 8]
call fcn.14014a3cc
mov rcx, qword [rbp + 0x27]
test eax, eax
je 0x140051d94
mov edx, dword [rbp + 0x1f]
inc ebx
cmp ebx, edx
jb 0x140051d20
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea rcx, [rbp - 0x19]
call fcn.140033a90
jmp 0x140051c71
lea rax, [rdi + rdi*2]
mov ebx, dword [rcx + rax*8 + 4]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea rcx, [rbp - 0x19]
call fcn.140033a90
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
mov qword [rbp + 0x27], rax
test rax, rax
jne 0x140051e15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x1f], eax
lea ecx, [rbx + 5]
call fcn.1400b2690
test eax, eax
je 0x140051e0d
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x28], rax
lea rax, str.Error_obtaining_handle_to_process._err_u.
mov qword [rsp + 0x20], rax
mov r9d, 0x8c
lea r8, str.McAfee::DAD::ImpersonateLoggedInUser::ImpersonateActiveSession
lea rdx, str.E:BT2b930805_726b_4e13_82a8_9915837eb5a8DynamicAppDownloaderPluginsBSIUpdaterPlugin_srcImpersonateLoggedInUser.cpp
lea ecx, [rbx + 5]
call fcn.14004a110
xor dil, dil
jmp 0x140051ec1
mov qword [rbp + 0x2f], r15
lea r8, [rbp + 0x2f]
mov edx, 0xf01ff
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140051e4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x1f], eax
mov ecx, 5
call fcn.1400b2690
test eax, eax
je 0x140051ea6
mov r9d, 0x95
jmp 0x140051e79
mov rcx, qword [rbp + 0x2f]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x140051eab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x1f], eax
mov ecx, 5
call fcn.1400b2690
test eax, eax
je 0x140051ea6
mov r9d, 0x9d
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x28], rax
lea rax, str.OpenProcessToken_failed__err_u
mov qword [rsp + 0x20], rax
lea r8, str.McAfee::DAD::ImpersonateLoggedInUser::ImpersonateActiveSession
lea rdx, str.E:BT2b930805_726b_4e13_82a8_9915837eb5a8DynamicAppDownloaderPluginsBSIUpdaterPlugin_srcImpersonateLoggedInUser.cpp
mov ecx, 5
call fcn.14004a110
xor dil, dil
jmp 0x140051eae
mov dil, 1
mov rcx, qword [rbp + 0x2f]
test rcx, rcx
je 0x140051ec1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x2f], r15
test rbx, rbx
je 0x140051ecf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, dil
jmp 0x140051c73