Function at 0x140077b80
Capabilities:
Acquire debug privileges
Create process on windows
Impersonate user

Disassembly:
push rdi
sub rsp, 0x3b0
mov rax, qword [0x140151080]
xor rax, rsp
mov qword [rsp + 0x3a0], rax
mov dword [rsp + 0x50], 0
call fcn.140077ac0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140077bba
xor eax, eax
jmp 0x140077f9c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0xc8]
mov edx, Ordinal_41
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140077be1
xor eax, eax
jmp 0x140077f9c
mov dword [rsp + 0xf0], 1
mov eax, ntohs
imul rax, rax, 0
mov dword [rsp + rax + 0xfc], 2
mov eax, ntohs
imul rax, rax, 0
lea rax, [rsp + rax + 0xf4]
mov r8, rax
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jne 0x140077c43
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140077f9c
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0xf0]
xor edx, edx
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140077c89
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140077f9c
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140077d11
lea rdx, str.____Failed_to_open_process:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14007d880
mov qword [rsp + 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x64], eax
mov edx, dword [rsp + 0x64]
mov rcx, qword [rsp + 0x80]
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 qword [rsp + 0x88], rax
lea rdx, [0x14007dcb0]
mov rcx, qword [rsp + 0x88]
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor eax, eax
jmp 0x140077f9c
mov qword [rsp + 0xc0], 0
lea r8, [rsp + 0xc0]
mov edx, ntohs
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140077d4b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140077f9c
mov qword [rsp + 0xd0], 0
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x140077dac
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140077f9c
mov r8d, 0x104
lea rdx, [rsp + 0x190]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
jne 0x140077dd7
mov eax, 1
jmp 0x140077f9c
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0x100]
call fcn.14007b2a0
nop
lea rdx, str.___AsSystem
lea rcx, [rsp + 0xa0]
call fcn.14007b2a0
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x98], rax
mov rdx, qword [rsp + 0x98]
lea rcx, [rsp + 0x100]
call fcn.14007b240
nop
lea rcx, [rsp + 0xa0]
call fcn.14007b270
mov dword [rsp + 0x120], 0
lea rax, [rsp + 0x128]
mov rdi, rax
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
mov dword [rsp + 0x120], reloc.WS2_32.dll_WSASetLastError
lea rcx, [rsp + 0x100]
call fcn.14007b050
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsdup]
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0xd8]
mov rdi, rax
xor eax, eax
mov ecx, Ordinal_26
rep stosb byte [rdi], al
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x120]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
mov r9, qword [rsp + 0x78]
xor r8d, r8d
mov edx, 1
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x140077f35
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [rsp + 0x6c], 0
lea rcx, [rsp + 0x100]
call fcn.14007b270
mov eax, dword [rsp + 0x6c]
jmp 0x140077f9c
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [rsp + 0x70], 0
lea rcx, [rsp + 0x100]
call fcn.14007b270
mov eax, dword [rsp + 0x70]
mov rcx, qword [rsp + 0x3a0]
xor rcx, rsp
call fcn.1400e6550
add rsp, 0x3b0
pop rdi
ret