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

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x180005010]
xor rax, rsp
mov qword [rbp + 0x18], rax
mov rax, qword [rbp + 0x80]
xor r14d, r14d
mov qword [rsp + 0x70], rax
mov edi, r14d
mov rax, qword [rbp + 0x88]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x130], r12
mov qword [rsp + 0x78], r9
mov qword [rbp - 0x80], r8
mov byte [rsp + 0x60], dl
mov dword [rsp + 0x64], ecx
mov qword [rbp - 0x70], 0xffffffffffffffff
mov qword [rbp - 0x58], 0xffffffffffffffff
mov qword [rbp - 0x60], 0xffffffffffffffff
mov qword [rbp - 0x68], 0xffffffffffffffff
mov qword [rbp - 0x38], 0xffffffffffffffff
mov qword [rbp - 0x78], 0xffffffffffffffff
mov qword [rbp - 0x40], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x70]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x180001a53
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x180001f3f
mov rcx, qword [rbp - 0x70]
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x180001a8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x180001f3f
lea r8, [rbp - 0x28]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x180001ab1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x180001f3f
mov qword [rsp + 0x160], rbx
mov rbx, qword [rbp - 0x58]
mov qword [rsp + 0x138], rsi
mov dword [rbp - 0x20], 2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x180001f1c
mov dword [rax], 1
mov r9d, 0x10
movsd xmm0, qword [rbp - 0x28]
mov r8, rsi
movsd qword [rax + 4], xmm0
xor edx, edx
mov eax, dword [rbp - 0x20]
mov rcx, rbx
mov qword [rsp + 0x28], r14
mov dword [rsi + 0xc], eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
jne 0x180001f27
mov rdx, qword [rbp - 0x58]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x180001f27
cmp dword [rbp + 0x90], 0xffffffff
jne 0x180001b7f
call fcn.1800014f0
mov dword [rbp + 0x90], eax
cmp eax, 0xffffffff
jne 0x180001b7f
mov edi, 0x3f0
jmp 0x180001f2f
mov qword [rsp + 0x128], r13
mov r12d, r14d
mov qword [rsp + 0x120], r15
mov r15d, r14d
mov qword [rbp - 0x50], r14
mov dword [rbp - 0x30], r14d
call fcn.1800014f0
xor edx, edx
lea r9, [rbp - 0x50]
mov r13d, eax
xor ecx, ecx
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r8d, [rdx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x180001c65
mov esi, r14d
cmp dword [rbp - 0x30], r14d
jbe 0x180001c5b
nop word [rax + rax]
mov eax, esi
lea rcx, [rax + rax*2]
mov rax, qword [rbp - 0x50]
cmp qword [rax + rcx*8 + 8], rdi
lea rbx, [rax + rcx*8]
je 0x180001c54
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x180001c54
mov edx, 0x16
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x180001c54
test r15d, r15d
jne 0x180001c31
cmp dword [rbx], edi
jne 0x180001c31
mov rdx, qword [rbx + 8]
lea rcx, str.lsass.exe
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x180001c31
mov r15d, dword [rbx + 4]
jmp 0x180001c54
test r12d, r12d
jne 0x180001c54
cmp r13d, dword [rbx]
jne 0x180001c54
mov rdx, qword [rbx + 8]
lea rcx, str.winlogon.exe
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x180001c54
mov r12d, dword [rbx + 4]
inc esi
cmp esi, dword [rbp - 0x30]
jb 0x180001be0
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov r8d, r15d
xor edx, edx
mov ecx, 0x400
mov esi, r14d
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r15, qword [rsp + 0x120]
mov rbx, rax
mov r13, qword [rsp + 0x128]
test rax, rax
jne 0x180001cac
mov r8d, r12d
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x180001f27
lea r8, [rbp - 0x48]
mov qword [rbp - 0x48], r14
mov edx, 2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x180001cfb
mov rcx, qword [rbp - 0x48]
lea rax, [rbp - 0x60]
mov qword [rsp + 0x28], rax
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rcx, qword [rbp - 0x48]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x180001f27
mov rcx, qword [rbp - 0x60]
lea rax, [rbp - 0x68]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x180001f27
mov rcx, qword [rbp - 0x68]
call fcn.180001860
test eax, eax
je 0x180001f27
mov rdx, qword [rbp - 0x68]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x180001f27
mov eax, dword [rsp + 0x64]
test eax, eax
jne 0x180001da0
mov rcx, qword [rbp - 0x70]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x180001e68
jmp 0x180001f27
cmp eax, 1
jne 0x180001ddb
mov rcx, qword [rbp - 0x60]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x180001e68
jmp 0x180001f27
cmp eax, 2
jne 0x180001f15
lea rdx, [rbp - 0x10]
call fcn.180001590
test eax, eax
je 0x180001f27
mov r8d, dword [rbp + 0xc]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x180001f27
lea r8, [rbp - 0x38]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x180001f27
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x180001f27
mov rcx, qword [rbp - 0x78]
lea r8, [rbp + 0x90]
mov r9d, 4
lea edx, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x180001f27
cmp byte [rsp + 0x60], dil
je 0x180001ea3
mov rcx, qword [rbp - 0x78]
call fcn.180001860
test eax, eax
je 0x180001f27
mov rdx, qword [rbp - 0x70]
lea rcx, [rbp - 0x40]
mov r8d, 1
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x180001f27
mov rax, qword [rsp + 0x68]
xor r9d, r9d
mov ecx, dword [rbp + 0x98]
xor edx, edx
mov r8, qword [rbp - 0x80]
bts ecx, 0xa
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x40]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov rcx, qword [rbp - 0x78]
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov r14d, eax
jmp 0x180001f2f
mov edi, 0x57
jmp 0x180001f2f
mov ecx, 8
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rbx, qword [rsp + 0x160]
mov rsi, qword [rsp + 0x138]
mov rcx, qword [rbp - 0x40]
mov r12, qword [rsp + 0x130]
test rcx, rcx
je 0x180001f56
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rbp - 0x78]
cmp rcx, 0xffffffffffffffff
je 0x180001f66
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x38]
cmp rcx, 0xffffffffffffffff
je 0x180001f76
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x68]
cmp rcx, 0xffffffffffffffff
je 0x180001f86
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x60]
cmp rcx, 0xffffffffffffffff
je 0x180001f96
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x58]
cmp rcx, 0xffffffffffffffff
je 0x180001fa6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x70]
cmp rcx, 0xffffffffffffffff
je 0x180001fb6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test r14d, r14d
jne 0x180001fcd
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r14d
mov rcx, qword [rbp + 0x18]
xor rcx, rsp
call fcn.180002110
add rsp, 0x140
pop r14
pop rdi
pop rbp
ret
jmp 0x1800019a0