Function at 0x140015cb0
Capabilities:
Get session user name
Get token membership

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
lea rbp, [rsp - 0x1f8]
sub rsp, 0x2f8
mov rax, qword [0x1400d61c0]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
mov r13, qword [rbp + 0x250]
xor edi, edi
mov ebx, edx
mov dword [rsp + 0x60], edx
mov dword [rsp + 0x64], r9d
mov r14d, r8d
mov rsi, rcx
mov rdx, qword [r13]
mov qword [r13], rdi
test rdx, rdx
je 0x140015d05
call fcn.140011b30
lea rdx, [rsp + 0x58]
mov dword [rsp + 0x58], 0x101
lea rcx, [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
cmp qword [rsi + 0x18], 8
jb 0x140015d28
mov rcx, qword [rsi]
jmp 0x140015d2b
mov rcx, rsi
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov edx, ebx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rax
lea r8d, [r9 + 4]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
cmp eax, 5
jne 0x140015da7
mov edx, ebx
mov rcx, rsi
call fcn.1400159e0
test al, al
je 0x140015dcf
cmp qword [rsi + 0x18], 8
jb 0x140015d77
mov rcx, qword [rsi]
jmp 0x140015d7a
mov rcx, rsi
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov edx, ebx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rax
lea r8d, [r9 + 4]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x140015dcf
mov rcx, qword [rsp + 0x70]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
test eax, eax
je 0x140015dd6
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x140015fd6
mov ebx, edi
cmp dword [rsp + 0x40], ebx
jbe 0x140015e30
nop
mov eax, ebx
lea rdi, [rax + rax*2]
mov rax, qword [rsp + 0x48]
add rdi, rdi
cmp dword [rax + rdi*8 + 4], 3
jne 0x140015e26
cmp dword [rax + rdi*8 + 0x1c], 0
jne 0x140015e26
mov rdx, qword [rax + rdi*8 + 0x28]
lea r8, [rsp + 0x5c]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x140015e26
cmp dword [rsp + 0x5c], 0
je 0x140015e26
mov rcx, qword [rsp + 0x48]
mov eax, r14d
not eax
and dword [rcx + rdi*8], eax
inc ebx
cmp ebx, dword [rsp + 0x40]
jb 0x140015de0
xor edi, edi
mov qword [rsp + 0x348], r12
lea rdx, [rbp - 0x30]
mov r9d, 1
mov qword [rsp + 0x2f0], r15
mov r8d, r14d
mov dword [rsp + 0x20], 3
lea rcx, [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
xor r8d, r8d
lea r9, [rsp + 0x78]
lea rdx, [rbp - 0x68]
lea ecx, [r8 + 1]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x140015fae
mov r8, qword [rsp + 0x78]
lea r9, [rsp + 0x68]
mov rdx, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov rcx, qword [rsp + 0x78]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jne 0x140015fae
mov rdx, qword [rsi + 0x18]
cmp rdx, 8
jb 0x140015eba
mov rcx, qword [rsi]
jmp 0x140015ebd
mov rcx, rsi
mov rax, qword [rsi + 0x10]
lea rbx, [rcx + rax*2]
cmp rdx, 8
jb 0x140015ed0
mov r12, qword [rsi]
jmp 0x140015ed3
mov r12, rsi
sub rbx, r12
mov r14, rdi
mov r15, rbx
sar r15, 1
je 0x140015f15
movabs rax, 0x7fffffffffffffff
cmp r15, rax
ja 0x14001609e
mov rdx, r15
lea rcx, [rbp - 0x80]
call fcn.1400057c0
mov r8, rbx
mov rdx, r12
mov rcx, rax
mov r14, rax
lea rdi, [rax + r15*2]
call fcn.140082000
mov rcx, qword [rsp + 0x68]
xor r12d, r12d
mov r15d, dword [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov edx, r15d
mov qword [rsp + 0x28], rcx
mov rcx, r14
lea r8d, [r12 + 4]
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov ebx, eax
cmp eax, 5
jne 0x140015f85
mov edx, r15d
mov rcx, rsi
call fcn.1400159e0
test al, al
je 0x140015f85
mov rax, qword [rsp + 0x68]
lea r8d, [r12 + 4]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov edx, r15d
mov rcx, r14
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov ebx, eax
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x140015ff5
test r14, r14
je 0x140015fae
sub rdi, r14
lea rcx, [rbp - 0x80]
sar rdi, 1
mov rdx, r14
mov r8, rdi
call fcn.140004d70
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
mov r12, qword [rsp + 0x348]
mov r15, qword [rsp + 0x2f0]
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.1400812a0
add rsp, 0x2f8
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [rsp + 0x64], r12d
je 0x140016014
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14001607d
mov ecx, 0x38
call fcn.140080c00
mov qword [rax + 0x18], 7
mov qword [rax + 0x10], r12
mov word [rax], r12w
mov qword [rax + 0x28], r12
mov qword [rax + 0x30], r12
mov rdx, qword [r13]
mov qword [r13], rax
test rdx, rdx
je 0x140016048
call fcn.140011b30
mov rcx, qword [r13]
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rsi
call fcn.140003170
mov rcx, qword [r13]
mov rax, qword [rsp + 0x70]
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x50]
mov rcx, qword [r13]
mov qword [rcx + 0x30], rax
mov rax, qword [r13]
mov dword [rax + 0x20], r15d
test r14, r14
je 0x140016097
sub rdi, r14
lea rcx, [rbp - 0x80]
sar rdi, 1
mov rdx, r14
mov r8, rdi
call fcn.140004d70
mov al, 1
jmp 0x140015fc6
call fcn.140003d30
int3