Function at 0x140022b30
Capabilities:
Create directory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
xor r13d, r13d
xor r12b, r12b
mov qword [rax + 0x18], r13
mov esi, r13d
mov qword [rax + 0x10], r13
mov r15d, r13d
call fcn.140042340
mov rdi, rax
mov rcx, rdi
call fcn.140042c20
lea rcx, [0x140084158]
mov rbx, rax
call fcn.140042c20
cmp rax, rbx
jg 0x140022c21
sub rbx, rax
mov byte [rsp + 0x30], sil
mov qword [rsp + 0x28], rax
lea r9, [0x140084158]
mov rdx, rbx
mov qword [rsp + 0x20], r13
mov r8, rax
mov rcx, rdi
call fcn.140042650
test eax, eax
jne 0x140022c21
mov rcx, rdi
call fcn.140042c20
lea rcx, [0x140083cd8]
mov rbx, rax
call fcn.140042c20
cmp rax, rbx
jg 0x140022c21
sub rbx, rax
mov byte [rsp + 0x30], sil
mov qword [rsp + 0x28], rax
lea r9, [0x140083cd8]
mov rdx, rbx
mov qword [rsp + 0x20], r13
mov r8, rax
mov rcx, rdi
call fcn.140042650
test eax, eax
jne 0x140022c21
mov rcx, rdi
call fcn.140042c20
xor edx, edx
mov rcx, rdi
lea r8, [rax - 1]
call fcn.140042ce0
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
jmp 0x140022b65
mov edx, 1
mov rcx, rdi
call fcn.140042350
lea rcx, [rsp + 0xd0]
mov r14, rax
call fcn.140022510
mov rbp, qword [rsp + 0xd0]
test al, al
je 0x140022e07
lea rcx, [rsp + 0xc8]
call fcn.1400223c0
mov rsi, qword [rsp + 0xc8]
test al, al
je 0x140022e07
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
add eax, 0x18
add ebx, eax
mov ecx, ebx
call fcn.140020af0
mov r8d, 2
mov edx, ebx
mov rcx, rax
mov r15, rax
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x140022caf
lea rcx, str._s:_Couldnt_init_ACL_n
jmp 0x140022e0e
mov edx, 2
mov qword [rsp + 0x20], rbp
mov r9d, 0x101f0000
mov rcx, r15
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
je 0x140022dfe
mov edx, 2
mov qword [rsp + 0x20], rsi
mov r9d, 0x101f0000
mov rcx, r15
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
je 0x140022dfe
mov edx, 1
lea rcx, [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140022d2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.W32Util_MakeSafeDirectory
lea rcx, str._s:_InitializeSecurityDescriptor_failed:__d_n
call fcn.14001bf60
jmp 0x140022e1a
xor r9d, r9d
lea rcx, [rsp + 0x58]
mov r8, r15
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x140022d68
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.W32Util_MakeSafeDirectory
lea rcx, str._s:_SetSecurityDescriptorOwner_failed:__d_n
call fcn.14001bf60
jmp 0x140022e1a
xor r8d, r8d
lea rcx, [rsp + 0x58]
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x140022d47
mov edx, 0x1000
lea rcx, [rsp + 0x58]
mov r8d, edx
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorControl]
test eax, eax
jne 0x140022db2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.W32Util_MakeSafeDirectory
lea rcx, str._s:_SetSecurityDescriptorControl_failed:__d_n
call fcn.14001bf60
jmp 0x140022e1a
lea rax, [rsp + 0x58]
mov dword [rsp + 0x40], 0x18
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
mov rcx, r14
mov dword [rsp + 0x50], r13d
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140022df9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.W32Util_MakeSafeDirectory
lea rcx, str._s:_CreateDirectoryW_failed:__d_n
call fcn.14001bf60
jmp 0x140022e1a
mov r12b, 1
jmp 0x140022e1a
lea rcx, str._s:_Couldnt_add_SID_to_DACL_n
jmp 0x140022e0e
lea rcx, str._s:_Couldnt_get_local_admin_or_user_SID_n
lea rdx, str.W32Util_MakeSafeDirectory
call fcn.14001bf60
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, r14
mov edi, dword [rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, rbp
mov dword [rax], edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0xc0]
movzx eax, r12b
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret