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

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x20], r9
mov qword [r11 + 0x18], r8
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xf0
mov eax, dword [rsp + 0x170]
xor edi, edi
mov r15, rcx
mov r14, rdx
and eax, 2
lea rcx, [r11 - 0x57]
lea r8d, [rdi + 0x27]
xor edx, edx
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x70], eax
mov byte [r11 - 0x58], dil
call fcn.1400cc8d0
lea rax, [rsp + 0xc0]
lea rcx, [rsp + 0x98]
mov dword [rsp + 0x90], 0x18
mov qword [rsp + 0x98], rax
mov dword [rsp + 0xa0], edi
call fcn.140051bbc
mov qword [rsp + 0x60], rdi
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov r12, qword [rsp + 0x150]
mov ebp, dword [rsp + 0x148]
mov ecx, eax
mov dword [rsp + 0x80], eax
cmp eax, 0xffffffff
je 0x140006c9c
lea esi, [rdi + 1]
mov qword [rsp + 0x88], rdi
test byte [rsp + 0x170], sil
je 0x140006a91
mov rax, qword [0x140106918]
cmp rax, rdi
je 0x140006c9c
lea rdx, [rsp + 0x60]
call rax
cmp eax, edi
je 0x140006c9c
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x170]
lea r9d, [rdi + 8]
lea r8, [rsp + 0x88]
lea edx, [rdi + 0x13]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x170], edi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rbx, qword [rsp + 0x68]
cmp eax, edi
cmovne rbx, qword [rsp + 0x88]
mov qword [rsp + 0x68], rbx
cmp rbx, rdi
jne 0x140006b76
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x68]
lea r8, [rsp + 0x90]
mov qword [rsp + 0x28], rax
mov r9d, esi
mov edx, 0xf01ff
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
jmp 0x140006b69
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
mov edx, 0x201eb
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp eax, edi
je 0x140006c9c
lea r8, [rsp + 0xa8]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
cmp eax, edi
je 0x140006c9c
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x60]
mov r9d, esi
mov qword [rsp + 0xb4], rax
lea rax, [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov edx, 0x2000000
mov dword [rsp + 0xb0], esi
mov dword [rsp + 0x20], esi
mov dword [rsp + 0xbc], 2
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp eax, edi
je 0x140006c9c
mov rcx, qword [rsp + 0x68]
mov r9d, 4
lea r8, [rsp + 0x80]
lea edx, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
cmp eax, edi
je 0x140006c9c
mov rcx, qword [rsp + 0x68]
lea r8, [rsp + 0xb0]
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
cmp eax, edi
je 0x140006c9c
mov rbx, qword [rsp + 0x68]
mov rsi, rbx
cmp rbx, rdi
je 0x140006c9c
mov edi, ebp
or edi, 0x10
cmp dword [rsp + 0x70], 0
je 0x140006bb4
mov rcx, rbx
call fcn.140005920
mov rbx, rax
test rax, rax
je 0x140006c9c
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], rbx
jmp 0x140006bc3
cmp qword [rsp + 0x178], 0
jne 0x140006c9c
and qword [rsp + 0x78], 0
mov rcx, r12
test r12, r12
jne 0x140006c05
mov rax, qword [0x140106928]
test rax, rax
je 0x140006c05
lea rcx, [rsp + 0x78]
xor r8d, r8d
mov rdx, rsi
call rax
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140006bf8
bts edi, 0xa
test eax, eax
je 0x140006c9c
mov rbx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x160]
mov rsi, qword [rsp + 0x168]
lea r9, [rsp + 0x90]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x158]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], edi
mov edi, dword [rsp + 0x140]
lea rax, [rsp + 0x90]
mov r8, r14
mov rdx, r15
mov rcx, rbx
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov rcx, qword [rsp + 0x78]
mov ebx, eax
test rcx, rcx
je 0x140006c7c
call qword [0x140106930]
and qword [rsp + 0x78], 0
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140006c8c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [rsp + 0x60], rcx
test ebx, ebx
je 0x140006cb0
jmp 0x140006df1
mov rcx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x168]
mov edi, dword [rsp + 0x140]
test rcx, rcx
je 0x140006cbb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rsp + 0x60], 0
cmp dword [rsp + 0x70], 0
je 0x140006d29
xor ecx, ecx
call fcn.140005920
mov rcx, qword [rsp + 0x160]
mov r9, qword [rsp + 0x138]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rcx
mov rcx, qword [rsp + 0x158]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], ebp
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], r9
mov r9, qword [rsp + 0x130]
mov r8, r14
mov rdx, r15
mov rcx, rax
mov qword [rsp + 0x60], rax
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x140006dc9
cmp qword [rsp + 0x178], 0
mov rax, qword [rsp + 0x160]
je 0x140006d89
mov r8, qword [rsp + 0x188]
mov rdx, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x158]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], ebp
mov r9d, ebp
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
jmp 0x140006dc9
mov r9, qword [rsp + 0x138]
mov r8, qword [rsp + 0x130]
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x158]
mov rdx, r14
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov rcx, r15
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
test rcx, rcx
je 0x140006ddb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
and qword [rsp + 0x60], 0
test rcx, rcx
je 0x140006df1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0xf0]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret