Function at 0x140017220
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rsp + 0x90], rbx
mov r14, rcx
lea r13, [0x14021c758]
call fcn.14001a59c
mov rcx, rax
xor r15d, r15d
mov edx, r15d
test rax, rax
setne dl
test edx, edx
jne 0x140017274
mov ecx, 0x80004005
call fcn.140015cb0
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rbp + 0x58], rdi
mov rsi, r13
shr rsi, 0x10
test rsi, rsi
jne 0x1400172af
movzx ebx, r13w
mov ecx, ebx
call fcn.140019fac
test rax, rax
je 0x1400172c2
mov r8d, ebx
mov rdx, rax
lea rcx, [rbp + 0x58]
call fcn.1400124c0
jmp 0x1400172be
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp + 0x58]
call fcn.1400127f0
mov rdi, qword [rbp + 0x58]
movzx eax, word [rdi]
cmp ax, word [0x14021c758]
jne 0x1400172d3
mov eax, r15d
jmp 0x1400172d8
sbb eax, eax
or eax, 1
or r12d, 0xffffffff
test eax, eax
jne 0x14001735b
lea rdx, [rbp - 0x28]
mov rcx, r14
call fcn.140016d60
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x14001733f
cmp dword [rdi + 0x10], 0
jl 0x140017331
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140017331
call fcn.140012110
mov rbx, rax
lock add dword [rdi + 0x10], r12d
jg 0x140017327
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rbx + 0x18]
mov qword [rbp + 0x58], rax
jmp 0x14001733f
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp + 0x58]
call fcn.1400127f0
nop
mov rdx, qword [rbp - 0x28]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140017357
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdi, qword [rbp + 0x58]
call fcn.14001a59c
mov rdx, rax
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
jne 0x14001737b
mov ecx, 0x80004005
call fcn.140015cb0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x30], rbx
test rsi, rsi
jne 0x1400173b2
movzx esi, r13w
mov ecx, esi
call fcn.140019fac
test rax, rax
je 0x1400173c5
mov r8d, esi
mov rdx, rax
lea rcx, [rbp - 0x30]
call fcn.1400124c0
jmp 0x1400173c1
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp - 0x30]
call fcn.1400127f0
mov rbx, qword [rbp - 0x30]
mov r14d, r15d
mov dword [rbp + 0x48], r15d
mov esi, 1
lea rax, [rdi - 0x10]
mov qword [rbp - 0x18], rax
nop dword [rax]
test esi, esi
js 0x14001740b
cmp esi, dword [rax]
jg 0x14001740b
movsxd rax, esi
lea rcx, [rdi + rax*2]
lea rdx, [0x14021bf90]
call fcn.14019258c
mov rsi, rax
test rax, rax
je 0x14001740b
sub rsi, rdi
sar rsi, 1
jmp 0x14001740e
mov esi, r12d
inc esi
mov r8d, esi
lea rdx, [rbp - 0x20]
lea rcx, [rbp + 0x58]
call fcn.1400119e0
nop
mov r13, qword [rax]
lea rcx, [r13 - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je 0x140017551
cmp dword [rdi + 0x10], 0
jl 0x14001746c
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x14001746c
call fcn.140012110
mov rbx, rax
lock add dword [rdi + 0x10], 0xffffffff
jg 0x14001745f
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rbx + 0x18]
mov qword [rbp - 0x30], rax
jmp 0x140017551
movsxd r14, dword [r13 - 0x10]
test r14d, r14d
jne 0x1400174c8
mov r14, qword [rdi]
cmp dword [rdi + 8], 0
je 0x14001754d
cmp dword [rdi + 0x10], 0
jge 0x14001749f
cmp dword [rbx - 0xc], 0
jl 0x1400175c8
mov dword [rbx - 0x10], r15d
mov word [rbx], r15w
jmp 0x14001754d
lock add dword [rdi + 0x10], 0xffffffff
jg 0x1400174b2
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x30], rax
jmp 0x14001754d
test r13, r13
je 0x1400175e9
mov eax, dword [rbx - 0x10]
mov dword [rbp + 0x50], eax
mov r15, r13
sub r15, rbx
sar r15, 1
test r14d, r14d
js 0x1400175de
mov ecx, 1
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0xc]
sub eax, r14d
or eax, ecx
jge 0x14001750b
mov edx, r14d
lea rcx, [rbp - 0x30]
call fcn.140012790
mov rbx, qword [rbp - 0x30]
mov eax, dword [rbp + 0x50]
lea rdi, [r14 + r14]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
mov r9, rdi
add rdx, rdx
cmp r15, rax
ja 0x14001752f
lea r8, [rbx + r15*2]
call fcn.1401928f0
jmp 0x140017537
mov r8, r13
call fcn.140191fe0
cmp r14d, dword [rbx - 0xc]
jg 0x1400175d3
mov dword [rbx - 0x10], r14d
xor r15d, r15d
mov word [rdi + rbx], r15w
mov r14d, dword [rbp + 0x48]
mov rdx, qword [rbp - 0x20]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140017569
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x30]
movzx eax, word [rbx]
cmp ax, word [0x14021c758]
jne 0x14001757e
mov eax, r15d
jmp 0x140017583
sbb eax, eax
or eax, 1
test eax, eax
je 0x1400175b7
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1400175b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400175b7
cmp eax, 3
je 0x1400175b7
mov r14d, eax
mov dword [rbp + 0x48], eax
jmp 0x1400175b7
mov r14d, r15d
mov dword [rbp + 0x48], r15d
test esi, esi
jle 0x1400175f4
mov rdi, qword [rbp + 0x58]
mov rax, qword [rbp - 0x18]
jmp 0x1400173e0
mov ecx, 0x80070057
call fcn.140015cb0
int3
mov ecx, 0x80070057
call fcn.140015cb0
int3
mov ecx, 0x80070057
call fcn.140015cb0
int3
mov ecx, 0x80070057
call fcn.140015cb0
nop
lea rdx, [rbx - 0x18]
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140017609
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp + 0x58]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140017622
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, r14d
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret