Function at 0x7ff74b3a5e0
Capabilities:
Compare security identifiers
Encode data using xor

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r13d, r13d
mov r12, rdx
lea rax, [r11 + 0x20]
mov rcx, qword [r12]
mov rsi, r8
mov qword [r8], r13
lea edx, [r13 + 1]
xor r9d, r9d
xor r8d, r8d
mov edi, r13d
mov dword [rsp + 0x3c], r13d
mov dword [r11 + 0x20], r13d
mov dword [r11 - 0x68], r13d
mov dword [r11 - 0x64], r13d
mov qword [r11 - 0x50], r13
mov rbx, r13
mov qword [r11 - 0x78], rax
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
cmp dword [rsp + 0xb8], r13d
jne 0x7ff74b3a696
mov edi, 0x8000ffff
cmp dword [0x7ff74b582c8], r13d
je 0x7ff74b3acc3
mov rcx, qword [0x7ff74b58350]
lea rax, [0x7ff74b58350]
cmp rcx, rax
je 0x7ff74b3acc3
test byte [rcx + 0x1c], 1
je 0x7ff74b3acc3
mov rcx, qword [rcx + 0x10]
lea edx, [r13 + 0xa]
lea r8, [0x7ff74b51770]
mov r9d, edi
call fcn.7ff74b25ec4
jmp 0x7ff74b3acc3
mov rcx, qword [r12]
xor r9d, r9d
lea rax, [rsp + 0x30]
lea edx, [r9 + 2]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
mov rcx, qword [r12]
xor r9d, r9d
lea r11, [rsp + 0x34]
lea edx, [r9 + 0xb]
xor r8d, r8d
mov qword [rsp + 0x20], r11
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x30]
mov r11d, dword [rsp + 0xb8]
mov r8d, dword [rsp + 0x34]
mov edx, 0xfffffff8
add ecx, 7
add r11d, 7
and ecx, edx
and r11d, edx
xor edx, edx
add r8d, ecx
mov dword [rsp + 0x30], ecx
mov rcx, qword [0x7ff74b584e0]
add r8d, r11d
mov dword [rsp + 0xb8], r11d
call qword [0x7ff74b58358]
mov r9d, dword [rsp + 0xb8]
mov r14d, dword [rsp + 0x30]
lea rbp, [rax + r9]
mov r15, rax
mov qword [rsp + 0x50], rax
add r14, rbp
cmp rax, r13
jne 0x7ff74b3a740
mov edi, 0x8007000e
jmp 0x7ff74b3aca4
mov rcx, qword [r12]
lea rax, [rsp + 0xb8]
mov r8, r15
mov edx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
cmp eax, r13d
jne 0x7ff74b3a7b0
call sub.KERNEL32.dll_GetLastError
movzx edi, ax
or edi, 0x80070000
cmp eax, r13d
cmovle edi, eax
cmp dword [0x7ff74b582c8], r13d
je 0x7ff74b3aca4
mov rcx, qword [0x7ff74b58350]
lea rax, [0x7ff74b58350]
cmp rcx, rax
je 0x7ff74b3aca4
test byte [rcx + 0x1c], 1
je 0x7ff74b3aca4
mov edx, 0xb
jmp 0x7ff74b3a88c
mov r9d, dword [rsp + 0x30]
mov rcx, qword [r12]
lea rax, [rsp + 0x30]
mov r8, rbp
mov edx, 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
cmp eax, r13d
jne 0x7ff74b3a81f
call sub.KERNEL32.dll_GetLastError
movzx edi, ax
or edi, 0x80070000
cmp eax, r13d
cmovle edi, eax
cmp dword [0x7ff74b582c8], r13d
je 0x7ff74b3aca4
mov rcx, qword [0x7ff74b58350]
lea rax, [0x7ff74b58350]
cmp rcx, rax
je 0x7ff74b3aca4
test byte [rcx + 0x1c], 1
je 0x7ff74b3aca4
mov edx, 0xc
jmp 0x7ff74b3a88c
mov r9d, dword [rsp + 0x34]
mov rcx, qword [r12]
lea rax, [rsp + 0x34]
mov r8, r14
mov edx, 0xb
mov qword [rsp + 0x20], rax
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_GetTokenInformation]
cmp eax, r13d
jne 0x7ff74b3a8a4
call sub.KERNEL32.dll_GetLastError
movzx edi, ax
or edi, 0x80070000
cmp eax, r13d
cmovle edi, eax
cmp dword [0x7ff74b582c8], r13d
je 0x7ff74b3aca4
mov rcx, qword [0x7ff74b58350]
lea rax, [0x7ff74b58350]
cmp rcx, rax
je 0x7ff74b3aca4
test byte [rcx + 0x1c], 1
je 0x7ff74b3aca4
mov edx, 0xd
mov rcx, qword [rcx + 0x10]
lea r8, [0x7ff74b51770]
mov r9d, edi
call fcn.7ff74b25ec4
jmp 0x7ff74b3aca4
mov rcx, qword [r15]
call fcn.7ff74b3a5a0
mov r13d, eax
mov dword [rsp + 0x38], eax
cmp dword [rbp], ebx
jbe 0x7ff74b3a8e4
mov r11d, dword [rbp]
lea r10, [rbp + 8]
test dword [r10 + 8], 0xc0000000
jne 0x7ff74b3a8d5
mov rcx, qword [r10]
call fcn.7ff74b3a5a0
xor r13d, eax
add r10, 0x10
sub r11, 1
jne 0x7ff74b3a8c0
mov dword [rsp + 0x38], r13d
cmp dword [r14], ebx
jbe 0x7ff74b3a90a
mov r11d, dword [r14]
lea r10, [r14 + 8]
mov rcx, qword [r10]
call fcn.7ff74b3a5a0
add r10, 0x10
xor r13d, eax
sub r11, 1
jne 0x7ff74b3a8f0
mov dword [rsp + 0x38], r13d
lea rcx, [0x7ff74b59888]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rbx, qword [0x7ff74b58750]
mov dword [rsp + 0x40], eax
lea rax, [0x7ff74b58700]
mov rsi, rax
cmp rbx, rax
je 0x7ff74b3aa6b
cmp qword [rbx + 0x48], 0
jne 0x7ff74b3a984
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rbx + 0x20]
mov rcx, qword [0x7ff74b584e0]
xor edx, edx
call qword [case.0x7ff74b3e5fd.0]
mov rax, qword [rbx + 0x50]
mov qword [rsi + 0x50], rax
mov rax, qword [0x7ff74b587b0]
mov qword [rbx + 0x50], rax
mov qword [0x7ff74b587b0], rbx
lea rax, [0x7ff74b58700]
jmp 0x7ff74b3aa50
cmp dword [rbx + 0x18], r13d
jne 0x7ff74b3aa47
mov rcx, qword [rbx + 0x28]
mov eax, dword [rbp]
cmp dword [rcx], eax
jne 0x7ff74b3aa40
mov rcx, qword [rbx + 0x20]
mov rdx, qword [r15]
mov rcx, qword [rcx]
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_EqualSid]
test eax, eax
je 0x7ff74b3aa40
xor r15d, r15d
cmp r15d, dword [rbp]
jae 0x7ff74b3aa01
lea rdi, [r15 - 8]
lea r13, [rbp + 8]
sub rdi, rbp
test dword [r13 + 8], 0xc0000000
jne 0x7ff74b3a9ee
mov rcx, qword [rbx + 0x28]
mov rdx, qword [r13]
lea rax, [rdi + r13]
mov rcx, qword [rax + rcx + 8]
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_EqualSid]
test eax, eax
je 0x7ff74b3a9fb
inc r15d
add r13, 0x10
cmp r15d, dword [rbp]
jb 0x7ff74b3a9c9
cmp r15d, dword [rbp]
jb 0x7ff74b3aa3b
xor r13d, r13d
cmp r13d, dword [r14]
jae 0x7ff74b3aa5d
xor r15d, r15d
lea rdi, [r14 + 8]
mov rcx, qword [rbx + 0x30]
mov rdx, qword [rdi]
mov rcx, qword [rcx + r15 + 8]
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_EqualSid]
test eax, eax
je 0x7ff74b3aa36
inc r13d
add r15, 0x10
add rdi, 0x10
cmp r13d, dword [r14]
jb 0x7ff74b3aa10
cmp r13d, dword [r14]
jae 0x7ff74b3aa5d
mov r15, qword [rsp + 0x50]
lea rax, [0x7ff74b58700]
mov rsi, qword [rsi + 0x50]
mov r13d, dword [rsp + 0x38]
mov rbx, qword [rsi + 0x50]
cmp rbx, rax
jne 0x7ff74b3a93b
mov edi, dword [rsp + 0x3c]
mov r13d, dword [rsp + 0x38]
mov r15, qword [rsp + 0x50]
xor eax, eax
lea rcx, [0x7ff74b58700]
cmp rbx, rcx
setne al
test eax, eax
je 0x7ff74b3aac6
mov rcx, qword [rbx]
lea rax, [rsp + 0x48]
mov r9d, 3
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0x2000000
mov dword [rsp + 0x20], 1
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_DuplicateTokenEx]
test eax, eax
je 0x7ff74b3aac6
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rsp + 0x48]
xor r13d, r13d
mov qword [r12], r11
jmp 0x7ff74b3abef
mov rcx, qword [r12]
lea rax, [rsp + 0x48]
mov r9d, 3
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0x2000000
mov dword [rsp + 0x20], 1
call qword [sym.imp.API_MS_Win_Security_Base_L1_1_0.dll_DuplicateTokenEx]
mov r12d, eax
test eax, eax
je 0x7ff74b3ab8a
mov rbx, qword [0x7ff74b587b0]
lea rax, [0x7ff74b58760]
cmp rbx, rax
je 0x7ff74b3ab2a
mov rax, qword [rbx + 0x50]
mov qword [0x7ff74b587b0], rax
lea rax, [0x7ff74b58700]
mov qword [rbx + 0x50], rax
mov qword [rsi + 0x50], rbx
jmp 0x7ff74b3ab5b
mov rcx, qword [rsi]
mov rbx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rsi + 0x20]
mov rcx, qword [0x7ff74b584e0]
xor edx, edx
call qword [case.0x7ff74b3e5fd.0]
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x7ff74b3ab5b
and qword [rax], 0
and qword [rsi + 0x48], 0
mov rax, qword [rsp + 0x48]
mov dword [rbx + 0x18], r13d
xor r13d, r13d
mov qword [rbx], rax
mov eax, dword [rsp + 0x40]
mov qword [rbx + 0x20], r15
mov qword [rbx + 0x28], rbp
mov qword [rbx + 0x30], r14
mov qword [rbx + 0x48], r13
mov dword [rbx + 0x38], eax
mov qword [rbx + 8], r13
mov r15, r13
jmp 0x7ff74b3abe6
call sub.KERNEL32.dll_GetLastError
xor r13d, r13d
movzx edi, ax
or edi, 0x80070000
cmp eax, r13d
cmovle edi, eax
cmp dword [0x7ff74b582c8], r13d
je 0x7ff74b3ac8f
mov rcx, qword [0x7ff74b58350]
lea rax, [0x7ff74b58350]
cmp rcx, rax
je 0x7ff74b3ac8f
test byte [rcx + 0x1c], 1
je 0x7ff74b3ac8f
mov rcx, qword [rcx + 0x10]
lea edx, [r13 + 0xe]
lea r8, [0x7ff74b51770]
mov r9d, edi
call fcn.7ff74b25ec4
cmp r12d, r13d
je 0x7ff74b3ac8f
cmp qword [rbx + 0x48], r13
jne 0x7ff74b3ac85
mov rax, qword [0x7ff74b58698]
lea rcx, [0x7ff74b58680]
cmp rax, rcx
je 0x7ff74b3ac24
mov qword [rbx + 0x48], rax
mov rax, qword [0x7ff74b58698]
mov rcx, qword [rax + 0x18]
mov qword [0x7ff74b58698], rcx
jmp 0x7ff74b3ac64
mov rcx, qword [0x7ff74b584e0]
xor edx, edx
lea r8d, [rdx + 0x20]
call qword [0x7ff74b58358]
mov r11, rax
mov qword [rbx + 0x48], rax
cmp rax, r13
jne 0x7ff74b3ac4a
mov edi, 0x8007000e
jmp 0x7ff74b3ac8f
mov eax, dword [0x7ff74b582cc]
inc eax
mov qword [r11 + 8], rax
mov dword [0x7ff74b582cc], eax
mov rax, qword [rbx + 0x48]
mov dword [rax + 0x10], r13d
mov rax, qword [rbx + 0x48]
mov qword [rax], rbx
mov rax, qword [0x7ff74b586b8]
mov rdx, qword [rbx + 0x48]
mov qword [rdx + 0x18], rax
mov rax, qword [rbx + 0x48]
mov qword [0x7ff74b586b8], rax
mov rax, qword [rbx + 0x48]
mov edi, r13d
inc dword [rax + 0x10]
lea rcx, [0x7ff74b59888]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0xb0]
cmp r15, r13
je 0x7ff74b3acbb
mov rcx, qword [0x7ff74b584e0]
mov r8, r15
xor edx, edx
call qword [case.0x7ff74b3e5fd.0]
cmp edi, r13d
jl 0x7ff74b3acc3
mov qword [rsi], rbx
mov eax, edi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret