Function at 0x1400167b0
Capabilities:
Compare security identifiers
Get thread local storage value
Get user security identifier
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x13c0]
mov eax, 0x14c0
call fcn.14004c450
sub rsp, rax
mov rax, qword [0x1400a3758]
xor rax, rsp
mov qword [rbp + 0x13b0], rax
mov r15, rcx
mov ecx, 2
call fcn.140059d40
mov qword [rsp + 0x50], rax
xor r12d, r12d
mov word [rax], r12w
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x78]
lea edx, [r12 + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140016cc9
mov dword [rsp + 0x68], 0x1000
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x1000
lea r8, [rbp + 0x3b0]
lea edx, [r12 + 1]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rsp + 0x78]
test eax, eax
jne 0x140016865
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140016cc9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x40], r12d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
xor r8d, r8d
lea rdx, str.System
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ecx, dword [rsp + 0x40]
call fcn.140059d40
mov r14, rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
mov r8, r14
lea rdx, str.System
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ecx, 0x620
call fcn.140059d40
mov rdi, rax
mov qword [rbp - 0x80], rax
mov rdx, qword [rsp + 0x50]
lea r8, [rax + 8]
nop
movzx ecx, word [rdx]
mov word [r8], cx
lea rdx, [rdx + 2]
lea r8, [r8 + 2]
test cx, cx
jne 0x140016900
movups xmm0, xmmword [str..Default]
movups xmmword [rax + 8], xmm0
movzx eax, word [0x140088438]
mov word [rdi + 0x18], ax
mov rax, qword [0x1400a6598]
sub rax, qword [0x1400a6590]
sar rax, 3
mov dword [rdi + 4], eax
lea rsi, [rdi + 0x210]
lea r9, str.SYSTEM
lea r8, str.NT_AUTHORITY
lea rdx, str._s_s
mov rcx, rsi
call fcn.140005340
test r15, r15
je 0x14001699e
mov ebx, dword [rdi + 4]
mov rcx, r15
call qword [sym.imp.USER32.dll_GetMenu]
mov rcx, rax
mov edx, 3
call qword [sym.imp.USER32.dll_GetSubMenu]
mov qword [rsp + 0x20], rsi
mov r9d, ebx
mov edx, 0xffffffff
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.USER32.dll_InsertMenuW]
mov rdx, qword [rbp + 0x3b0]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x1400169be
mov byte [rdi], 1
mov qword [0x1400a5b88], rdi
jmp 0x1400169c1
mov byte [rdi], 0
lea rcx, [rdi + 0x418]
lea r9, str.Config
lea r8, [0x1400a5c20]
lea rdx, str._s_s
call fcn.140005340
mov rdx, qword [0x1400a6598]
cmp rdx, qword [0x1400a65a0]
je 0x1400169ff
mov qword [rdx], rdi
add qword [0x1400a6598], 8
jmp 0x140016a0f
lea r8, [rbp - 0x80]
lea rcx, [0x1400a6590]
call fcn.140013570
mov ecx, dword [0x1400a555c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rcx
mov r9d, eax
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList
mov rcx, qword [0x1400a36f8]
call fcn.14001d250
test eax, eax
jne 0x140016cb9
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.14002d2c0
test eax, eax
jne 0x140016cae
mov ecx, dword [0x1400a555c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
lea rcx, [rbp - 0x78]
mov qword [rsp + 0x20], rcx
mov r9d, eax
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x60]
call fcn.14001d250
test eax, eax
jne 0x140016c91
mov dword [rsp + 0x48], 4
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Flags
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016c87
test byte [rsp + 0x6c], 8
jne 0x140016c87
mov rcx, qword [rsp + 0x50]
call fcn.140017a40
mov rsi, rax
test rax, rax
je 0x140016c87
mov dword [rsp + 0x70], 0x104
mov dword [rsp + 0x44], 0x104
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
lea r8, [rbp + 0x1a0]
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
je 0x140016c7e
mov ecx, 0x620
call fcn.140059d40
mov rdi, rax
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x48], 0x208
add rax, 0x418
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.ProfileImagePath
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016c76
mov rcx, qword [rsp + 0x50]
lea rdx, [rdi + 8]
nop dword [rax]
movzx eax, word [rcx]
mov word [rdx], ax
lea rcx, [rcx + 2]
lea rdx, [rdx + 2]
test ax, ax
jne 0x140016ba0
mov rax, qword [0x1400a6598]
sub rax, qword [0x1400a6590]
sar rax, 3
mov dword [rdi + 4], eax
lea r14, [rdi + 0x210]
lea r9, [rbp + 0x1a0]
lea r8, [rbp - 0x70]
lea rdx, str._s_s
mov rcx, r14
call fcn.140005340
test r15, r15
je 0x140016c24
mov ebx, dword [rdi + 4]
mov rcx, r15
call qword [sym.imp.USER32.dll_GetMenu]
mov rcx, rax
mov edx, 3
call qword [sym.imp.USER32.dll_GetSubMenu]
mov qword [rsp + 0x20], r14
mov r9d, ebx
mov edx, 0xffffffff
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.USER32.dll_InsertMenuW]
mov rdx, qword [rbp + 0x3b0]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140016c44
mov byte [rdi], 1
mov qword [0x1400a5b88], rdi
jmp 0x140016c47
mov byte [rdi], 0
mov rdx, qword [0x1400a6598]
cmp rdx, qword [0x1400a65a0]
je 0x140016c64
mov qword [rdx], rdi
add qword [0x1400a6598], 8
jmp 0x140016c7e
lea r8, [rbp - 0x80]
lea rcx, [0x1400a6590]
call fcn.140013570
jmp 0x140016c7e
mov rcx, rdi
call fcn.140059d2c
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc r12d
lea r8, [rsp + 0x50]
mov edx, r12d
mov rcx, qword [rsp + 0x60]
call fcn.14002d2c0
test eax, eax
je 0x140016a64
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.SeRestorePrivilege
call fcn.140017320
test eax, eax
jne 0x140016cf2
test r15, r15
je 0x140016ceb
mov rcx, r15
call qword [sym.imp.USER32.dll_GetMenu]
mov r8d, 0x400
mov edx, 3
mov rcx, rax
call qword [sym.imp.USER32.dll_DeleteMenu]
mov byte [0x1400a4680], 1
mov rcx, qword [rsp + 0x50]
call fcn.140059d2c
mov rcx, qword [rbp + 0x13b0]
xor rcx, rsp
call fcn.14004bd30
lea r11, [rsp + 0x14c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret