Function at 0x14011c720
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x90
mov rax, qword [0x140672360]
xor rax, rsp
mov qword [rbp + 0x4f], rax
movzx ebx, dl
xor esi, esi
lea rdx, [rbp + 0x27]
mov qword [rbp + 0x27], rsi
mov edi, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x14011c7b4
mov rax, qword [str.0cg_]
lea rbx, str.0cg_
cmp rax, rbx
je 0x14011c7ad
test byte [rax + 0x1c], 1
je 0x14011c7ad
cmp byte [rax + 0x19], 2
jb 0x14011c7ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.0cg_]
lea edx, [rsi + 0x26]
lea r9, [0x1405f9f58]
mov dword [rsp + 0x20], eax
lea r8, [0x1405fa6c0]
mov rcx, qword [rcx + 0x10]
call fcn.140079f00
xor eax, eax
jmp 0x14011c93e
test bl, bl
je 0x14011c93a
call fcn.1401d6080
lea rbx, str.0cg_
test al, al
je 0x14011c85b
mov rcx, qword [rbp + 0x27]
lea rax, [rbp + 0x4b]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x37]
lea edx, [r9 + 0xb]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x14011c849
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x520
je 0x14011c85b
mov rax, qword [str.0cg_]
cmp rax, rbx
je 0x14011c85b
test byte [rax + 0x1c], 1
je 0x14011c85b
cmp byte [rax + 0x19], 2
jb 0x14011c85b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.0cg_]
lea r9, [0x1405f9fc8]
mov edx, 0x27
mov dword [rsp + 0x20], eax
lea r8, [0x1405fa6c0]
mov rcx, qword [rcx + 0x10]
call fcn.140079f00
jmp 0x14011c85b
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x37]
mov qword [rbp + 0x27], rax
mov rcx, qword [rbp + 0x27]
mov dword [rbp + 0x3f], esi
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x14011c8b1
mov rax, qword [str.0cg_]
cmp rax, rbx
je 0x14011c8b1
test byte [rax + 0x1c], 1
je 0x14011c8b1
cmp byte [rax + 0x19], 2
jb 0x14011c8b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.0cg_]
lea r9, [0x1405f9f98]
mov edx, 0x28
mov dword [rsp + 0x20], eax
lea r8, [0x1405fa6c0]
mov rcx, qword [rcx + 0x10]
call fcn.140079f00
lea rax, [rbp + 0x2f]
mov dword [rbp + 0x43], esi
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x43]
mov dword [rsp + 0x48], esi
mov r9d, 0x220
mov dword [rsp + 0x40], esi
mov r8d, 0x20
mov dword [rsp + 0x38], esi
mov dl, 2
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
mov word [rbp + 0x47], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x14011c91c
mov rdx, qword [rbp + 0x2f]
lea r8, [rbp + 0x3f]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov edx, dword [rbp + 0x3f]
test eax, eax
mov rcx, qword [rbp + 0x2f]
cmove edx, esi
mov dword [rbp + 0x3f], edx
call qword [sym.imp.ADVAPI32.dll_FreeSid]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
cmp dword [rbp + 0x3f], esi
jne 0x14011c93a
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
call fcn.14011c970
jmp 0x14011c93e
mov rax, qword [rbp + 0x27]
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.140359070
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret