Function at 0x140005788
Capabilities:
Create directory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
xor ebx, ebx
mov dword [rsp + 0x98], 1
mov qword [rax + 0x20], rbx
mov rbp, rcx
mov r15d, ebx
test rcx, rcx
je 0x140005b0a
cmp bx, word [rcx]
je 0x140005b0a
lea rdx, [rax + 0x20]
call fcn.140005448
mov rsi, rax
test rax, rax
je 0x140005ae8
or r14, 0xffffffffffffffff
mov qword [rsp + 0x30], rbx
mov rax, r14
mov dword [rsp + 0xa0], ebx
mov r12d, ebx
mov r13d, ebx
inc rax
cmp word [rsi + rax*2], bx
jne 0x1400057f6
cmp rax, 2
mov ecx, ebx
setae cl
jb 0x14000582d
mov r8d, 2
lea rdx, [0x140029ac8]
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
mov ecx, ebx
sete cl
mov edx, 0x5c
test ecx, ecx
je 0x140005a0e
lea rcx, [rsi + 4]
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
jne 0x1400058da
mov edi, 0x8007000d
movzx ecx, di
mov dword [rsp + 0x98], ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rdi, qword [rsp + 0xa8]
mov r14d, dword [rsp + 0x98]
mov r12d, 1
cmp r14d, r12d
jne 0x140005a98
lea r13d, [r12 + 0x5b]
mov edx, r13d
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x140005a56
mov rcx, rsi
mov word [rax], bx
call fcn.140004e8c
test eax, eax
jne 0x1400058d0
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop dword [rax + rax]
mov word [rdi], r13w
add rdi, 2
jmp 0x140005892
mov rbp, rbx
mov rdi, r14
inc rdi
cmp word [rsi + rdi*2], bx
jne 0x1400058e0
mov edx, 0x5c
lea rcx, [rax + 2]
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
jne 0x140005907
mov eax, edi
jmp 0x14000590d
sub rax, rsi
sar rax, 1
mov edi, 0x8007000e
mov rcx, r14
inc rcx
cmp word [rsi + rcx*2], bx
jne 0x140005915
cmp rax, rcx
ja 0x140005975
mov rcx, qword gs:[0x60]
lea r12, [rax + 1]
lea r8, [r12 + r12]
mov edx, 8
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rbp, rax
test rax, rax
je 0x140005966
lea r9, [r12 - 1]
mov r8, rsi
mov rdx, r12
mov rcx, rax
call fcn.140003a3c
mov edi, eax
mov r12, qword [rsp + 0x30]
mov r13d, dword [rsp + 0xa0]
jmp 0x14000597a
mov edi, 0x80070057
test edi, edi
js 0x14000598a
mov r12, rbp
mov r13d, 1
mov rbp, rbx
test rbp, rbp
je 0x1400059af
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rbp, qword [rsp + 0x90]
mov edx, 0x5c
test edi, edi
js 0x140005858
cmp r13d, 1
jne 0x140005a12
inc r14
cmp word [r12 + r14*2], bx
jne 0x1400059ca
mov rax, qword [rsp + 0xa8]
lea rdi, [rax + r14*2]
test r12, r12
je 0x140005876
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140005876
mov edi, ebx
jmp 0x1400059bc
mov rdi, qword [rsp + 0xa8]
movzx ecx, word [rdi]
lea eax, [rcx - 0x61]
cmp ax, 0x19
jbe 0x140005a34
sub cx, 0x41
cmp cx, 0x19
ja 0x140005876
mov eax, 0x3a
cmp ax, word [rdi + 2]
jne 0x140005876
cmp dx, word [rdi + 4]
jne 0x140005876
add rdi, 8
jmp 0x140005876
cmp r14d, r12d
jne 0x140005a98
mov rcx, rsi
call fcn.140004e8c
cmp eax, r12d
je 0x140005a93
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop dword [rax + rax]
cmp eax, r12d
je 0x140005a93
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea r8, str.CreatePath:_Unable_to_create___s___GLE__0x_x
jmp 0x140005aab
mov ebx, r12d
jmp 0x140005ac6
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea r8, str.CreatePath:_Unable_to_create_parent_directory_for___s___GLE__0x_x
mov r9, rbp
mov dword [rsp + 0x20], eax
mov edx, 0x3000000
lea rcx, [0x1400356a8]
mov r15d, eax
call fcn.140003040
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140005af7
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r15d, eax
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, ebx
jmp 0x140005b1d
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret