Function at 0x14001df60
Capabilities:
Create directory

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
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 [0x140065340]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rcx, qword [0x140066dc8]
call int.14001ff90
mov dword [rbp + 0x27], 0
mov word [rbp + 0x2b], 0x100
xor esi, esi
mov qword [rbp - 0x41], rsi
mov qword [rbp - 0x49], rsi
mov r14d, esi
lea rcx, [rbp - 0x39]
call fcn.14001d510
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 0x14001e03a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001e3a0
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 0x14001e0bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001e3a0
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x14001e0fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001e3a0
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x14001e137
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001e3a0
xor r9d, r9d
mov r8, qword [rbp - 0x49]
lea edx, [r9 + 1]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x14001e178
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001e3a0
mov dword [rbp + 7], 0x18
mov qword [rbp + 0xf], r14
mov dword [rbp + 0x17], 1
mov rbx, rsi
mov rdi, rsi
lea rdx, [rbp - 0x39]
mov rcx, r15
call fcn.14001e4f0
cmp eax, 1
jne 0x14001e3a0
mov r15d, dword [rbp - 0x31]
add r15d, 2
mov eax, 2
mul r15
mov r12, 0xffffffffffffffff
cmovo rax, r12
mov rcx, rax
call fcn.1400218b8
mov rbx, rax
test rax, rax
je 0x14001e38d
lea r8, [r15 + r15]
xor edx, edx
mov rcx, rax
call fcn.140021100
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x39]
mov edx, r15d
mov rcx, rbx
call fcn.140022a78
lea edx, [r12 + 0x5d]
mov rcx, rbx
call fcn.140022b44
mov r15, rax
sub r15, rbx
sar r15, 1
inc r15
je 0x14001e384
mov eax, 2
mul r15
cmovo rax, r12
mov rcx, rax
call fcn.1400218b8
mov rdi, rax
test rax, rax
je 0x14001e37b
lea r8, [r15 + r15]
xor edx, edx
mov rcx, rax
call fcn.140021100
lea r9, [r15 - 1]
mov r8, rbx
mov rdx, r15
mov rcx, rdi
call fcn.140022a78
test eax, eax
jne 0x14001e35d
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001e296
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001e296
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001e3a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
jmp 0x14001e2d3
mov r8, rdi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
lea rdx, [rbp + 7]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001e2ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001e2ee
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 [0x140066dc8]
call fcn.14001fe10
jmp 0x14001e3a0
mov r8, rbx
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov esi, 1
mov rcx, rbx
call fcn.14001e8e0
mov rcx, qword [0x140066dc8]
test al, al
lea rdx, str.Correctly_set_Low_Integrity_Label_n
jne 0x14001e32a
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.14001fe10
call fcn.14001e750
test al, al
je 0x14001e3a0
mov rcx, rbx
call fcn.14001e7e0
mov rcx, qword [0x140066dc8]
test al, al
je 0x14001e354
lea rdx, str.Correctly_set_All_Application_Packages_permissions_n
jmp 0x14001e39b
lea rdx, str.WARNING:_Failed_to_set_All_Application_Packages_permissions_n
jmp 0x14001e39b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
jmp 0x14001e3a0
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x14001e394
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x14001e394
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x14001e3af
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x14001e3be
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14, r14
je 0x14001e3cc
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x14001e3d9
mov rcx, rdi
call fcn.140021960
test rbx, rbx
je 0x14001e3e6
mov rcx, rbx
call fcn.140021960
mov rcx, qword [0x140066dc8]
call fcn.14001ffd0
mov r8d, esi
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x140066dc8]
call fcn.14001fe10
nop
lea rcx, [rbp - 0x39]
call fcn.14001dc40
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400215b0
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret