Function at 0x140031400
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 0x14003151c
jmp 0x140031b18
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x14003152c
jmp 0x140031b18
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 0x140031562
jmp 0x140031b18
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 0x140031595
jmp 0x140031b18
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 0x1400315ef
jmp 0x140031b18
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 0x140031634
jmp 0x140031b18
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140031644
jmp 0x140031b18
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 0x14003167a
jmp 0x140031b18
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 0x1400316c2
jmp 0x140031b18
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1400316de
jmp 0x140031b18
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 0x140031704
jmp 0x140031b18
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x44], 8
cmp qword [rsp + 0x78], 0
jne 0x14003172c
mov dword [rsp + 0x6c], 0
cmp dword [rsp + 0x6c], 0
je 0x140031758
mov r9d, 2
mov r8d, reloc.WS2_32.dll_inet_ntoa
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x140031758
jmp 0x140031b18
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 0x1400317ae
jmp 0x140031b18
mov r8d, 2
mov edx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x1400317d2
jmp 0x140031b18
mov dword [rsp + 0x90], 0
cmp dword [rsp + 0x6c], 0
je 0x1400318ac
cmp dword [rsp + 0x40], 0
je 0x1400318ac
mov dword [rsp + 0x50], 0
jmp 0x140031808
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x1400318ac
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 0x140031833
jmp 0x140031b18
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 1]
and eax, 0x10
test eax, eax
je 0x140031845
jmp 0x1400318ac
mov rdx, qword [rsp + 0x60]
add rdx, 8
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140031862
jmp 0x1400317fd
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 0x140031896
jmp 0x140031b18
mov eax, dword [rsp + 0x90]
add eax, 1
mov dword [rsp + 0x90], eax
jmp 0x1400317fd
lea rcx, [0x14029a010]
call fcn.140032ab0
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 0x14003190c
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 0x14003190a
jmp 0x140031b18
jmp 0x140031938
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 0x140031938
jmp 0x140031b18
cmp dword [rsp + 0x6c], 0
je 0x1400319b0
cmp dword [rsp + 0x40], 0
je 0x1400319b0
jmp 0x140031953
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x1400319b0
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 0x14003197a
jmp 0x140031b18
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 0x1400319ae
jmp 0x140031b18
jmp 0x140031948
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 0x1400319d7
jmp 0x140031b18
lea rcx, [0x14029a010]
call fcn.140032ab0
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 0x140031aea
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 0x140031a5a
jmp 0x140031b18
movzx eax, word [rsp + 0x104]
and eax, 0x400
test eax, eax
je 0x140031a8a
mov eax, 0x500
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
jmp 0x140031ab8
movzx eax, word [rsp + 0x104]
and eax, 0x1000
test eax, eax
je 0x140031ab8
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 0x140031aea
movzx r8d, word [rsp + 0x100]
movzx edx, word [rsp + 0xf8]
lea rcx, [rsp + 0xb8]
call qword [rsp + 0xe0]
test eax, eax
jne 0x140031aea
jmp 0x140031b18
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 0x140031b0d
jmp 0x140031b18
mov dword [rsp + 0x88], 1
cmp qword [rsp + 0xb0], 0
je 0x140031b3c
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 0x140031b5a
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 0x140031b7e
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 0x140031ba2
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