Function at 0x140024c88
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x140129ab8]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r15d, r15d
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x140024f3a
mov byte [rdx], r15b
xor edx, edx
mov r8d, dword [rcx + 0x220]
mov ecx, 0x1fffff
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_OpenProcess]
nop dword [rax + rax]
mov r14, rax
test rax, rax
jne 0x140024d17
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
mov eax, edi
jmp 0x140024f3f
lea r9, [rbp - 5]
mov dword [rbp - 5], 0x104
lea r8, [rbx + 0x224]
xor edx, edx
mov rcx, r14
call qword [sym.imp.api_ms_win_core_psapi_l1_1_0.dll_QueryFullProcessImageNameW]
nop dword [rax + rax]
or r12, 0xffffffffffffffff
test eax, eax
jne 0x140024d74
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
lea r9, str.QueryFullProcessImageName___failed__error___u_n
mov r8, r12
lea rcx, [rbx + 0x224]
mov dword [rsp + 0x20], eax
mov edx, 0x104
call qword [sym.imp.msvcrt.dll__snwprintf_s]
nop dword [rax + rax]
lea rbx, [0x1400d3bf8]
mov qword [rbp + 0x17], r15
lea r8, [rbp + 0x17]
mov qword [rbp + 0xf], rbx
mov edx, 0xf01ff
mov rcx, r14
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenProcessToken]
nop dword [rax + rax]
test eax, eax
jne 0x140024dc8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
jmp 0x140024f01
mov rcx, qword [rbp + 0x17]
lea r13, [0x1400d3bf8]
lea r8, [rbp + 7]
mov qword [rbp - 1], r13
mov edx, 2
mov qword [rbp + 7], r12
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_DuplicateToken]
nop dword [rax + rax]
test eax, eax
je 0x140024e4b
lea rax, [rbp + 0x1f]
mov dword [rbp + 0x27], r15d
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x27]
mov dword [rsp + 0x48], r15d
mov r9d, 0x220
mov dword [rsp + 0x40], r15d
mov r8d, 0x20
mov dword [rsp + 0x38], r15d
mov dl, 2
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
mov word [rbp + 0x2b], 0x500
mov qword [rbp + 0x1f], r15
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AllocateAndInitializeSid]
nop dword [rax + rax]
test eax, eax
jne 0x140024e71
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
jmp 0x140024edc
mov rbx, qword [rbp + 0x1f]
lea r8, [rbp - 9]
mov rcx, qword [rbp + 7]
mov rdx, rbx
mov dword [rbp - 9], r15d
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_CheckTokenMembership]
nop dword [rax + rax]
test eax, eax
jne 0x140024eba
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
jmp 0x140024ec6
cmp dword [rbp - 9], r15d
setne al
mov byte [rdi], al
mov edi, r15d
mov rcx, rbx
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_FreeSid]
nop dword [rax + rax]
lea rbx, [0x1400d3bf8]
mov rcx, qword [rbp + 7]
mov qword [rbp - 1], r13
cmp rcx, r12
je 0x140024f01
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
test eax, eax
je 0x140024fa9
mov qword [rbp + 7], r12
mov rcx, qword [rbp + 0x17]
mov qword [rbp + 0xf], rbx
test rcx, rcx
je 0x140024f22
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
test eax, eax
je 0x140024f69
mov qword [rbp + 0x17], r15
mov rcx, r14
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
test eax, eax
je 0x140024f89
jmp 0x140024d10
mov eax, 0x80004003
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400c9030
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000dee8
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000dee8
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000dee8
int3