Function at 0x14001ea90
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 [0x140066360]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rcx, qword [0x140067de8]
call fcn.140020a60
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.14001e040
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 0x14001eb6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001eed0
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 0x14001ebed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001eed0
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x14001ec2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001eed0
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x14001ec67
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001eed0
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 0x14001eca8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rbx, qword [rbp + 0x27]
mov rdi, qword [rbp + 0x27]
jmp 0x14001eed0
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.14001f020
cmp eax, 1
jne 0x14001eed0
mov r15d, dword [rbp - 0x31]
add r15d, 2
mov eax, 2
mul r15
mov r12, 0xffffffffffffffff
cmovo rax, r12
mov rcx, rax
call fcn.1400223e8
mov rbx, rax
test rax, rax
je 0x14001eebd
lea r8, [r15 + r15]
xor edx, edx
mov rcx, rax
call fcn.140021bd0
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x39]
mov edx, r15d
mov rcx, rbx
call fcn.1400235d4
lea edx, [r12 + 0x5d]
mov rcx, rbx
call fcn.1400236a0
mov r15, rax
sub r15, rbx
sar r15, 1
inc r15
je 0x14001eeb4
mov eax, 2
mul r15
cmovo rax, r12
mov rcx, rax
call fcn.1400223e8
mov rdi, rax
test rax, rax
je 0x14001eeab
lea r8, [r15 + r15]
xor edx, edx
mov rcx, rax
call fcn.140021bd0
lea r9, [r15 - 1]
mov r8, rbx
mov rdx, r15
mov rcx, rdi
call fcn.1400235d4
test eax, eax
jne 0x14001ee8d
lea rdx, [rbp + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001edc6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001edc6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001eed0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
jmp 0x14001ee03
mov r8, rdi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
lea rdx, [rbp + 7]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x14001ee1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14001ee1e
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 [0x140067de8]
call fcn.1400208e0
jmp 0x14001eed0
mov r8, rbx
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov esi, 1
mov rcx, rbx
call fcn.14001f410
mov rcx, qword [0x140067de8]
test al, al
lea rdx, str.Correctly_set_Low_Integrity_Label_n
jne 0x14001ee5a
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.1400208e0
call fcn.14001f280
test al, al
je 0x14001eed0
mov rcx, rbx
call fcn.14001f310
mov rcx, qword [0x140067de8]
test al, al
je 0x14001ee84
lea rdx, str.Correctly_set_Everyone_permissions_n
jmp 0x14001eecb
lea rdx, str.WARNING:_Failed_to_set_Everyone_permissions_n
jmp 0x14001eecb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
jmp 0x14001eed0
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x14001eec4
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x14001eec4
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x14001eedf
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x14001eeee
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14, r14
je 0x14001eefc
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x14001ef09
mov rcx, rdi
call fcn.140022490
test rbx, rbx
je 0x14001ef16
mov rcx, rbx
call fcn.140022490
mov rcx, qword [0x140067de8]
call fcn.140020aa0
mov r8d, esi
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x140067de8]
call fcn.1400208e0
nop
lea rcx, [rbp - 0x39]
call fcn.14001e770
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400220e0
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