Function at 0x1400147e0
Capabilities:
Compare security identifiers
Get user security identifier

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
sub rsp, 0x110
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x80], 0
mov qword [rsp + 0xb0], 0
mov dword [rsp + 0x94], 0
mov qword [rsp + 0xf0], 0
mov dword [rsp + 0xa8], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0x8c], 0
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x90], 0
mov dword [rsp + 0x88], 0
mov dword [rsp + 0xe8], 4
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x84]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x94]
mov r8, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x128]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x1400148fc
jmp 0x140014ef8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x14001490c
jmp 0x140014ef8
mov ebx, dword [rsp + 0x94]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0xb0], rax
cmp qword [rsp + 0xb0], 0
jne 0x140014942
jmp 0x140014ef8
mov ebx, dword [rsp + 0x80]
shl rbx, 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140014975
jmp 0x140014ef8
lea rax, [rsp + 0x84]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x94]
mov r8, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x128]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x1400149cf
jmp 0x140014ef8
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0xf0]
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x140014a14
jmp 0x140014ef8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140014a24
jmp 0x140014ef8
mov ebx, dword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0xf0], rax
cmp qword [rsp + 0xf0], 0
jne 0x140014a5a
jmp 0x140014ef8
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0xa8]
mov r8, qword [rsp + 0xf0]
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x140014aa2
jmp 0x140014ef8
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140014abe
jmp 0x140014ef8
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x6c]
mov rcx, qword [rsp + 0xf0]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x140014ae4
jmp 0x140014ef8
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x44], 8
cmp qword [rsp + 0x78], 0
jne 0x140014b0c
mov dword [rsp + 0x6c], 0
cmp dword [rsp + 0x6c], 0
je 0x140014b38
mov r9d, 2
mov r8d, recv
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x140014b38
jmp 0x140014ef8
mov ebx, dword [rsp + 0x44]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov eax, eax
lea rax, [rbx + rax + 8]
mov dword [rsp + 0x8c], eax
mov ebx, dword [rsp + 0x8c]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0xa0], 0
jne 0x140014b8e
jmp 0x140014ef8
mov r8d, 2
mov edx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x140014bb2
jmp 0x140014ef8
mov dword [rsp + 0x90], 0
cmp dword [rsp + 0x6c], 0
je 0x140014c8c
cmp dword [rsp + 0x40], 0
je 0x140014c8c
mov dword [rsp + 0x50], 0
jmp 0x140014be8
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140014c8c
lea r8, [rsp + 0x60]
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x140014c13
jmp 0x140014ef8
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 1]
and eax, 0x10
test eax, eax
je 0x140014c25
jmp 0x140014c8c
mov rdx, qword [rsp + 0x60]
add rdx, 8
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140014c42
jmp 0x140014bdd
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 2]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x60]
mov r8d, 0xffffffff
mov edx, 2
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x140014c76
jmp 0x140014ef8
mov eax, dword [rsp + 0x90]
add eax, 1
mov dword [rsp + 0x90], eax
jmp 0x140014bdd
lea rcx, [0x140108048]
call fcn.140015e80
lea rdx, str.AddAccessAllowedAceEx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140014cec
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x130]
mov r8d, 3
mov edx, 2
mov rcx, qword [rsp + 0xa0]
call qword [rsp + reloc.WS2_32.dll_WSASetLastError]
test eax, eax
jne 0x140014cea
jmp 0x140014ef8
jmp 0x140014d18
mov r9, qword [rsp + 0xb0]
mov r8d, dword [rsp + 0x130]
mov edx, 2
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x140014d18
jmp 0x140014ef8
cmp dword [rsp + 0x6c], 0
je 0x140014d90
cmp dword [rsp + 0x40], 0
je 0x140014d90
jmp 0x140014d33
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140014d90
lea r8, [rsp + 0x60]
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x140014d5a
jmp 0x140014ef8
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 2]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x60]
mov r8d, 0xffffffff
mov edx, 2
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x140014d8e
jmp 0x140014ef8
jmp 0x140014d28
xor r9d, r9d
mov r8, qword [rsp + 0xa0]
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x140014db7
jmp 0x140014ef8
lea rcx, [0x140108048]
call fcn.140015e80
lea rdx, str.SetSecurityDescriptorControl
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0xe0], rax
cmp qword [rsp + 0xe0], 0
je 0x140014eca
xor eax, eax
mov word [rsp + 0xf8], ax
xor eax, eax
mov word [rsp + 0x100], ax
xor eax, eax
mov word [rsp + 0x104], ax
mov dword [rsp + 0xfc], 0
lea r8, [rsp + 0xfc]
lea rdx, [rsp + 0x104]
mov rcx, qword [rsp + 0xf0]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x140014e3a
jmp 0x140014ef8
movzx eax, word [rsp + 0x104]
and eax, 0x400
test eax, eax
je 0x140014e6a
mov eax, 0x500
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
jmp 0x140014e98
movzx eax, word [rsp + 0x104]
and eax, 0x1000
test eax, eax
je 0x140014e98
mov eax, 0x1000
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
movzx eax, word [rsp + 0xf8]
test eax, eax
je 0x140014eca
movzx r8d, word [rsp + 0x100]
movzx edx, word [rsp + 0xf8]
lea rcx, [rsp + 0xb8]
call qword [rsp + 0xe0]
test eax, eax
jne 0x140014eca
jmp 0x140014ef8
lea r8, [rsp + 0xb8]
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x140014eed
jmp 0x140014ef8
mov dword [rsp + 0x88], 1
cmp qword [rsp + 0xb0], 0
je 0x140014f1c
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xb0]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x58], 0
je 0x140014f3a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0xf0], 0
je 0x140014f5e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xf0]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0xa0], 0
je 0x140014f82
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xa0]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [rsp + 0x88]
add rsp, 0x110
pop rbx
ret