Function at 0x1400316b0
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_LookupAccountNameW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x1400317cc
jmp 0x140031dc8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400317dc
jmp 0x140031dc8
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 0x140031812
jmp 0x140031dc8
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 0x140031845
jmp 0x140031dc8
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_LookupAccountNameW]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
jne 0x14003189f
jmp 0x140031dc8
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 0x1400318e4
jmp 0x140031dc8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400318f4
jmp 0x140031dc8
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 0x14003192a
jmp 0x140031dc8
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 0x140031972
jmp 0x140031dc8
mov edx, 1
lea rcx, [rsp + 0xb8]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x14003198e
jmp 0x140031dc8
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 0x1400319b4
jmp 0x140031dc8
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x44], 8
cmp qword [rsp + 0x78], 0
jne 0x1400319dc
mov dword [rsp + 0x6c], 0
cmp dword [rsp + 0x6c], 0
je 0x140031a08
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 0x140031a08
jmp 0x140031dc8
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 0x140031a5e
jmp 0x140031dc8
mov r8d, 2
mov edx, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x140031a82
jmp 0x140031dc8
mov dword [rsp + 0x90], 0
cmp dword [rsp + 0x6c], 0
je 0x140031b5c
cmp dword [rsp + 0x40], 0
je 0x140031b5c
mov dword [rsp + 0x50], 0
jmp 0x140031ab8
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140031b5c
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 0x140031ae3
jmp 0x140031dc8
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 1]
and eax, 0x10
test eax, eax
je 0x140031af5
jmp 0x140031b5c
mov rdx, qword [rsp + 0x60]
add rdx, 8
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140031b12
jmp 0x140031aad
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 0x140031b46
jmp 0x140031dc8
mov eax, dword [rsp + 0x90]
add eax, 1
mov dword [rsp + 0x90], eax
jmp 0x140031aad
lea rcx, [0x14008d7e8]
call fcn.140032d60
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 0x140031bbc
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 0x140031bba
jmp 0x140031dc8
jmp 0x140031be8
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 0x140031be8
jmp 0x140031dc8
cmp dword [rsp + 0x6c], 0
je 0x140031c60
cmp dword [rsp + 0x40], 0
je 0x140031c60
jmp 0x140031c03
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x50], eax
jae 0x140031c60
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 0x140031c2a
jmp 0x140031dc8
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 0x140031c5e
jmp 0x140031dc8
jmp 0x140031bf8
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 0x140031c87
jmp 0x140031dc8
lea rcx, [0x14008d7e8]
call fcn.140032d60
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 0x140031d9a
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 0x140031d0a
jmp 0x140031dc8
movzx eax, word [rsp + 0x104]
and eax, 0x400
test eax, eax
je 0x140031d3a
mov eax, 0x500
mov word [rsp + 0xf8], ax
movzx eax, word [rsp + 0xf8]
mov word [rsp + 0x100], ax
jmp 0x140031d68
movzx eax, word [rsp + 0x104]
and eax, 0x1000
test eax, eax
je 0x140031d68
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 0x140031d9a
movzx r8d, word [rsp + 0x100]
movzx edx, word [rsp + 0xf8]
lea rcx, [rsp + 0xb8]
call qword [rsp + 0xe0]
test eax, eax
jne 0x140031d9a
jmp 0x140031dc8
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 0x140031dbd
jmp 0x140031dc8
mov dword [rsp + 0x88], 1
cmp qword [rsp + 0xb0], 0
je 0x140031dec
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 0x140031e0a
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 0x140031e2e
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 0x140031e52
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