Function at 0x180001310
Capabilities:
Acquire debug privileges
Create process on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x180017070]
xor rax, rsp
mov qword [rbp + 0x30], rax
xor r13d, r13d
mov r12, rcx
mov ebx, r13d
mov qword [rsp + 0x60], r13
call fcn.180001110
lea rdx, [rsp + 0x60]
mov ecx, eax
mov edi, eax
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x1800013a9
mov ecx, edi
call fcn.1800011a0
test eax, eax
je 0x1800013a2
mov r8d, eax
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x1800013a2
lea r8, [rsp + 0x60]
mov edx, 0xf00ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1800013a9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180001572
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1800013a2
mov r9d, 8
lea rax, [rsp + 0x78]
lea r8, [rbp - 0x60]
lea edx, [r9 + 0xb]
mov qword [rsp + 0x168], rsi
mov qword [rsp + 0x68], r13
mov dword [rsp + 0x78], r13d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov esi, 0x2000000
test eax, eax
jne 0x180001469
lea r8, [rbp - 0x68]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x18000143a
mov rax, qword [rbp - 0x68]
mov rcx, qword [rsp + 0x60]
lea r8, [rbp + 0x20]
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x28], r13
mov qword [rbp + 0x24], rax
mov dword [rbp + 0x20], 1
mov dword [rbp + 0x2c], 2
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x68]
mov r9d, 1
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, esi
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rdx, qword [rsp + 0x68]
jmp 0x180001472
mov rdx, qword [rbp - 0x60]
mov qword [rsp + 0x68], rdx
lea rcx, [rsp + 0x70]
mov r8d, 1
mov qword [rsp + 0x70], r13
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x180001498
mov rdi, qword [rsp + 0x70]
mov esi, 0x2000400
jmp 0x1800014a0
mov rdi, r13
mov qword [rsp + 0x70], r13
xor edx, edx
lea rcx, [rbp - 0x50]
lea r8d, [rdx + 0x68]
call fcn.1800059d0
mov rcx, qword [rsp + 0x68]
xor eax, eax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
lea rax, [rbp - 0x80]
xor r9d, r9d
mov r8, r12
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x50]
xor edx, edx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], r13d
mov dword [rbp - 0x50], 0x68
mov qword [rsp + 0x20], r13
mov dword [rbp - 0x14], 1
mov word [rbp - 0x10], r13w
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov rsi, qword [rsp + 0x168]
cmp qword [rbp - 0x80], r13
je 0x18000152f
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x18000153f
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18000154f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x18000155f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x18000156d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.180003290
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret