Function at 0x140001470
Capabilities:
Create directory

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x148]
sub rsp, 0x220
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1400a7430]
xor rax, rsp
mov qword [rbp + 0x110], rax
mov rsi, rcx
lea rdx, str.Entering__CreateDrsFolder__function....._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [0x1400a8248]
call fcn.140004290
mov dword [rbp - 0x18], 0
mov word [rbp - 0x14], 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.140027250
nop
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 - 0x18]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x140001561
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_AllocateAndInitializeSid_Error__u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rbx, qword [rbp - 0x18]
mov rdi, qword [rbp - 0x18]
jmp 0x140001a9a
xor eax, eax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x68], 0x10000000
mov dword [rbp - 0x64], 1
mov dword [rbp - 0x60], 3
mov dword [rbp - 0x4c], r12d
mov dword [rbp - 0x48], 4
mov rax, qword [rsp + 0x78]
mov qword [rbp - 0x40], rax
lea r9, [rbp - 0x80]
xor r8d, r8d
lea rdx, [rbp - 0x68]
lea ecx, [r8 + 1]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x1400015e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetEntriesInAcl_Error__u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rbx, qword [rbp - 0x18]
mov rdi, qword [rbp - 0x18]
jmp 0x140001a9a
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
jne 0x140001621
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_LocalAlloc_Error__u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rbx, qword [rbp - 0x18]
mov rdi, qword [rbp - 0x18]
jmp 0x140001a9a
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x14000165c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_InitializeSecurityDescriptor_Error__u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rbx, qword [rbp - 0x18]
mov rdi, qword [rbp - 0x18]
jmp 0x140001a9a
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 0x14000169d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:_SetSecurityDescriptorDacl_Error__u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rbx, qword [rbp - 0x18]
mov rdi, qword [rbp - 0x18]
jmp 0x140001a9a
mov dword [rbp - 0x38], 0x18
mov qword [rbp - 0x30], r14
mov dword [rbp - 0x28], 1
mov rbx, r12
mov rdi, r12
lea rdx, [rbp - 0x78]
mov rcx, rsi
call fcn.140002090
cmp eax, 1
jne 0x140001a9a
mov esi, dword [rbp - 0x70]
add esi, 2
mov eax, 2
mul rsi
mov r13, 0xffffffffffffffff
cmovo rax, r13
mov rcx, rax
call fcn.140027e6c
mov rbx, rax
test rax, rax
je 0x140001a87
lea r8, [rsi + rsi]
xor edx, edx
mov rcx, rax
call fcn.14002a530
mov r9d, dword [rbp - 0x70]
mov r8, qword [rbp - 0x78]
mov edx, esi
mov rcx, rbx
call fcn.140034ba0
lea edx, [r13 + 0x5d]
mov rcx, rbx
call fcn.140029b68
mov rsi, rax
sub rsi, rbx
sar rsi, 1
add rsi, 1
je 0x140001a7e
mov eax, 2
mul rsi
cmovo rax, r13
mov rcx, rax
call fcn.140027e6c
mov rdi, rax
test rax, rax
je 0x140001a75
lea r8, [rsi + rsi]
xor edx, edx
mov rcx, rax
call fcn.14002a530
lea r9, [rsi - 1]
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.140034ba0
test eax, eax
jne 0x140001a57
lea rdx, [rbp - 0x38]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400017d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400017d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001a9a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
mov r9d, eax
lea rdx, str.WARNING:_Creating_the_folder__s_failed__error___u_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x140001a9a
mov r8, rdi
lea rdx, str.Created_or_already_created_the_folder__s_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rdx, [rbp - 0x38]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140001810
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001810
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rbx
jmp 0x1400017b6
mov r8, rbx
lea rdx, str.Created_the_folder__s_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
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 0x1400018da
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 0x1400018af
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, rbx
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov esi, eax
test eax, eax
je 0x1400018cd
lea rdx, str.SetNamedSecurityInfoW_Error__u_n
jmp 0x1400018be
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea rdx, str.GetSecurityDescriptorSacl_Error__u_n
mov r8d, eax
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400018f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov r8d, eax
lea rdx, str.ConvertStringSecurityDescriptorToSecurityDescriptorW_Error__u_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [0x1400a8248]
test esi, esi
lea rdx, str.Correctly_set_Low_Integrity_Label_n
je 0x140001911
lea rdx, str.WARNING:_Failed_to_set_Low_Integrity_Label_n
call fcn.140004100
xor edx, edx
mov r8d, 0x11c
lea rcx, [rbp - 0x10]
call fcn.14002a530
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 0x140001a9a
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 0x140001a1c
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 0x1400019f1
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, rbx
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov esi, eax
test eax, eax
je 0x140001a0f
lea rdx, str.SetNamedSecurityInfoW_Error__u_n
jmp 0x140001a00
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea rdx, str.GetSecurityDescriptorDacl_Error__u_n
mov r8d, eax
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140001a3a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov r8d, eax
lea rdx, str.ConvertStringSecurityDescriptorToSecurityDescriptorW_Error__u_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [0x1400a8248]
test esi, esi
jne 0x140001a4e
lea rdx, str.Correctly_set_Everyone_permissions_n
jmp 0x140001a95
lea rdx, str.WARNING:_Failed_to_set_Everyone_permissions_n
jmp 0x140001a95
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WARNING:___tcsncpy_s__failed_with_error___u__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x140001a9a
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__PrePath___n
jmp 0x140001a8e
lea rdx, str.WARNING:_Failed_to_get_proper__PrePathLen___n
jmp 0x140001a8e
lea rdx, str.WARNING:_Failed_to_allocate_memory_for__Path___n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140001aaa
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140001ab9
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14, r14
je 0x140001ac7
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x140001ad4
mov rcx, rdi
call fcn.140027e74
test rbx, rbx
je 0x140001ae1
mov rcx, rbx
call fcn.140027e74
mov rcx, qword [0x1400a8248]
call fcn.1400042d0
mov r8d, r15d
lea rdx, str.Exiting__CreateDrsFolder__function.Return__d_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
nop
lea rcx, [rbp - 0x78]
call fcn.140027ab0
nop
mov eax, r15d
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.140027f90
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