Function at 0x140168650
Capabilities:
Acquire debug privileges

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x60
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14016875d
call fcn.140049470
lea rbx, [0x140c47f60]
xor edx, edx
mov rcx, rbx
mov r8d, 0x80
mov rsi, rax
call sub.ntdll.dll_memset
lea rcx, [0x140364cc8]
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
je 0x140168743
xor eax, eax
lea rdx, [0x140364f64]
lea rcx, [rsp + 0x48]
mov r8d, Ordinal_1590
mov byte [rsp + 0x48], 0
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbx
sub rcx, rdx
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140168700
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x48]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140168730
mov rdi, rbx
mov rax, qword [rsi]
lea rdx, str._s:_OpenProcessToken_Failed.
mov r8, rdi
mov rcx, rsi
call qword [rax + 0x10]
xor eax, eax
jmp 0x140168994
lea r8, [rsp + 0x34]
lea rdx, [0x140364d08]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
xor edi, edi
lea r8, [rsp + 0x30]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x3c], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140168892
mov qword [rsp + 0x70], rbp
call fcn.140049470
lea rbx, [0x140c47f60]
mov rcx, rbx
xor edx, edx
mov r8d, 0x80
mov rsi, rax
call sub.ntdll.dll_memset
lea edx, [rdi + 0x5c]
lea rcx, [0x140364d30]
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rbp, rax
je 0x140168873
xor eax, eax
lea rdx, [0x140364f64]
lea rcx, [rsp + 0x48]
mov r8d, Ordinal_1601
mov byte [rsp + 0x48], dil
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rbp + 1]
mov rcx, rbx
sub rcx, rdx
nop
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140168830
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x48]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140168860
mov rdi, rbx
mov rax, qword [rsi]
lea rdx, [0x140364d50]
mov r8, rdi
mov rcx, rsi
call qword [rax + 0x10]
mov rbp, qword [rsp + 0x70]
xor eax, eax
jmp 0x140168994
lea r8, [rsp + 0x34]
lea rdx, [0x140364d78]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x30]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x3c], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140168912
call fcn.140049470
lea rcx, [0x140364da0]
mov edx, reloc.MFC80U.DLL_Ordinal_1610
mov rbx, qword [rax]
mov rdi, rax
call fcn.140168550
lea rdx, [0x140364dc0]
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140168994
lea r8, [rsp + 0x34]
lea rdx, [0x140364de8]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x30]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x3c], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x14016898f
call fcn.140049470
lea rcx, [0x140364e10]
mov edx, 0x657
mov rbx, qword [rax]
mov rdi, rax
call fcn.140168550
lea rdx, str._s:_AdjustTokenPrivileges_Failed.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140168994
mov eax, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140161080
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret