Function at 0x140018d44
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r12
push r13
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xb0
mov rax, qword [0x1400f2008]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r14d, r14d
mov rbx, rdx
test rdx, rdx
je 0x140018f53
mov byte [rdx], r14b
xor edx, edx
mov r8d, dword [rcx + 0x220]
mov ecx, 0x1fffff
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_OpenProcess]
mov rsi, rax
test rax, rax
jne 0x140018dbe
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, 0x80004005
test ebx, ebx
cmovns ebx, eax
mov eax, ebx
jmp 0x140018f58
lea r12, [0x1400baf28]
mov qword [rbp - 9], r14
lea r8, [rbp - 9]
mov qword [rbp - 0x11], r12
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_OpenProcessToken]
test eax, eax
jne 0x140018e06
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, 0x80004005
test ebx, ebx
cmovns ebx, eax
jmp 0x140018f25
mov rcx, qword [rbp - 9]
lea r13, [0x1400baf28]
or qword [rbp + 7], 0xffffffffffffffff
lea r8, [rbp + 7]
mov edx, 2
mov qword [rbp - 1], r13
call qword [sym.imp.api_ms_win_security_base_l1_2_0.dll_DuplicateToken]
test eax, eax
je 0x140018e7e
lea rax, [rbp + 0xf]
mov dword [rbp + 0x27], r14d
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x27]
mov dword [rsp + 0x48], r14d
mov r9d, 0x220
mov dword [rsp + 0x40], r14d
mov r8d, 0x20
mov dword [rsp + 0x38], r14d
mov dl, 2
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
mov word [rbp + 0x2b], 0x500
mov qword [rbp + 0xf], r14
call qword [sym.imp.api_ms_win_security_base_l1_2_0.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x140018e9e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, 0x80004005
test ebx, ebx
cmovns ebx, eax
jmp 0x140018f08
mov r9, qword [rbp + 0xf]
lea rdx, [rbp - 0x19]
lea rcx, [rbp + 0x17]
mov qword [rbp - 0x19], r9
call fcn.140014680
mov rcx, qword [rbp + 7]
lea r8, [rbp - 0x19]
mov rdx, r9
mov dword [rbp - 0x19], r14d
call qword [sym.imp.api_ms_win_security_base_l1_2_0.dll_CheckTokenMembership]
test eax, eax
jne 0x140018eec
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, 0x80004005
test ebx, ebx
cmovns ebx, eax
jmp 0x140018ef8
cmp dword [rbp - 0x19], r14d
setne al
mov byte [rbx], al
mov ebx, r14d
cmp byte [rbp + 0x1f], r14b
je 0x140018f08
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.api_ms_win_security_base_l1_2_0.dll_FreeSid]
mov rcx, qword [rbp + 7]
mov qword [rbp - 1], r13
cmp rcx, 0xffffffffffffffff
je 0x140018f25
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
je 0x140018f7c
or qword [rbp + 7], 0xffffffffffffffff
mov rcx, qword [rbp - 9]
mov qword [rbp - 0x11], r12
test rcx, rcx
je 0x140018f40
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
je 0x140018f96
mov qword [rbp - 9], r14
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x140018db7
jmp 0x140018fb0
mov eax, 0x80004003
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400aa790
mov rbx, qword [rsp + 0xf0]
add rsp, 0xb0
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000cb04
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000cb04
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000cb04
int3