Function at 0x140014590
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 [0x140035460]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r13, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rcx, qword [0x140036bc0]
call fcn.140015430
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.140012dd0
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 0x14001466a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400149d1
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 0x1400146ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400149d1
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
jne 0x14001472c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400149d1
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140014767
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400149d1
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 0x1400147a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x1400149d1
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.1400143d0
cmp eax, 1
jne 0x1400149d1
mov r13d, dword [rbp - 0x31]
add r13d, 2
mov eax, 2
mul r13
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.140017018
mov rbx, rax
test rax, rax
je 0x1400149be
lea r8, [r13 + r13]
xor edx, edx
mov rcx, rax
call fcn.140015ef0
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x39]
mov edx, r13d
mov rcx, rbx
call fcn.140017c10
lea edx, [r14 + 0x5d]
mov rcx, rbx
call fcn.140017810
mov r13, rax
sub r13, rbx
sar r13, 1
inc r13
je 0x1400149b5
mov eax, 2
mul r13
cmovo rax, r14
mov rcx, rax
call fcn.140017018
mov rdi, rax
test rax, rax
je 0x1400149ac
lea r8, [r13 + r13]
xor edx, edx
mov rcx, rax
call fcn.140015ef0
lea r9, [r13 - 1]
mov r8, rbx
mov rdx, r13
mov rcx, rdi
call fcn.140017c10
test eax, eax
jne 0x14001498e
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400148c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400148c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400149d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
jmp 0x140014904
mov r8, rdi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x140036bc0]
call fcn.140015980
lea rdx, [rbp + 7]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001491f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001491f
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 [0x140036bc0]
call fcn.140015980
jmp 0x1400149d1
mov r8, rbx
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov esi, 1
mov rcx, rbx
call fcn.1400141d0
mov rcx, qword [0x140036bc0]
test al, al
lea rdx, str.Correctly_set_Low_Integrity_Label_n
jne 0x14001495b
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.140015980
call fcn.140013e90
test al, al
je 0x1400149d1
mov rcx, rbx
call fcn.1400142d0
mov rcx, qword [0x140036bc0]
test al, al
je 0x140014985
lea rdx, str.Correctly_set_All_Application_Packages_permissions_n
jmp 0x1400149cc
lea rdx, str.WARNING:_Failed_to_set_All_Application_Packages_permissions_n
jmp 0x1400149cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x140036bc0]
call fcn.140015980
jmp 0x1400149d1
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x1400149c5
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x1400149c5
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x140036bc0]
call fcn.140015980
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x1400149e0
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x1400149ef
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r12, r12
je 0x1400149fd
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x140014a0a
mov rcx, rdi
call fcn.140016fa0
test rbx, rbx
je 0x140014a17
mov rcx, rbx
call fcn.140016fa0
mov rcx, qword [0x140036bc0]
call fcn.140015470
mov r8d, esi
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x140036bc0]
call fcn.140015980
nop
lea rcx, [rbp - 0x39]
call fcn.140013000
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400167a0
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