Function at 0x17ae370
Capabilities:
Compare security identifiers

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0xa0
mov rax, qword [0x039f1190]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov rsi, rcx
xor r13d, r13d
mov qword [r11 - 0x50], r13
mov dword [r11 - 0x58], r13d
mov r12, r13
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x48], r13
mov rdi, r13
mov qword [r11 - 0x38], r13
mov byte [r11 - 0x28], dil
mov byte [r11 - 0x27], dil
mov byte [r11 - 0x26], dil
mov byte [r11 - 0x25], dil
mov byte [r11 - 0x24], dil
mov byte [r11 - 0x23], 5
test rcx, rcx
jne 0x17ae3df
lea eax, [rcx + 0x57]
jmp 0x17ae659
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea r9, [rsp + 0x68]
mov edx, 8
lea r8d, [rdx - 7]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x17ae43d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x3f0
jne 0x17ae61b
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x68]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x17ae43d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x17ae61b
mov dword [rsp + 0x60], r13d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x17ae476
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x7a
jne 0x17ae61b
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.MSVCR80.dll_malloc]
mov r12, rax
mov qword [rsp + 0x88], rax
test rax, rax
jne 0x17ae498
lea ebx, [rax + 0xe]
jmp 0x17ae61b
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x60]
mov r8, r12
mov edx, 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x17ae4cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x17ae61b
mov rdx, qword [r12]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x17ae4e4
mov ebx, r13d
jmp 0x17ae61b
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
lea rcx, [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x17ae539
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x17ae61b
mov rdx, qword [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x17ae553
or ebx, 0xffffffff
jmp 0x17ae61b
mov dword [rsp + 0x60], r13d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x17ae58c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x7a
jne 0x17ae61b
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.MSVCR80.dll_malloc]
mov rdi, rax
mov qword [rsp + 0x80], rax
test rax, rax
jne 0x17ae5ab
lea ebx, [rax + 0xe]
jmp 0x17ae61b
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x60]
mov r8, rdi
mov edx, 2
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x17ae5db
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x17ae61b
mov ebx, r13d
mov dword [rsp + 0x78], ebx
cmp ebx, dword [rdi]
jae 0x17ae618
mov esi, ebx
add rsi, rsi
mov rdx, qword [rdi + rsi*8 + 8]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x17ae60f
test byte [rdi + rsi*8 + 0x10], 4
mov ebx, 0xffffffff
cmovne ebx, r13d
jmp 0x17ae61b
add ebx, 1
mov dword [rsp + 0x78], ebx
jmp 0x17ae5e2
or ebx, 0xffffffff
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x17ae62b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12, r12
je 0x17ae639
mov rcx, r12
call qword [sym.imp.MSVCR80.dll_free]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x17ae649
call qword [sym.imp.ADVAPI32.dll_FreeSid]
test rdi, rdi
je 0x17ae657
mov rcx, rdi
call qword [sym.imp.MSVCR80.dll_free]
mov eax, ebx
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.01003340
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret