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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x110]
sub rsp, 0x210
mov rax, qword [0x14008e180]
xor rax, rsp
mov qword [rbp + 0x100], rax
mov rdi, rdx
mov ebx, ecx
mov qword [rbp + 0x68], rdx
xor esi, esi
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rsi
mov r8d, reloc.WS2_32.dll_recv
lea rdx, str.SeDebugPrivilege
lea rcx, [rsp + 0x50]
call fcn.140004e70
lea rcx, [rsp + 0x50]
call fcn.140004790
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rsi
mov r8d, reloc.WS2_32.dll_shutdown
lea rdx, str.SeImpersonatePrivilege
lea rcx, [rsp + 0x50]
call fcn.140004e70
lea rcx, [rsp + 0x50]
call fcn.140004790
call fcn.140004bf0
mov r8d, ebx
xor edx, edx
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x1400054b5
lea r8, [rbp + 0x40]
mov edx, 2
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, rbx
test eax, eax
je 0x1400054fb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbp + 0x50], 0x18
mov qword [rbp + 0x58], rsi
mov dword [rbp + 0x60], esi
lea rax, [rbp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 2
mov r9d, 2
lea r8, [rbp + 0x50]
mov edx, 0xf01ff
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rcx, qword [rbp + 0x40]
test eax, eax
je 0x140005547
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x70], xmm0
mov qword [rbp + 0x80], rax
lea rcx, [rbp - 0x40]
call fcn.140014600
nop
mov r8, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x14000531b
mov r8, qword [rdi]
mov r9, qword [rdi + 0x10]
add r9, r8
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.1400158d0
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 7
cmova r9, qword [rsp + 0x50]
lea rax, [rbp + 0x70]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x90]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 0x400
xor r8d, r8d
mov edx, 1
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov ebx, eax
mov rdx, qword [rsp + 0x68]
cmp rdx, 7
jbe 0x1400053c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400053bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400053bb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140066284
movdqa xmm0, xmmword [0x140078d20]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], si
lea rcx, [rbp - 0x40]
call fcn.140014510
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140005458
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x140005420
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x14000541b
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140005451
mov rcx, r8
call fcn.140066284
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rdi], 0
mov rcx, qword [rbp + 0x100]
xor rcx, rsp
call fcn.140066220
mov rbx, qword [rsp + 0x240]
add rsp, 0x210
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, rdi
call fcn.140014ec0
mov rdx, rax
lea rcx, str.error_with_CreateProcessWithTokenW__args:__s__r_n
call fcn.1400012c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x68]
call fcn.140001540
nop
mov r8, rax
lea rdx, str.CreateProcessWithTokenW_failed:
lea rcx, [rsp + 0x78]
call fcn.140016710
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140001660
lea rdx, [0x14008a698]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x78]
call fcn.140001540
nop
mov r8, rax
lea rdx, str.OpenProcess_failed__TrustedInstaller.exe_:
lea rcx, [rbp - 0x68]
call fcn.140016710
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140001660
lea rdx, [0x14008a698]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x68]
call fcn.140001540
nop
mov r8, rax
lea rdx, str.OpenProcessToken_failed__TrustedInstaller.exe_:
lea rcx, [rsp + 0x78]
call fcn.140016710
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140001660
lea rdx, [0x14008a698]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x68]
call fcn.140001540
nop
mov r8, rax
lea rdx, str.DuplicateTokenEx_failed__TrustedInstaller.exe_:
lea rcx, [rsp + 0x78]
call fcn.140016710
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140001660
lea rdx, [0x14008a698]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3