Function at 0x140001be0
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x47]
sub rsp, 0xb0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor r15d, r15d
lea rdx, [rbp - 0x21]
mov rbx, rcx
mov dword [rbp - 0x39], r15d
mov rcx, qword [rcx + 0x20]
mov r14d, r15d
mov qword [rbp - 0x31], r15
mov esi, r15d
mov qword [rbp - 0x29], r15
or edi, 0xffffffff
mov dword [rbp - 0x35], r15d
call qword [sym.imp.KERNEL32.dll_GetNamedPipeClientProcessId]
test eax, eax
je 0x140001d97
mov r8d, dword [rbp - 0x21]
xor edx, edx
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x140001d97
lea r8, [rbp - 0x31]
mov rcx, rax
lea edx, [rdi + 0xb]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001d97
mov rcx, qword [rbp - 0x31]
lea r8, [rbp - 0x29]
lea edx, [rdi + 3]
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x140001d97
mov rcx, qword [rbp - 0x31]
lea rax, [rbp - 0x39]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [rdi + 2]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp eax, 1
je 0x140001da3
mov ecx, dword [rbp - 0x39]
call fcn.14001da34
mov rsi, rax
test rax, rax
je 0x140001da3
mov r9d, dword [rbp - 0x39]
lea rax, [rbp - 0x39]
mov rcx, qword [rbp - 0x31]
lea edx, [rdi + 2]
mov r8, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140001da3
mov rcx, qword [rsi]
lea edx, [rdi + 0x17]
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x140001d11
mov dword [rbx + 0x40048], 3
mov edi, r15d
jmp 0x140001da3
mov rcx, qword [rsi]
mov edx, 0x18
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x140001d88
mov rcx, qword [rsi]
lea edx, [rax + 0x17]
call qword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x140001d88
lea r9, [rbp - 0x1d]
mov dword [rbp - 0x1d], 0x44
lea r8, [rbp - 0x19]
xor edx, edx
lea ecx, [rax + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x140001da3
mov rcx, qword [rbp - 0x29]
lea r8, [rbp - 0x35]
lea rdx, [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x140001da3
mov edi, r15d
cmp dword [rbp - 0x35], r15d
je 0x140001d7c
mov dword [rbx + 0x40048], 2
jmp 0x140001da3
mov dword [rbx + 0x40048], 1
jmp 0x140001da3
mov dword [rbx + 0x40048], 4
mov edi, r15d
jmp 0x140001da3
lea rcx, str.cannot_retrieve_client_impersonation_token
call fcn.140007cb0
mov ecx, dword [rbx + 0x40048]
test ecx, ecx
je 0x140001dee
sub ecx, 1
je 0x140001de5
sub ecx, 1
je 0x140001ddc
sub ecx, 1
je 0x140001dd3
cmp ecx, 1
je 0x140001dca
lea rdx, str.unexpected
jmp 0x140001df5
lea rdx, str.service
jmp 0x140001df5
lea rdx, str.system
jmp 0x140001df5
lea rdx, str.administrator
jmp 0x140001df5
lea rdx, str.restricted_user
jmp 0x140001df5
lea rdx, str.unknown
lea rcx, str.client_type:__s
call fcn.140007d10
test rsi, rsi
je 0x140001e0e
mov rcx, rsi
call fcn.14001da20
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140001e1d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x140001e2f
mov rcx, qword [rbp - 0x29]
mov qword [rbx + 0x28], rcx
mov qword [rbx + 0x30], r14
jmp 0x140001e4c
test r14, r14
je 0x140001e3d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x140001e4c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400164b0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret