Function at 0x140015590
Capabilities:
Create directory

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov qword [rbp + 0x1f], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140036460]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r13, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rcx, qword [0x140037bc0]
call fcn.140016430
mov dword [rbp + 0x27], 0
mov word [rbp + 0x2b], 0x100
xor esi, esi
mov qword [rbp - 0x41], rsi
mov qword [rbp - 0x49], rsi
mov r12d, esi
lea rcx, [rbp - 0x39]
call fcn.140013dd0
nop
lea rax, [rbp - 0x41]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x27]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x14001566a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400159d1
xor eax, eax
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov dword [rbp - 0x29], 0x10000000
mov dword [rbp - 0x25], 1
mov dword [rbp - 0x21], 3
mov dword [rbp - 0xd], esi
mov dword [rbp - 9], 4
mov rax, qword [rbp - 0x41]
mov qword [rbp - 1], rax
lea r9, [rbp - 0x49]
xor r8d, r8d
lea rdx, [rbp - 0x29]
lea ecx, [r8 + 1]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x1400156ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400159d1
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
jne 0x14001572c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400159d1
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140015767
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400159d1
xor r9d, r9d
mov r8, qword [rbp - 0x49]
lea edx, [r9 + 1]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x1400157a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400159d1
mov dword [rbp + 7], 0x18
mov qword [rbp + 0xf], r12
mov dword [rbp + 0x17], 1
mov rbx, rsi
mov rdi, rsi
lea rdx, [rbp - 0x39]
mov rcx, r13
call fcn.1400153d0
cmp eax, 1
jne 0x1400159d1
mov r13d, dword [rbp - 0x31]
add r13d, 2
mov eax, 2
mul r13
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.140018018
mov rbx, rax
test rax, rax
je 0x1400159be
lea r8, [r13 + r13]
xor edx, edx
mov rcx, rax
call fcn.140016ef0
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x39]
mov edx, r13d
mov rcx, rbx
call fcn.140018c10
lea edx, [r14 + 0x5d]
mov rcx, rbx
call fcn.140018810
mov r13, rax
sub r13, rbx
sar r13, 1
inc r13
je 0x1400159b5
mov eax, 2
mul r13
cmovo rax, r14
mov rcx, rax
call fcn.140018018
mov rdi, rax
test rax, rax
je 0x1400159ac
lea r8, [r13 + r13]
xor edx, edx
mov rcx, rax
call fcn.140016ef0
lea r9, [r13 - 1]
mov r8, rbx
mov rdx, r13
mov rcx, rdi
call fcn.140018c10
test eax, eax
jne 0x14001598e
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400158c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400158c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400159d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
jmp 0x140015904
mov r8, rdi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x140037bc0]
call fcn.140016980
lea rdx, [rbp + 7]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001591f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001591f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rbx
mov r9d, eax
lea rdx, str.WARNING:_Creating_the_folder__s_failed__error___u_n
mov rcx, qword [0x140037bc0]
call fcn.140016980
jmp 0x1400159d1
mov r8, rbx
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov esi, 1
mov rcx, rbx
call fcn.1400151d0
mov rcx, qword [0x140037bc0]
test al, al
lea rdx, str.Correctly_set_Low_Integrity_Label_n
jne 0x14001595b
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.140016980
call fcn.140014e90
test al, al
je 0x1400159d1
mov rcx, rbx
call fcn.1400152d0
mov rcx, qword [0x140037bc0]
test al, al
je 0x140015985
lea rdx, str.Correctly_set_All_Application_Packages_permissions_n
jmp 0x1400159cc
lea rdx, str.WARNING:_Failed_to_set_All_Application_Packages_permissions_n
jmp 0x1400159cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x140037bc0]
call fcn.140016980
jmp 0x1400159d1
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x1400159c5
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x1400159c5
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x140037bc0]
call fcn.140016980
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x1400159e0
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x1400159ef
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r12, r12
je 0x1400159fd
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x140015a0a
mov rcx, rdi
call fcn.140017fa0
test rbx, rbx
je 0x140015a17
mov rcx, rbx
call fcn.140017fa0
mov rcx, qword [0x140037bc0]
call fcn.140016470
mov r8d, esi
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x140037bc0]
call fcn.140016980
nop
lea rcx, [rbp - 0x39]
call fcn.140014000
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400177a0
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret