Function at 0x140003510
Capabilities:
Acquire debug privileges

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp + 0x27], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14000a008]
xor rax, rsp
mov qword [rbp + 0x4f], rax
mov rsi, rcx
mov rax, qword [rcx]
mov r8d, dword [rax]
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsi + 0x18], rax
test rax, rax
jne 0x140003843
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x1400035b2
call fcn.140002e10
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x37], eax
mov qword [rbp + 0x3f], rbx
movaps xmm0, xmmword [rbp + 0x37]
movdqa xmmword [rbp + 0x37], xmm0
lea r8, str.remote_process:open:OpenProcess
lea rdx, [rbp + 0x37]
lea rcx, [rbp - 1]
call fcn.140003320
lea rdx, [0x140008548]
lea rcx, [rbp - 1]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsi + 0x10]
mov edx, 0x20
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140003671
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x14000362e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140003628
call fcn.140002e10
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x37], eax
mov qword [rbp + 0x3f], rbx
movaps xmm0, xmmword [rbp + 0x37]
movdqa xmmword [rbp + 0x37], xmm0
lea r8, str.remote_process:closeProcessToken
lea rdx, [rbp + 0x37]
lea rcx, [rbp - 1]
call fcn.140003320
lea rdx, [0x140008548]
lea rcx, [rbp - 1]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
xor ebx, ebx
mov qword [rsi + 0x10], rbx
call fcn.140002e10
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x37], eax
mov qword [rbp + 0x3f], rbx
movaps xmm0, xmmword [rbp + 0x37]
movdqa xmmword [rbp + 0x37], xmm0
lea r8, str.remote_process:open:OpenProcessToken
lea rdx, [rbp + 0x37]
lea rcx, [rbp - 1]
call fcn.140003320
lea rdx, [0x140008548]
lea rcx, [rbp - 1]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea r8, [rbp + 0x47]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
xor ebx, ebx
test eax, eax
je 0x1400037c0
mov dword [rbp + 0x37], 1
mov rax, qword [rbp + 0x47]
mov qword [rbp + 0x3b], rax
mov dword [rbp + 0x43], 2
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9d, [rbx + 0x10]
lea r8, [rbp + 0x37]
xor edx, edx
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400037c0
mov rax, qword [rsi]
mov r8d, dword [rax]
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsi + 0x18], rax
test rax, rax
jne 0x140003843
lea r8, [rbp + 0x47]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x14000373d
mov dword [rbp + 0x37], 1
mov rax, qword [rbp + 0x47]
mov qword [rbp + 0x3b], rax
mov dword [rbp + 0x43], ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9d, [rbx + 0x10]
lea r8, [rbp + 0x37]
xor edx, edx
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
call fcn.140003870
mov qword [rbp + 0x17], 0xf
mov qword [rbp + 0xf], rbx
mov byte [rbp - 1], bl
mov r8d, 5
lea rdx, str.EPERM
lea rcx, [rbp - 1]
call fcn.140001fb0
nop
lea rax, [rbp - 1]
cmp qword [rbp + 0x17], 0x10
cmovae rax, qword [rbp - 1]
lea rcx, vtable.std::exception.0
mov qword [rbp - 0x19], rcx
xor ecx, ecx
mov qword [rbp - 0x11], rcx
mov qword [rbp - 9], rcx
mov qword [rbp + 0x37], rax
mov byte [rbp + 0x3f], 1
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 0x37]
call qword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x19], rax
lea rdx, [0x140008528]
lea rcx, [rbp - 0x19]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, rsi
call fcn.140003870
mov qword [rbp + 0x17], 0xf
mov qword [rbp + 0xf], rbx
mov byte [rbp - 1], bl
mov r8d, 5
lea rdx, str.EPERM
lea rcx, [rbp - 1]
call fcn.140001fb0
nop
lea rax, [rbp - 1]
cmp qword [rbp + 0x17], 0x10
cmovae rax, qword [rbp - 1]
lea rcx, vtable.std::exception.0
mov qword [rbp - 0x19], rcx
xor ecx, ecx
mov qword [rbp - 0x11], rcx
mov qword [rbp - 9], rcx
mov qword [rbp + 0x37], rax
mov byte [rbp + 0x3f], 1
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 0x37]
call qword [sym.imp.VCRUNTIME140.dll___std_exception_copy]
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x19], rax
lea rdx, [0x140008528]
lea rcx, [rbp - 0x19]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.140003dc0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret