Function at 0x140001b40
Capabilities:
Acquire debug privileges
Create process on windows
Enumerate processes on remote desktop session host
Impersonate user

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x140007008]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov rbx, rdx
mov esi, ecx
mov r9, qword [rdx + 8]
xor r14d, r14d
mov r8d, r14d
lea rcx, str.list
nop dword [rax + rax]
movzx eax, word [r9 + r8*2]
inc r8
cmp ax, word [rcx + r8*2 - 2]
jne 0x1400020b1
cmp r8, 5
jne 0x140001b90
mov qword [rsp + 0x78], r14
mov dword [rbp - 0x78], r14d
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x48], xmm1
mov qword [rbp - 0x38], r14
lea rax, [rbp - 0x78]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x14000205c
lea rdx, str.ProcessID
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001820
mov rcx, rax
lea rdx, [0x14000468c]
call fcn.140001820
mov rcx, rax
lea rdx, str.Username
call fcn.140001820
mov rcx, rax
lea rdx, [0x140004544]
call fcn.140001820
lea rdx, str._n______________________________________________n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001820
mov r12d, r14d
cmp dword [rbp - 0x78], r14d
jbe 0x14000205c
nop dword [rax]
nop word [rax + rax]
mov dword [rbp - 0x7c], r14d
mov dword [rbp - 0x80], r14d
mov eax, r12d
lea rcx, [rax + rax*2]
lea r13, [rcx*8]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x7c]
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov rdx, qword [rdx + r13 + 0x10]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
mov edx, dword [rbp - 0x7c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
mov edx, dword [rbp - 0x80]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x7c]
mov r8, rsi
mov rdx, qword [rsp + 0x78]
mov rdx, qword [rdx + r13 + 0x10]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x50], 0xf
mov byte [rbp - 0x68], 0
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140001d07
lea rcx, [rbp - 0x68]
cmp rbx, 0xf
ja 0x140001d30
mov qword [rbp - 0x58], rbx
mov r8, rbx
mov rdx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rbp + rbx - 0x68], 0
jmp 0x140001d40
mov qword [rsp + 0x20], rbx
mov r9, rdi
mov rdx, rbx
call fcn.1400028c0
mov rcx, qword [rbp - 0x58]
mov rdx, qword [rbp - 0x50]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140001d71
lea rax, [rcx + 1]
mov qword [rbp - 0x58], rax
lea rax, [rbp - 0x68]
cmp rdx, 0x10
cmovae rax, qword [rbp - 0x68]
mov word [rax + rcx], 0x5c
jmp 0x140001d8f
mov qword [rsp + 0x20], 1
lea r9, [0x1400046d0]
mov edx, 1
lea rcx, [rbp - 0x68]
call fcn.1400028c0
mov rdi, 0xffffffffffffffff
inc rdi
cmp byte [rsi + rdi], 0
jne 0x140001d96
mov rcx, qword [rbp - 0x58]
mov rdx, qword [rbp - 0x50]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x140001dde
lea rax, [rdi + rcx]
mov qword [rbp - 0x58], rax
lea rbx, [rbp - 0x68]
cmp rdx, 0x10
cmovae rbx, qword [rbp - 0x68]
add rbx, rcx
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x140001df2
mov qword [rsp + 0x20], rdi
mov r9, rsi
mov rdx, rdi
lea rcx, [rbp - 0x68]
call fcn.1400028c0
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r14
lea rbx, [rbp - 0x68]
cmp qword [rbp - 0x50], 0x10
cmovae rbx, qword [rbp - 0x68]
mov r15, qword [rbp - 0x58]
movabs rax, 0x7fffffffffffffff
cmp r15, rax
ja 0x140002461
cmp r15, 0x10
jae 0x140001e50
mov edi, 0xf
mov qword [rsp + 0x68], rdi
movups xmm0, xmmword [rbx]
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r15
movq rsi, xmm0
jmp 0x140001eee
mov qword [rsp + 0x68], 0xf
mov rdi, r15
or rdi, 0xf
cmp rdi, rax
jbe 0x140001e78
mov rdi, rax
movabs rax, 0x8000000000000000
add rax, 0x27
jmp 0x140001e9f
cmp rdi, 0x16
mov eax, 0x16
cmovb rdi, rax
lea rcx, [rdi + 1]
cmp rcx, 0x1000
jb 0x140001ebe
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002467
mov rcx, rax
call fcn.140002f80
test rax, rax
je 0x14000204e
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x140001ed0
test rcx, rcx
je 0x140001ecd
call fcn.140002f80
mov rsi, rax
jmp 0x140001ed0
mov rsi, r14
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], rdi
lea r8, [r15 + 1]
mov rdx, rbx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov rbx, qword [rbp - 0x48]
mov r14, qword [rbp - 0x40]
cmp rbx, r14
je 0x140001f38
nop dword [rax + rax]
lea rdx, [rsp + 0x50]
cmp rdi, 0x10
cmovae rdx, rsi
mov rcx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140001f1a
mov rcx, qword [rbx]
mov r8, qword [rbx + 0x10]
cmp r8, r15
jne 0x140001f2c
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140001f35
add rbx, 0x20
cmp rbx, r14
jne 0x140001f00
cmp rbx, r14
setne bl
cmp rdi, 0x10
jb 0x140001f76
lea rdx, [rdi + 1]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140001f6a
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000204e
mov rcx, rsi
call fcn.140002fbc
mov r14, qword [rbp - 0x40]
test bl, bl
jne 0x140001fdc
lea rdx, [0x1400046d4]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001820
mov rcx, rax
mov rax, qword [rsp + 0x78]
mov edx, dword [rax + r13 + 4]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x14000468c]
call fcn.140001820
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 0x10
cmovae rdx, qword [rbp - 0x68]
mov r8, qword [rbp - 0x58]
mov rcx, rax
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140004544]
call fcn.140001820
mov r14, qword [rbp - 0x40]
cmp r14, qword [rbp - 0x38]
je 0x140001ff5
lea rdx, [rbp - 0x68]
mov rcx, r14
call fcn.1400024e0
add qword [rbp - 0x40], 0x20
jmp 0x140002006
lea r8, [rbp - 0x68]
mov rdx, r14
lea rcx, [rbp - 0x48]
call fcn.140002c50
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 0x10
jb 0x14000203d
inc rdx
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002038
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002055
call fcn.140002fbc
inc r12d
cmp r12d, dword [rbp - 0x78]
jae 0x14000205c
xor r14d, r14d
jmp 0x140001c50
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x14000230d
mov rdx, qword [rbp - 0x40]
call fcn.140002830
mov rdx, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x48]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400023c4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400023c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r14
lea rdx, [0x1400046d8]
nop dword [rax + rax]
movzx eax, word [r9 + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x14000230d
cmp rcx, 5
jne 0x1400020c0
lea r8, [rbp - 0x78]
lea edx, [rcx + 0x23]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea rdx, str.SeImpersonatePrivilege
mov rcx, qword [rbp - 0x78]
call fcn.140001a50
lea rdx, str.SeDebugPrivilege
mov rcx, qword [rbp - 0x78]
call fcn.140001a50
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov r8d, eax
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
jne 0x14000214b
lea rcx, str.____Unable_to_open_process___check_PID
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rdi + 2]
jmp 0x14000230f
lea rcx, str.___Opened_Process_Sucessufully__n
call fcn.140001010
mov qword [rsp + 0x78], r14
lea r8, [rsp + 0x78]
mov edx, 2
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp qword [rsp + 0x78], r14
je 0x140002457
lea rcx, str.___Opened_Process_Token_Sucessufully__n
call fcn.140001010
mov qword [rbp - 0x70], r14
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x1400023ce
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], rax
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], rax
cmp esi, 5
jl 0x1400022a7
mov rdx, qword [rbx + 0x20]
lea r8, str.interactive
mov rcx, r14
nop word [rax + rax]
movzx eax, word [rdx + rcx*2]
cmp ax, word [r8 + rcx*2]
jne 0x1400022a7
movzx eax, word [rdx + rcx*2 + 2]
cmp ax, word [r8 + rcx*2 + 2]
jne 0x1400022a7
add rcx, 2
cmp rcx, 0xc
jne 0x140002210
xor edx, edx
mov r8d, 0x60000
lea rcx, str.winsta0
call qword [sym.imp.USER32.dll_OpenWindowStationA]
test rax, rax
jne 0x14000225e
lea rcx, str.____Failed_to_get_windows_station
call fcn.140001010
jmp 0x14000226d
lea rdx, str.winsta0
mov rcx, rax
call fcn.1400013e0
mov r9d, 0x2000000
xor r8d, r8d
xor edx, edx
lea rcx, str.default
call qword [sym.imp.USER32.dll_OpenDesktopA]
test rax, rax
jne 0x140002298
lea rcx, str.____Failed_to_get_windows_station
call fcn.140001010
jmp 0x1400022a7
lea rdx, str.default
mov rcx, rax
call fcn.1400013e0
lea rax, [rbp - 0x48]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
mov r9, qword [rbx + 0x18]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
je 0x14000233c
lea rdx, str._n___Opend_Process_Sucessfully:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002650
mov rcx, rax
mov rdx, qword [rbx + 0x18]
call fcn.140002650
mov rcx, rax
lea rdx, [0x1400047d0]
call fcn.140002650
xor eax, eax
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.140002f60
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rcx, [rsp + 0x50]
call fcn.140001230
mov rbx, rax
lea rdx, str._n____Unable_to_CreateProcessWithTokenW:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001820
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140002369
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140004544]
call fcn.140001820
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x14000230d
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400023c4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400023c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002fbc
jmp 0x14000230d
lea rcx, [rsp + 0x50]
call fcn.140001230
mov rbx, rax
lea rdx, str._n____Unable_to_duplicate_token:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001820
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1400023fb
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140002a90
mov rcx, rax
lea rdx, [0x140004544]
call fcn.140001820
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x140002457
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002452
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002452
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002fbc
mov eax, 2
jmp 0x14000230f
call fcn.140001210
int3
call fcn.140001170
int3