Function at 0x140031bc0
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_LookupAccountNameA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x140031cdc
jmp 0x1400322d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140031cec
jmp 0x1400322d8
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 0x140031d22
jmp 0x1400322d8
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 0x140031d55
jmp 0x1400322d8
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_LookupAccountNameA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x140031daf
jmp 0x1400322d8
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_GetFileSecurityA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x140031df4
jmp 0x1400322d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140031e04
jmp 0x1400322d8
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 0x140031e3a
jmp 0x1400322d8
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_GetFileSecurityA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x140031e82
jmp 0x1400322d8
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140031e9e
jmp 0x1400322d8
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 0x140031ec4
jmp 0x1400322d8
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x44], 8
cmp qword [rsp + 0x78], 0
jne 0x140031eec
mov dword [rsp + 0x6c], 0
cmp dword [rsp + 0x6c], 0
je 0x140031f18
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 0x140031f18
jmp 0x1400322d8
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 0x140031f6e
jmp 0x1400322d8
mov r8d, 2
mov edx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x140031f92
jmp 0x1400322d8
mov dword [rsp + 0x90], 0
cmp dword [rsp + 0x6c], 0
je 0x14003206c
cmp dword [rsp + 0x40], 0
je 0x14003206c
mov dword [rsp + 0x50], 0
jmp 0x140031fc8
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x14003206c
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 0x140031ff3
jmp 0x1400322d8
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 1]
and eax, 0x10
test eax, eax
je 0x140032005
jmp 0x14003206c
mov rdx, qword [rsp + 0x60]
add rdx, 8
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140032022
jmp 0x140031fbd
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 0x140032056
jmp 0x1400322d8
mov eax, dword [rsp + 0x90]
add eax, 1
mov dword [rsp + 0x90], eax
jmp 0x140031fbd
lea rcx, str.advapi32.dll
call fcn.140032b70
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 0x1400320cc
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 0x1400320ca
jmp 0x1400322d8
jmp 0x1400320f8
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 0x1400320f8
jmp 0x1400322d8
cmp dword [rsp + 0x6c], 0
je 0x140032170
cmp dword [rsp + 0x40], 0
je 0x140032170
jmp 0x140032113
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140032170
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 0x14003213a
jmp 0x1400322d8
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 0x14003216e
jmp 0x1400322d8
jmp 0x140032108
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 0x140032197
jmp 0x1400322d8
lea rcx, str.advapi32.dll
call fcn.140032b70
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 0x1400322aa
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 0x14003221a
jmp 0x1400322d8
movzx eax, word [rsp + 0x104]
and eax, 0x400
test eax, eax
je 0x14003224a
mov eax, 0x500
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
jmp 0x140032278
movzx eax, word [rsp + 0x104]
and eax, 0x1000
test eax, eax
je 0x140032278
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 0x1400322aa
movzx r8d, word [rsp + 0x100]
movzx edx, word [rsp + 0xf8]
lea rcx, [rsp + 0xb8]
call qword [rsp + 0xe0]
test eax, eax
jne 0x1400322aa
jmp 0x1400322d8
lea r8, [rsp + 0xb8]
mov edx, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x1400322cd
jmp 0x1400322d8
mov dword [rsp + 0x88], 1
cmp qword [rsp + 0xb0], 0
je 0x1400322fc
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 0x14003231a
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 0x14003233e
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 0x140032362
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