Function at 0x140058860
Capabilities:
Compare security identifiers

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x260
mov rbx, qword [0x1400f6e30]
xor edx, edx
mov ecx, 0x1a
mov rsi, qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
mov rax, qword [rbx]
mov qword [rsp + 0x258], rax
xor eax, eax
lea rdi, [rsp + 0x90]
mov dword [rsp + 0x5c], 0x20
lea r9, [rsp + 0x5c]
mov dword [rsp + 0x60], 0x20
mov r8, rdi
call rsi
test eax, eax
je 0x140058acb
lea rbp, [rsp + 0xb0]
xor edx, edx
lea r9, [rsp + 0x60]
mov ecx, 0x16
mov r8, rbp
call rsi
test eax, eax
je 0x140058acb
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x68]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140058ae0
lea rax, [rsp + 0x64]
mov rcx, qword [rsp + 0x68]
mov dword [rsp + 0x64], 0
mov r9d, pe_nt_image_headers64
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0xd0]
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140058b10
mov rcx, qword [rsp + 0xd0]
mov rsi, qword [sym.imp.ADVAPI32.dll_EqualSid]
mov rdx, rbp
call rsi
test eax, eax
jne 0x140058af0
mov rcx, qword [rsp + 0xd0]
mov rdx, rdi
call rsi
test eax, eax
jne 0x140058af0
lea rsi, [rsp + 0x150]
mov r8d, 2
mov edx, 0x100
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x140058ac0
mov r9, qword [rsp + 0xd0]
mov r12, qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
mov edx, 2
mov rcx, rsi
mov r8d, 0x10000000
call r12
test eax, eax
je 0x140058ac0
mov r9, rdi
mov r8d, 0x10000000
mov edx, 2
mov rcx, rsi
call r12
test eax, eax
je 0x140058ac0
mov r9, rbp
mov r8d, 0x10000000
mov edx, 2
mov rcx, rsi
call r12
test eax, eax
je 0x140058ac0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x80], rdi
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov r8d, 1
mov edx, 1
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CreateRestrictedToken]
mov rcx, qword [rsp + 0x68]
mov rbp, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
call rbp
test edi, edi
je 0x140058ae0
mov edx, 6
mov qword [rsp + 0x78], rsi
mov rcx, qword [rsp + 0x70]
mov r9d, 8
lea r8, [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov edx, eax
mov rax, qword [rsp + 0x70]
test edx, edx
jne 0x140058aa2
mov rcx, rax
call rbp
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 1
nop word [rax + rax]
xor eax, eax
mov rdx, qword [rsp + 0x258]
sub rdx, qword [rbx]
jne 0x140058b2c
add rsp, 0x260
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xc
jmp 0x140058aa0
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 1
jmp 0x140058aa0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
jmp 0x140058aa0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 1
jmp 0x140058aa0
call fcn.140082d70
nop
nop word cs:[rax + rax]
nop dword [rax]
sub rsp, 0x28
call fcn.140058860
mov rcx, rax
xor eax, eax
test rcx, rcx
je 0x140058b5e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
add rsp, 0x28
ret