Function at 0x14004fa60
Capabilities:
Compare security identifiers

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x440
movaps xmmword [rax - 0x28], xmm6
mov rax, qword [0x1401c73e8]
xor rax, rsp
mov qword [rsp + 0x428], rax
mov r14, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x290], xmm0
xor edx, edx
xor ecx, ecx
mov r8d, 0xc0000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x298], rax
test rax, rax
jne 0x14004fc70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rsp + 0x3c2]
nop dword [rax]
nop word [rax + rax]
sub r10, 2
mov eax, 0xcccccccd
mul r9d
mov r8d, edx
shr r8d, 3
movzx ecx, r8w
shl cx, 2
lea edx, [rcx + r8]
add dx, dx
sub r9w, dx
add r9w, 0x30
mov word [r10], r9w
mov r9d, r8d
test r8d, r8d
jne 0x14004fae0
xor esi, esi
mov qword [rsp + 0x30], rsi
movdqa xmm0, xmmword [0x1401a4080]
movdqu xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x30], si
lea rax, [rsp + 0x3c2]
cmp r10, rax
je 0x14004fb5a
lea r8, [rsp + 0x3c2]
sub r8, r10
sar r8, 1
mov rdx, r10
lea rcx, [rsp + 0x30]
call fcn.140028220
nop
mov r9d, 0x19
lea r8, str.Fail_to_open_sc_manager:
lea rcx, [rsp + 0x30]
call fcn.14004c5a0
mov qword [rsp + 0x318], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x328], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x318], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x328], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rsp + 0x30]
call fcn.1400285b0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x14004fbd1
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0xa0], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
lea rdx, [rsp + 0x318]
cmp qword [rsp + 0x330], 8
cmovae rdx, qword [rsp + 0x318]
movq rcx, xmm6
mov rax, qword [rcx]
call qword [rax]
nop
psrldq xmm6, 8
movq rcx, xmm6
test rcx, rcx
je 0x14004fc5d
mov rdi, 0xffffffffffffffff
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14004fc5d
mov rbx, qword [rsp + 0xa8]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x14004fc5d
mov rcx, qword [rsp + 0xa8]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x318]
call fcn.1400285b0
nop
jmp 0x14005077d
xor esi, esi
mov qword [rsp + 0xf0], rsi
movdqa xmm0, xmmword [0x1401a4090]
movdqu xmmword [rsp + 0x100], xmm0
mov byte [rsp + 0xf0], sil
mov rdi, 0xffffffffffffffff
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [r14 + r8], sil
jne 0x14004fca0
mov rdx, r14
lea rcx, [rsp + 0xf0]
call fcn.140028df0
nop
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x398]
call fcn.14004f890
nop
mov r9d, 9
lea r8, str.Enabling
mov rcx, rax
call fcn.14004c5a0
mov qword [rsp + 0x30], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x40], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
mov r8d, reloc.OLEAUT32.dll_VariantChangeType
lea rdx, str._protection
lea rcx, [rsp + 0x30]
call fcn.140025c40
mov qword [rsp + 0x2d8], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x2e8], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x2d8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x2e8], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rsp + 0x30]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x398]
call fcn.1400285b0
nop
lea rcx, [rsp + 0xf0]
call fcn.140028ff0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x14004fda6
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0xb0], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
lea rdx, [rsp + 0x2d8]
cmp qword [rsp + 0x2f0], 8
cmovae rdx, qword [rsp + 0x2d8]
movq rcx, xmm6
mov rax, qword [rcx]
call qword [rax + 0x20]
nop
psrldq xmm6, 8
movq rcx, xmm6
test rcx, rcx
je 0x14004fe2d
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14004fe2d
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, edi
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14004fe2d
mov rcx, qword [rsp + 0xb8]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xorps xmm0, xmm0
movups xmmword [rsp + 0x280], xmm0
mov qword [rsp + 0x110], rsi
movdqa xmm1, xmmword [0x1401a4090]
movdqu xmmword [rsp + 0x120], xmm1
mov byte [rsp + 0x110], 0
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [r14 + r8], 0
jne 0x14004fe60
mov rdx, r14
lea rcx, [rsp + 0x110]
call fcn.140028df0
nop
lea rdx, [rsp + 0x110]
lea rcx, [rsp + 0x220]
call fcn.14004f890
cmp qword [rax + 0x18], 8
jb 0x14004fe9a
mov rax, qword [rax]
mov r8d, 0x60000
mov rdx, rax
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rsp + 0x288], rax
lea rcx, [rsp + 0x220]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x110]
call fcn.140028ff0
test rbx, rbx
jne 0x140050071
mov qword [rsp + 0x130], rsi
movdqa xmm0, xmmword [0x1401a4090]
movdqu xmmword [rsp + 0x140], xmm0
mov byte [rsp + 0x130], bl
mov r8, rdi
inc r8
cmp byte [r14 + r8], 0
jne 0x14004ff03
mov rdx, r14
lea rcx, [rsp + 0x130]
call fcn.140028df0
nop
lea rdx, [rsp + 0x130]
lea rcx, [rsp + 0x240]
call fcn.14004f890
nop
mov r9d, reloc.OLEAUT32.dll_SafeArrayAccessData
lea r8, str.Fail_to_open_service:
mov rcx, rax
call fcn.14004c5a0
mov qword [rsp + 0x338], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x348], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x338], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x348], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rsp + 0x240]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x130]
call fcn.140028ff0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x14004ffba
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0xc0], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
lea rdx, [rsp + 0x338]
cmp qword [rsp + 0x350], 8
cmovae rdx, qword [rsp + 0x338]
movq rcx, xmm6
mov rax, qword [rcx]
call qword [rax + 0x20]
nop
psrldq xmm6, 8
movq rcx, xmm6
test rcx, rcx
je 0x140050040
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140050040
mov rbx, qword [rsp + 0xc8]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x140050040
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x338]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x2d8]
call fcn.1400285b0
nop
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x14005077f
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x2a0], xmm0
movups xmmword [rsp + 0x2b0], xmm0
movups xmmword [rsp + 0x2c0], xmm0
mov qword [rsp + 0x2d0], rax
mov qword [rsp + 0x2a8], rsi
mov byte [rsp + 0x2b0], al
mov dword [rsp + 0x2b4], 2
lea rax, vtable.ATL::CDacl.0
mov qword [rsp + 0x2a0], rax
movdqu xmmword [rsp + 0x2b8], xmm0
mov qword [rsp + 0x2c8], rsi
mov dword [rsp + 0x2d0], esi
lea r8, [rsp + 0x2a0]
mov rcx, qword [rsp + 0x288]
call fcn.14004f610
test al, al
jne 0x1400502d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rsp + 0x3f2]
nop word [rax + rax]
sub r10, 2
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea r8d, [rcx + rdx]
add r8w, r8w
sub r9w, r8w
add r9w, 0x30
mov word [r10], r9w
mov r9d, edx
test edx, edx
jne 0x140050110
mov qword [rsp + 0x150], rsi
movdqa xmm0, xmmword [0x1401a4080]
movdqu xmmword [rsp + 0x160], xmm0
mov word [rsp + 0x150], si
lea rax, [rsp + 0x3f2]
cmp r10, rax
je 0x14005018f
lea r8, [rsp + 0x3f2]
sub r8, r10
sar r8, 1
mov rdx, r10
lea rcx, [rsp + 0x150]
call fcn.140028220
nop
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetLBound
lea r8, [0x140199990]
lea rcx, [rsp + 0x150]
call fcn.14004c5a0
mov qword [rsp + 0x358], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x368], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x358], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x368], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rsp + 0x150]
call fcn.1400285b0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x14005020c
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0x50], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
lea rdx, [rsp + 0x358]
cmp qword [rsp + 0x370], 8
cmovae rdx, qword [rsp + 0x358]
movq rcx, xmm6
mov rax, qword [rcx]
call qword [rax]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140050283
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140050283
mov rbx, qword [rsp + 0x58]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x140050283
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x358]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x2a0]
call fcn.14004e510
nop
mov rcx, qword [rsp + 0x288]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0x2d8]
call fcn.1400285b0
nop
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x14005077f
mov dword [rsp + 0x20], 0x220
mov r9d, 0x20
lea r8d, [r9 - 0x1e]
lea rdx, [0x140199c38]
lea rcx, [rsp + 0x1a0]
call fcn.14004e060
nop
cmp byte [rsp + 0x1ec], 0
je 0x1400507b2
lea rcx, [rsp + 0x1a8]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400507b2
cmp byte [rsp + 0x2b0], 0
jne 0x1400503f4
xor r12b, r12b
mov ebx, esi
nop
lea rcx, [rsp + 0x2a0]
mov rax, qword [rsp + 0x2a0]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp ebx, eax
jae 0x1400503da
mov edx, ebx
lea rcx, [rsp + 0x2a0]
mov rax, qword [rsp + 0x2a0]
call qword [rax + 0x20]
mov r15, rax
lea r14, [rax + 0x10]
test r14, r14
je 0x1400503d3
cmp byte [rsp + 0x1ec], 0
je 0x1400503d3
lea rcx, [rsp + 0x1a8]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400503d3
cmp byte [r15 + 0x54], 0
je 0x1400503d3
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400503d3
mov rdx, r14
lea rcx, [rsp + 0x1a8]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
setne al
test al, al
je 0x1400503d3
mov edx, ebx
lea rcx, [rsp + 0x2a0]
mov rax, qword [rsp + 0x2a0]
call qword [rax + 0x18]
mov r12b, 1
jmp 0x140050330
inc ebx
jmp 0x140050330
test r12b, r12b
je 0x1400503f4
mov rcx, qword [rsp + 0x2a8]
call fcn.140129840
mov qword [rsp + 0x2a8], rsi
lea rax, vtable.ATL::CSid.0
mov qword [rsp + 0x1a0], rax
mov rdx, qword [rsp + 0x210]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140050424
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x208]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140050445
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x200]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140050466
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x1f8]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140050487
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r8, [rsp + 0x2a0]
mov rcx, qword [rsp + 0x288]
call fcn.14004f6e0
test al, al
je 0x14005056f
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x1400504c0
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0x60], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
movq rcx, xmm6
mov rax, qword [rcx]
lea rdx, str.Service_dacl_was_modified_successfully.
call qword [rax + 0x20]
nop
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140050525
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140050525
mov rbx, qword [rsp + 0x68]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x140050525
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x2a0]
call fcn.14004e510
nop
mov rcx, qword [rsp + 0x288]
test rcx, rcx
je 0x140050547
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0x2d8]
call fcn.1400285b0
nop
mov rcx, qword [rsp + 0x298]
test rcx, rcx
je 0x140050568
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x14005077f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rsp + 0x422]
sub r10, 2
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea r8d, [rcx + rdx]
add r8w, r8w
sub r9w, r8w
add r9w, 0x30
mov word [r10], r9w
mov r9d, edx
test edx, edx
jne 0x140050580
mov qword [rsp + 0x170], rsi
movdqa xmm0, xmmword [0x1401a4080]
movdqu xmmword [rsp + 0x180], xmm0
mov word [rsp + 0x170], si
lea rax, [rsp + 0x422]
cmp r10, rax
je 0x1400505ff
lea r8, [rsp + 0x422]
sub r8, r10
sar r8, 1
mov rdx, r10
lea rcx, [rsp + 0x170]
call fcn.140028220
nop
mov r9d, SafeArrayUnlock
lea r8, [0x140199a10]
lea rcx, [rsp + 0x170]
call fcn.14004c5a0
mov qword [rsp + 0x378], rsi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x388], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x378], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x388], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
lea rcx, [rsp + 0x170]
call fcn.1400285b0
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_AcquireSRWLockShared
mov rax, qword [0x1401dd1a8]
test rax, rax
je 0x14005067c
lock inc dword [rax + 8]
movups xmm6, xmmword [0x1401dd1a0]
movups xmmword [rsp + 0x70], xmm6
lea rcx, [0x1401dd1c0]
call sub.KERNEL32.dll_ReleaseSRWLockShared
nop
lea rdx, [rsp + 0x378]
cmp qword [rsp + 0x390], 8
cmovae rdx, qword [rsp + 0x378]
movq rcx, xmm6
mov rax, qword [rcx]
call qword [rax]
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400506f3
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1400506f3
mov rbx, qword [rsp + 0x78]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x1400506f3
mov rcx, qword [rsp + 0x78]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x378]
call fcn.1400285b0
nop
lea rcx, [rsp + 0x2a0]
call fcn.14004e510
nop
mov rcx, qword [rsp + 0x288]
test rcx, rcx
je 0x140050723
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rcx, [rsp + 0x2d8]
call fcn.1400285b0
nop
mov rcx, qword [rsp + 0x298]
test rcx, rcx
je 0x140050744
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x14005077f
xor al, al
mov rcx, qword [rsp + 0x428]
xor rcx, rsp
call fcn.140122510
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r12
ret
mov ecx, 0x80070057
call fcn.1400284e0
int3