Function at 0x140050af0
Capabilities:
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x48
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov r12, rcx
xor edi, edi
mov dword [rbp + 0x50], edi
mov rbx, qword [0x140104018]
mov qword [rbp + 0x58], rbx
mov rcx, qword [rcx]
lea r14d, [rdi - 1]
cmp dword [rcx - 8], edi
jg 0x140050b34
mov eax, r14d
jmp 0x140050b4f
mov edx, 0x3a
call sub.VCRUNTIME140.dll_wcschr
test rax, rax
jne 0x140050b48
mov eax, r14d
jmp 0x140050b4f
sub rax, qword [r12]
sar rax, 1
lea esi, [rax + 2]
test eax, eax
cmovs esi, eax
nop word [rax + rax]
mov rcx, qword [r12]
test esi, esi
js 0x140050cf4
cmp esi, dword [rcx - 8]
jge 0x140050cf4
movsxd rax, esi
lea rcx, [rcx + rax*2]
mov edx, VarDateFromDisp
call sub.VCRUNTIME140.dll_wcschr
mov rsi, rax
test rax, rax
je 0x140050cf4
mov rax, qword [r12]
sub rsi, rax
sar rsi, 1
test esi, esi
js 0x140050cf7
mov r8d, dword [rax - 8]
mov rax, qword [0x140104018]
mov qword [rbp + 0x60], rax
or dword [rbp + 0x50], 1
cmp esi, r8d
cmovle r8d, esi
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea rdx, [rbp + 0x60]
mov rcx, r12
call fcn.140021dd0
mov rdi, qword [rbp + 0x60]
cmp rbx, rdi
je 0x140050cc5
lea rcx, [rbx - 0xc]
mov edx, dword [rcx]
mov rax, qword [0x140104010]
test edx, edx
jns 0x140050bf4
cmp rcx, rax
jne 0x140050c02
lea r15, [rdi - 0xc]
cmp dword [r15], 0
jge 0x140050c9b
movsxd r15, dword [rdi - 8]
cmp edx, 1
jg 0x140050c11
cmp r15d, dword [rbx - 4]
jle 0x140050c4a
cmp rcx, rax
je 0x140050c36
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050c27
call fcn.1400bf5e4
mov rax, qword [0x140104018]
mov qword [rbp + 0x58], rax
mov rdi, qword [rbp + 0x60]
mov edx, r15d
lea rcx, [rbp + 0x58]
call fcn.140001970
mov rbx, qword [rbp + 0x58]
test eax, eax
je 0x140050cc5
lea r13, [r15 + r15]
lea eax, [r15 + 1]
movsxd rdx, eax
add rdx, rdx
mov r9, r13
mov r8, rdi
mov rcx, rbx
call fcn.140018960
test eax, eax
je 0x140050c8e
cmp eax, 0xc
je 0x140050ee1
cmp eax, 0x16
je 0x140050ed6
cmp eax, 0x22
je 0x140050ed6
cmp eax, 0x50
jne 0x140050ecb
mov dword [rbx - 8], r15d
xor eax, eax
mov word [rbx + r13], ax
jmp 0x140050cc5
cmp rcx, rax
je 0x140050cb5
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050cb1
call fcn.1400bf5e4
mov rdi, qword [rbp + 0x60]
mov qword [rbp + 0x58], rdi
lock inc dword [r15]
mov rbx, qword [rbp + 0x58]
mov rdi, qword [rbp + 0x60]
and dword [rbp + 0x50], 0xfffffffe
lea rcx, [rdi - 0xc]
cmp rcx, qword [0x140104010]
je 0x140050ddf
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050ddb
call fcn.1400bf5e4
jmp 0x140050ddb
mov esi, r14d
mov rdi, qword [r12]
cmp rbx, rdi
je 0x140050ddf
lea rcx, [rbx - 0xc]
mov edx, dword [rcx]
mov rax, qword [0x140104010]
test edx, edx
jns 0x140050d1a
cmp rcx, rax
jne 0x140050d24
cmp dword [rdi - 0xc], 0
jge 0x140050db9
movsxd r15, dword [rdi - 8]
cmp edx, 1
jg 0x140050d33
cmp r15d, dword [rbx - 4]
jle 0x140050d68
cmp rcx, rax
je 0x140050d54
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050d49
call fcn.1400bf5e4
mov rax, qword [0x140104018]
mov qword [rbp + 0x58], rax
mov edx, r15d
lea rcx, [rbp + 0x58]
call fcn.140001970
mov rbx, qword [rbp + 0x58]
test eax, eax
je 0x140050ddf
lea r13, [r15 + r15]
lea eax, [r15 + 1]
movsxd rdx, eax
add rdx, rdx
mov r9, r13
mov r8, rdi
mov rcx, rbx
call fcn.140018960
test eax, eax
je 0x140050dac
cmp eax, 0xc
je 0x140050ec0
cmp eax, 0x16
je 0x140050ef7
cmp eax, 0x22
je 0x140050ef7
cmp eax, 0x50
jne 0x140050eec
mov dword [rbx - 8], r15d
xor edi, edi
mov word [rbx + r13], di
jmp 0x140050de1
cmp rcx, rax
je 0x140050dcf
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050dcf
call fcn.1400bf5e4
mov rax, qword [r12]
mov qword [rbp + 0x58], rax
lock inc dword [rax - 0xc]
mov rbx, qword [rbp + 0x58]
xor edi, edi
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140050dfd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140050e65
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x140050e65
cmp esi, 0xffffffff
je 0x140050e16
inc esi
jmp 0x140050b60
lea rcx, [rbx - 0xc]
cmp rcx, qword [0x140104010]
je 0x140050e35
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050e35
call fcn.1400bf5e4
nop
mov rax, qword [r12]
add rax, 0xfffffffffffffff4
cmp rax, qword [0x140104010]
je 0x140050e5e
lock xadd dword [rax], r14d
sub r14d, 1
jg 0x140050e5e
mov rcx, qword [r12]
sub rcx, 0xc
call fcn.1400bf5e4
mov eax, 1
jmp 0x140050eaf
lea rcx, [rbx - 0xc]
cmp rcx, qword [0x140104010]
je 0x140050e84
mov eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x140050e84
call fcn.1400bf5e4
nop
mov rax, qword [r12]
add rax, 0xfffffffffffffff4
cmp rax, qword [0x140104010]
je 0x140050ead
lock xadd dword [rax], r14d
sub r14d, 1
jg 0x140050ead
mov rcx, qword [r12]
sub rcx, 0xc
call fcn.1400bf5e4
xor eax, eax
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x8007000e
call fcn.140001ac0
nop
mov ecx, 0x80004005
call fcn.140001ac0
int3
mov ecx, 0x80070057
call fcn.140001ac0
int3
mov ecx, 0x8007000e
call fcn.140001ac0
nop
mov ecx, 0x80004005
call fcn.140001ac0
int3
mov ecx, 0x80070057
call fcn.140001ac0
int3