Function at 0x1800041c0
Capabilities:
Compare security identifiers

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
xor r13d, r13d
mov rbx, rcx
mov dword [rbp + 0x208], r13d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x218]
lea edx, [r13 + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x180004688
mov rcx, qword [rbp + 0x218]
lea rax, [rbp + 0x208]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r13 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x180004688
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x180004688
mov edi, dword [rbp + 0x208]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, edi
lea edx, [r13 + 8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r9d, dword [rbp + 0x208]
lea edx, [r13 + 1]
mov rcx, qword [rbp + 0x218]
mov r15, rax
lea rax, [rbp + 0x208]
mov r8, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x180004675
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x70]
lea edx, [r13 + 2]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea r9d, [r13 + 2]
xor r8d, r8d
mov dword [rsp + 0x20], 2
lea edx, [r13 + 0x2c]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
lea r8, [rbp - 0x80]
xor ecx, ecx
lea rdx, str.SeRestorePrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
lea r8, [rsp + 0x78]
xor ecx, ecx
lea rdx, str.SeTakeOwnershipPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rax, qword [rsp + 0x78]
lea r8, [rbp - 0x78]
mov rcx, qword [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x40], rax
xor edx, edx
movsd xmm0, qword [rsp + 0x40]
mov rax, qword [rbp - 0x80]
movsd qword [rbp - 0x74], xmm0
mov qword [rsp + 0x40], rax
movsd xmm0, qword [rsp + 0x40]
mov qword [rsp + 0x28], r13
movsd qword [rbp - 0x68], xmm0
mov dword [rbp - 0x78], 2
mov dword [rbp - 0x6c], 2
mov dword [rbp - 0x60], 2
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rdx, qword [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x1800043b9
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x1800043b2
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x1800043ad
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1800046f3
mov rcx, r8
call fcn.18000dc24
xor eax, eax
jmp 0x1800046c8
movups xmm0, xmmword [str.Machine_]
movzx eax, word [0x180027230]
lea rcx, [rbp - 0x3e]
xor edx, edx
mov word [rbp - 0x40], ax
mov r8d, 0x1f6
movaps xmmword [rbp - 0x50], xmm0
call fcn.180010030
cmp qword [rbx + 0x18], 8
mov r8, rbx
jb 0x1800043ed
mov r8, qword [rbx]
mov edx, 0x104
lea rcx, [rbp - 0x50]
call fcn.1800130b4
mov edx, 4
mov qword [rsp + 0x60], r13
lea rax, [rsp + 0x60]
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x58]
mov qword [rsp + 0x30], r13
lea rcx, [rbp - 0x50]
lea r8d, [rdx - 3]
mov qword [rsp + 0x28], r13
mov qword [rbp + 0x210], r13
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x180004373
mov r9, qword [r15]
lea edx, [rax + 4]
mov qword [rsp + 0x30], r13
lea r8d, [rax + 1]
mov qword [rsp + 0x28], r13
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x180004373
lea rax, [rsp + 0x68]
mov edx, 4
mov qword [rsp + 0x38], rax
lea rcx, [rbp - 0x50]
lea rax, [rbp + 0x210]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8d, edx
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x180004373
mov rsi, qword [rbp + 0x210]
mov r14d, 0xffffffff
test rsi, rsi
je 0x1800045e9
mov edi, r13d
cmp r13w, word [rsi + 4]
jae 0x180004551
nop dword [rax]
nop word [rax + rax]
lea r8, [rsp + 0x40]
mov edx, edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x18000452e
mov rdx, qword [rsp + 0x40]
movzx ecx, byte [rdx]
test ecx, ecx
je 0x18000451b
cmp ecx, 1
jne 0x18000452e
lea rcx, [rdx + 8]
mov rdx, qword [r15]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x18000452e
mov r14d, edi
jmp 0x18000452e
lea rcx, [rdx + 8]
mov rdx, qword [r15]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
cmovne r14d, edi
mov rsi, qword [rbp + 0x210]
inc edi
movzx eax, word [rsi + 4]
cmp edi, eax
jl 0x1800044e0
cmp r14d, 0xffffffff
je 0x180004551
mov edx, r14d
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_DeleteAce]
mov rcx, qword [r15]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
xor edx, edx
mov rax, qword [rbp + 0x210]
movzx ecx, word [rax + 2]
add rcx, 0x10c
add rdi, rcx
mov rcx, r12
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x180004373
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.180010030
mov rdx, qword [rbp + 0x210]
mov rcx, rsi
movzx r8d, word [rdx + 2]
call fcn.18000f980
movzx edx, byte [rsi]
mov r9d, 0xf003f
mov word [rsi + 2], di
mov r8d, 2
mov rax, qword [r15]
mov rcx, rsi
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedObjectAce]
test eax, eax
je 0x180004373
mov qword [rbp + 0x210], rsi
mov edx, 4
mov qword [rsp + 0x30], r13
mov r8d, edx
mov qword [rsp + 0x28], rsi
xor r9d, r9d
mov qword [rsp + 0x20], r13
lea rcx, [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov r9, qword [rsp + 0x58]
lea rcx, [rbp - 0x50]
mov edx, 4
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
lea r8d, [rdx - 3]
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov r8, qword [rbp + 0x210]
test r8, r8
je 0x18000464b
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x60]
test r8, r8
je 0x180004660
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsp + 0x68]
test r8, r8
je 0x180004675
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r15, r15
je 0x180004688
mov r8, r15
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x1800046c3
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x1800046be
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1800046f9
mov rcx, r8
call fcn.18000dc24
mov eax, 1
mov word [rbx], r13w
mov qword [rbx + 0x10], r13
mov qword [rbx + 0x18], 7
mov rbx, qword [rsp + 0x300]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.18001339c
int3
call fcn.18001339c
int3