Function at 0x140038500
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov rax, qword [0x140095050]
xor rax, rsp
mov qword [rbp + 0x58], rax
mov rsi, r8
mov r15, rdx
mov r14, rcx
xor r12d, r12d
mov dword [rsp + 0x60], r12d
add rcx, 8
mov rdx, r8
call fcn.140038190
test al, al
je 0x14003884a
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], r12d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor edx, edx
xor ecx, ecx
lea r8d, [r12 + 1]
call sub.WTSAPI32.dll_WTSEnumerateProcessesW
cmp eax, 1
jne 0x14003860f
mov eax, dword [rsp + 0x38]
lea rcx, [rax + rax*2]
mov rdi, qword [rsp + 0x30]
lea rbx, [rdi + rcx*8]
cmp rdi, rbx
je 0x140038602
cmp dword [rdi], r12d
jne 0x1400385f4
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x50], rcx
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], r12w
jne 0x1400385a5
mov qword [rsp + 0x58], rax
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rbp - 0x60], xmm0
movups xmm1, xmmword [str.lsass.exe]
movaps xmmword [rsp + 0x70], xmm1
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x70]
call fcn.14002ec40
test al, al
je 0x1400385f4
mov edx, 0x16
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
cmp eax, 1
je 0x140038742
add rdi, 0x18
cmp rdi, rbx
jne 0x140038590
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x14003860f
mov rcx, rdi
call sub.WTSAPI32.dll_WTSFreeMemory
mov edi, 0xffffffff
mov dword [r14 + 0xc], edi
cmp edi, 0xffffffff
jne 0x14003875d
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x78], 7
mov edx, 0x48
lea rcx, [rsp + 0x70]
call fcn.140003c60
mov rcx, rax
movdqa xmm0, xmmword [0x14005a440]
movdqu xmmword [rbp - 0x80], xmm0
movaps xmm1, xmmword [str.Elevator::ImpersonationSystemPrivilege_unable_lookup_system_process_pid]
movups xmmword [rax], xmm1
movaps xmm0, xmmword [0x14005a2a0]
movups xmmword [rax + 0x10], xmm0
movaps xmm1, xmmword [0x14005a2b0]
movups xmmword [rax + 0x20], xmm1
movaps xmm0, xmmword [0x14005a2c0]
movups xmmword [rax + 0x30], xmm0
movaps xmm1, xmmword [0x14005a2d0]
movups xmmword [rax + 0x40], xmm1
movaps xmm0, xmmword [0x14005a2e0]
movups xmmword [rax + 0x50], xmm0
movaps xmm1, xmmword [0x14005a2f0]
movups xmmword [rax + 0x60], xmm1
movaps xmm0, xmmword [0x14005a300]
movups xmmword [rax + 0x70], xmm0
movsd xmm0, qword [0x14005a310]
movsd qword [rax + 0x80], xmm0
mov eax, dword [0x14005a318]
mov dword [rcx + 0x88], eax
movzx eax, word [0x14005a31c]
mov word [rcx + 0x8c], ax
mov word [rcx + 0x8e], r12w
mov qword [rsp + 0x70], rcx
mov dword [rbp - 0x70], 1
lea rdx, [rsp + 0x70]
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rbp - 0x70]
mov dword [rsi + 0x20], eax
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x14003884a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038738
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038cb9
call fcn.14003a23c
jmp 0x14003884a
mov edi, dword [rdi + 4]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140038614
call sub.WTSAPI32.dll_WTSFreeMemory
jmp 0x140038614
mov qword [rsp + 0x38], 0xffffffffffffffff
mov r8d, edi
xor edx, edx
mov ecx, 0x2000000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x30], rax
cmp rax, 0xffffffffffffffff
jne 0x1400387ce
lea rax, str.Elavator::impersonation_system_token_OpenProcess_
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 0x32
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x70], xmm0
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x40]
call fcn.140001350
mov rdi, rax
mov rdx, rax
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rdi + 0x20]
mov dword [rsi + 0x20], eax
lea rcx, [rbp - 0x40]
call fcn.1400012e0
jmp 0x14003884a
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x70], rcx
mov byte [rsp + 0x78], 1
lea r8, [rsp + 0x38]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp eax, 1
je 0x14003886a
lea rax, str.Elavator::impersonation_system_token_OpenProcessToken_
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 0x37
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rbp - 0x60], xmm0
lea rdx, [rbp - 0x60]
lea rcx, [rbp + 8]
call fcn.140001350
mov rdi, rax
mov rdx, rax
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rdi + 0x20]
mov dword [rsi + 0x20], eax
lea rcx, [rbp + 8]
call fcn.1400012e0
nop
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rcx, qword [rbp + 0x58]
xor rcx, rsp
call fcn.14003a1e0
add rsp, 0x160
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rax, [rsp + 0x38]
mov qword [rbp - 0x60], rax
mov byte [rbp - 0x58], 1
mov qword [rsp + 0x28], r14
mov ebx, 2
mov dword [rsp + 0x20], ebx
mov r9d, ebx
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp eax, 1
je 0x1400388fc
lea rax, str.Elavator::impersonation_system_token_DuplicateTokenEx_
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 0x37
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x50], xmm0
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x30]
call fcn.140001350
mov rdi, rax
mov rdx, rax
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rdi + 0x20]
mov dword [rsi + 0x20], eax
lea rcx, [rbp + 0x30]
call fcn.1400012e0
nop
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14003883f
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, r15
mov rcx, qword [r14]
call fcn.140038f50
test al, al
jne 0x140038b98
test r15, r15
jne 0x140038958
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 8], xmm1
lea r8d, [r15 + 3]
lea rdx, [0x14005a320]
lea rcx, [rbp - 0x18]
call fcn.140003890
lea rax, [rbp - 0x18]
lea ebx, [r15 + 1]
jmp 0x140038965
lea rdx, [rbp - 0x60]
mov rcx, r15
call fcn.140038cd0
nop
mov r15, rax
cmp qword [rax + 0x18], 8
jb 0x140038972
mov r15, qword [rax]
mov r14, qword [rax + 0x10]
mov qword [rsp + 0x78], 0x41
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], 7
mov word [rsp + 0x70], r12w
or ebx, 8
mov dword [rsp + 0x60], ebx
lea rdx, [r14 + 0x41]
test rdx, rdx
jne 0x1400389b5
mov qword [rbp - 0x80], rdx
mov word [rsp + rdx*2 + 0x70], r12w
jmp 0x1400389ef
cmp rdx, 7
ja 0x1400389d6
mov qword [rbp - 0x80], rdx
movzx eax, r12w
lea rdi, [rsp + 0x70]
mov rcx, rdx
rep stosw word [rdi], ax
mov word [rsp + rdx*2 + 0x70], r12w
jmp 0x1400389ef
mov word [rsp + 0x20], r12w
mov r9, rdx
movzx r8d, byte [rsp + 0x40]
lea rcx, [rsp + 0x70]
call fcn.140003960
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae rcx, qword [rsp + 0x70]
movups xmm0, xmmword [str.Elevator::ImpersonationSystemPrivilege_unable_enable_privileges:]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [0x14005a340]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [0x14005a350]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [0x14005a360]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [0x14005a370]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [0x14005a380]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [0x14005a390]
movups xmmword [rcx + 0x60], xmm0
movups xmm1, xmmword [0x14005a3a0]
movups xmmword [rcx + 0x70], xmm1
movzx eax, word [0x14005a3b0]
mov word [rcx + 0x80], ax
add rcx, 0x82
test r14, r14
je 0x140038a7c
lea r8, [r14 + r14]
mov rdx, r15
call fcn.14003c180
movups xmm0, xmmword [rsp + 0x70]
movups xmmword [rbp - 0x40], xmm0
movups xmm1, xmmword [rbp - 0x80]
movups xmmword [rbp - 0x30], xmm1
mov dword [rbp - 0x20], 1
and ebx, 0xfffffff7
or ebx, 4
lea rdx, [rbp - 0x40]
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rbp - 0x20]
mov dword [rsi + 0x20], eax
mov rdx, qword [rbp - 0x28]
cmp rdx, 8
jb 0x140038aed
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038ae7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038cbf
call fcn.14003a23c
nop
test bl, 2
je 0x140038b47
and ebx, 0xfffffffd
mov rdx, qword [rbp - 0x48]
cmp rdx, 8
jb 0x140038b35
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038b30
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038cad
call fcn.14003a23c
movdqa xmm0, xmmword [0x14008c410]
movdqu xmmword [rbp - 0x50], xmm0
mov word [rbp - 0x60], r12w
test bl, 1
je 0x14003884a
mov rdx, qword [rbp]
cmp rdx, 8
jb 0x14003884a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038738
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038cb3
jmp 0x140038738
mov rdx, qword [r14]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
cmp eax, 1
je 0x140038ca6
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x78], 7
mov edx, 0x38
lea rcx, [rsp + 0x70]
call fcn.140003c60
mov rcx, rax
movdqa xmm0, xmmword [0x14005a430]
movdqu xmmword [rbp - 0x80], xmm0
movaps xmm1, xmmword [str.Elevator::ImpersonationSystemPrivilege_SetThreadToken_]
movups xmmword [rax], xmm1
movaps xmm0, xmmword [0x14005a3d0]
movups xmmword [rax + 0x10], xmm0
movaps xmm1, xmmword [0x14005a3e0]
movups xmmword [rax + 0x20], xmm1
movaps xmm0, xmmword [0x14005a3f0]
movups xmmword [rax + 0x30], xmm0
movaps xmm1, xmmword [0x14005a400]
movups xmmword [rax + 0x40], xmm1
movaps xmm0, xmmword [0x14005a410]
movups xmmword [rax + 0x50], xmm0
movsd xmm0, qword [0x14005a420]
movsd qword [rax + 0x60], xmm0
mov eax, dword [0x14005a428]
mov dword [rcx + 0x68], eax
movzx eax, word [0x14005a42c]
mov word [rcx + 0x6c], ax
mov word [rcx + 0x6e], r12w
mov qword [rsp + 0x70], rcx
mov dword [rbp - 0x70], 1
lea rdx, [rsp + 0x70]
mov rcx, rsi
call fcn.140002f90
mov eax, dword [rbp - 0x70]
mov dword [rsi + 0x20], eax
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x14003884a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038738
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038cb9
jmp 0x140038738
mov al, 1
jmp 0x14003884c
call fcn.140040b2c
nop
call fcn.140040b2c
int3
call fcn.140040b2c
nop
call fcn.140040b2c
int3