Function at 0x140031e70
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 + reloc.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x140031f8c
jmp 0x140032588
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140031f9c
jmp 0x140032588
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 0x140031fd2
jmp 0x140032588
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 0x140032005
jmp 0x140032588
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 + reloc.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x14003205f
jmp 0x140032588
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 0x1400320a4
jmp 0x140032588
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400320b4
jmp 0x140032588
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 0x1400320ea
jmp 0x140032588
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 0x140032132
jmp 0x140032588
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x14003214e
jmp 0x140032588
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 0x140032174
jmp 0x140032588
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x44], 8
cmp qword [rsp + 0x78], 0
jne 0x14003219c
mov dword [rsp + 0x6c], 0
cmp dword [rsp + 0x6c], 0
je 0x1400321c8
mov r9d, 2
mov r8d, 0xc
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x1400321c8
jmp 0x140032588
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 0x14003221e
jmp 0x140032588
mov r8d, 2
mov edx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x140032242
jmp 0x140032588
mov dword [rsp + 0x90], 0
cmp dword [rsp + 0x6c], 0
je 0x14003231c
cmp dword [rsp + 0x40], 0
je 0x14003231c
mov dword [rsp + 0x50], 0
jmp 0x140032278
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x14003231c
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 0x1400322a3
jmp 0x140032588
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 1]
and eax, 0x10
test eax, eax
je 0x1400322b5
jmp 0x14003231c
mov rdx, qword [rsp + 0x60]
add rdx, 8
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x1400322d2
jmp 0x14003226d
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 0x140032306
jmp 0x140032588
mov eax, dword [rsp + 0x90]
add eax, 1
mov dword [rsp + 0x90], eax
jmp 0x14003226d
lea rcx, str.advapi32.dll
call fcn.140032e20
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 0x14003237c
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 + 0x70]
test eax, eax
jne 0x14003237a
jmp 0x140032588
jmp 0x1400323a8
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 0x1400323a8
jmp 0x140032588
cmp dword [rsp + 0x6c], 0
je 0x140032420
cmp dword [rsp + 0x40], 0
je 0x140032420
jmp 0x1400323c3
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140032420
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 0x1400323ea
jmp 0x140032588
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 0x14003241e
jmp 0x140032588
jmp 0x1400323b8
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 0x140032447
jmp 0x140032588
lea rcx, str.advapi32.dll
call fcn.140032e20
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 0x14003255a
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 0x1400324ca
jmp 0x140032588
movzx eax, word [rsp + 0x104]
and eax, 0x400
test eax, eax
je 0x1400324fa
mov eax, 0x500
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
jmp 0x140032528
movzx eax, word [rsp + 0x104]
and eax, 0x1000
test eax, eax
je 0x140032528
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 0x14003255a
movzx r8d, word [rsp + 0x100]
movzx edx, word [rsp + 0xf8]
lea rcx, [rsp + 0xb8]
call qword [rsp + 0xe0]
test eax, eax
jne 0x14003255a
jmp 0x140032588
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 0x14003257d
jmp 0x140032588
mov dword [rsp + 0x88], 1
cmp qword [rsp + 0xb0], 0
je 0x1400325ac
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 0x1400325ca
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 0x1400325ee
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 0x140032612
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