Function at 0x140001420
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x120]
sub rsp, 0x220
mov rax, qword [0x1400bb4a8]
xor rax, rsp
mov qword [rbp + 0x110], rax
mov rbx, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [0x1400bc2d8]
call fcn.140003f60
mov dword [rbp - 0x20], 0
mov word [rbp - 0x1c], 0x100
xor r12d, r12d
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov r14d, r12d
mov r15d, r12d
lea rcx, [rbp - 0x78]
call fcn.140027560
nop
mov edi, r12d
mov esi, r12d
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
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
mov dl, 1
lea rcx, [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x140001508
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x44], xmm0
mov qword [rbp - 0x30], 4
mov dword [rbp - 0x50], 0x10000000
mov dword [rbp - 0x4c], 1
mov dword [rbp - 0x48], 3
mov dword [rbp - 0x34], r12d
mov rax, qword [rsp + 0x78]
mov qword [rbp - 0x28], rax
lea r9, [rbp - 0x80]
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea ecx, [r8 + 1]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x140001574
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x1400015ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1400015de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
xor r9d, r9d
mov r8, qword [rbp - 0x80]
lea edx, [r9 + 1]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x140001617
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
mov dword [rbp - 0x68], 0x18
mov qword [rbp - 0x60], r14
mov dword [rbp - 0x58], 1
lea rdx, [rbp - 0x78]
mov rcx, rbx
call fcn.140001d00
cmp eax, 1
jne 0x140001a0e
mov ebx, dword [rbp - 0x70]
add ebx, 2
mov eax, 2
mul rbx
mov r13, 0xffffffffffffffff
cmovo rax, r13
mov rcx, rax
call fcn.14002833c
mov rdi, rax
test rax, rax
je 0x1400019fb
lea r8, [rbx + rbx]
xor edx, edx
mov rcx, rax
call fcn.14002b5b0
mov r9d, dword [rbp - 0x70]
mov r8, qword [rbp - 0x78]
mov edx, ebx
mov rcx, rdi
call fcn.140039d40
lea edx, [r13 + 0x5d]
mov rcx, rdi
call fcn.14002a240
mov rbx, rax
sub rbx, rdi
sar rbx, 1
add rbx, 1
je 0x1400019f2
mov eax, 2
mul rbx
cmovo rax, r13
mov rcx, rax
call fcn.14002833c
mov rsi, rax
test rax, rax
je 0x1400019e9
lea r8, [rbx + rbx]
xor edx, edx
mov rcx, rax
call fcn.14002b5b0
lea r9, [rbx - 1]
mov r8, rdi
mov rdx, rbx
mov rcx, rsi
call fcn.140039d40
test eax, eax
jne 0x1400019cb
lea rdx, [rbp - 0x68]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140001745
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001745
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001a0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
mov r9d, eax
lea rdx, str.WARNING:_Creating_the_folder__s_failed__error___u_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
mov r8, rsi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rdx, [rbp - 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140001784
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001784
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
jmp 0x14000172a
mov r8, rdi
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov r15d, 1
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x64], r12d
mov dword [rsp + 0x60], r12d
xor r9d, r9d
lea r8, [rsp + 0x68]
mov edx, r15d
lea rcx, str.S:_ML_OICI_NW___LW_
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
je 0x14000184e
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x64]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x140001823
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov edx, r15d
lea r8d, [r15 + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov ebx, eax
test eax, eax
je 0x140001841
lea rdx, str.SetNamedSecurityInfoW_Error__u_n
jmp 0x140001832
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.GetSecurityDescriptorSacl_Error__u_n
mov r8d, eax
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000186c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8d, eax
lea rdx, str.ConvertStringSecurityDescriptorToSecurityDescriptorW_Error__u_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [0x1400bc2d8]
test ebx, ebx
lea rdx, str.Correctly_set_Low_Integrity_Label_n
je 0x140001885
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.140003dd0
xor edx, edx
mov r8d, 0x11c
lea rcx, [rbp - 0x10]
call fcn.14002b5b0
mov dword [rbp - 0xc], 6
mov dword [rbp - 8], 2
mov r8b, 3
mov edx, 2
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, r15d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8, rax
mov edx, 2
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x140001a0e
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x60], r12d
mov dword [rsp + 0x64], r12d
xor r9d, r9d
lea r8, [rsp + 0x68]
mov edx, r15d
lea rcx, str.D:_A_CIOI_GA___WD__A_CIOI_GA___AC_
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
je 0x140001990
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x140001965
mov qword [rsp + 0x30], r12
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov edx, r15d
lea r8d, [r9 + 4]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov ebx, eax
test eax, eax
je 0x140001983
lea rdx, str.SetNamedSecurityInfoW_Error__u_n
jmp 0x140001974
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.GetSecurityDescriptorDacl_Error__u_n
mov r8d, eax
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400019ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8d, eax
lea rdx, str.ConvertStringSecurityDescriptorToSecurityDescriptorW_Error__u_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [0x1400bc2d8]
test ebx, ebx
jne 0x1400019c2
lea rdx, str.Correctly_set_Everyone_permissions_n
jmp 0x140001a09
lea rdx, str.WARNING:_Failed_to_set_Everyone_permissions_n
jmp 0x140001a09
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140001a0e
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x140001a02
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x140001a02
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140001a1e
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140001a2d
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14, r14
je 0x140001a3b
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x140001a48
mov rcx, rsi
call fcn.140028344
test rdi, rdi
je 0x140001a55
mov rcx, rdi
call fcn.140028344
mov rcx, qword [0x1400bc2d8]
call fcn.140003fa0
mov r8d, r15d
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
nop
lea rcx, [rbp - 0x78]
call fcn.140027e00
nop
mov eax, r15d
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.140028460
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret