Function at 0x180012b70
Capabilities:
Link many functions at runtime

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov rax, qword [0x180042010]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov r15, rdx
xor r12d, r12d
mov qword [r11 - 0x50], r12
mov ebx, r12d
mov qword [r11 - 0x48], r12
mov esi, r12d
mov dword [r11 - 0x40], ebx
mov word [r11 - 0x3c], 0x100
mov rax, qword [rcx]
mov rdi, qword [rax + 0x50]
mov qword [rsp + 0x68], rdi
test rdi, rdi
jne 0x180012bfc
xor eax, eax
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.180016920
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
lea rdx, str.InitializeSecurityDescriptor
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012daa
mov r13d, 1
mov edx, r13d
mov rcx, r15
call rax
test eax, eax
je 0x180012daa
lea rdx, str.AllocateAndInitializeSid
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012daa
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
movzx edx, r13b
lea rcx, [rsp + 0x88]
call rax
test eax, eax
je 0x180012daa
lea rdx, str.GetLengthSid
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012daa
mov rcx, qword [rsp + 0x78]
call rax
lea r14d, [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8d, r14d
lea edx, [r13 + 7]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x180012daa
lea rdx, str.InitializeAcl
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012daa
lea r8d, [r13 + 1]
mov edx, r14d
mov rcx, rbx
call rax
test eax, eax
je 0x180012daa
lea rdx, str.AddAccessAllowedAce
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012daa
mov r9, qword [rsp + 0x78]
lea edx, [r13 + 1]
mov r8d, 0x10000000
mov rcx, rbx
call rax
test eax, eax
je 0x180012daa
lea rdx, str.SetSecurityDescriptorDacl
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
test rax, rax
je 0x180012daa
mov r8, qword [rsp + 0x80]
test r8, r8
je 0x180012d91
xor r9d, r9d
mov edx, r13d
mov rcx, r15
call r14
test eax, eax
je 0x180012d7b
mov esi, r13d
mov dword [rsp + 0x60], r13d
cmp qword [rsp + 0x80], 0
jne 0x180012daa
jmp 0x180012d91
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsp + 0x80], r12
xor r9d, r9d
mov r8, rbx
mov edx, r13d
mov rcx, r15
call r14
test eax, eax
cmovne esi, r13d
mov dword [rsp + 0x60], esi
cmp qword [rsp + 0x78], 0
je 0x180012dd3
lea rdx, str.FreeSid
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180012dd3
mov rcx, qword [rsp + 0x78]
call rax
mov qword [rsp + 0x78], r12
test esi, esi
jne 0x180012e06
test rbx, rbx
je 0x180012df3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, r12
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x180012e06
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rax, rbx
jmp 0x180012bcf