Function at 0x140022ec0
Capabilities:
Delete directory
Delete file
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x240
mov rax, qword [0x1400502a8]
xor rax, rsp
mov qword [rsp + 0x230], rax
xor r12d, r12d
mov rsi, rdx
mov r14, rcx
mov ebx, r12d
mov edi, r12d
mov r15d, r12d
test rdx, rdx
je 0x140022fe1
mov rcx, rdx
call fcn.1400173dc
test eax, eax
je 0x140022f8d
or rcx, 0xffffffffffffffff
mov rdi, rcx
inc rdi
cmp word [rsi + rdi*2], r12w
jne 0x140022f19
add rdi, 0xd
mov eax, 2
mul rdi
cmovo rax, rcx
mov rcx, rax
call fcn.14003c460
mov rbx, rax
test rax, rax
je 0x140022fc9
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call fcn.140001470
mov esi, eax
mov rcx, rbx
test eax, eax
jns 0x140022f6a
call fcn.14003c408
mov eax, esi
jmp 0x14002315a
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea r8, [0x1400450e0]
mov rdx, rdi
mov rcx, rbx
call fcn.140001584
mov edi, eax
test eax, eax
jns 0x140022fe1
jmp 0x140023150
mov rcx, rsi
call fcn.140017488
test eax, eax
je 0x140022fe1
or rcx, 0xffffffffffffffff
mov rbp, rcx
inc rbp
cmp word [rsi + rbp*2], r12w
jne 0x140022fa0
inc rbp
mov eax, 2
mul rbp
cmovo rax, rcx
mov rcx, rax
call fcn.14003c460
mov rbx, rax
test rax, rax
jne 0x140022fd3
mov eax, 0x8007000e
jmp 0x14002315a
mov r8, rsi
mov rdx, rbp
mov rcx, rax
call fcn.140001470
mov esi, r12d
mov ebp, 0x104
test rbx, rbx
je 0x14002300e
mov rcx, rbx
call fcn.140017488
test eax, eax
jne 0x140023005
mov rcx, rbx
call fcn.14003c408
mov rbx, r12
test rbx, rbx
jne 0x1400230d9
mov ecx, 0x208
call fcn.14003c460
mov rbx, rax
test rax, rax
jne 0x140023082
mov edi, 0x8007000e
cmp edi, 0x80040154
jne 0x140023118
mov edx, 0x103
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140023072
lea r8, str.msxml.dll
mov rdx, rbp
lea rcx, [rsp + 0x20]
call fcn.140001584
xor r8d, r8d
lea rcx, [rsp + 0x20]
lea edx, [r8 + 1]
call fcn.140019bdc
test eax, eax
jns 0x14002310b
inc esi
cmp esi, 2
jge 0x140023118
jmp 0x140022fe9
mov rcx, r14
call fcn.1400205dc
test eax, eax
js 0x1400230d4
mov r8, qword [r14 + 0x260]
mov rdx, rbp
mov rcx, rbx
call fcn.140001470
test eax, eax
js 0x1400230d4
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea r8, [0x1400450e0]
mov rdx, rbp
mov rcx, rbx
call fcn.140001584
mov rdx, rbx
mov rcx, r14
call fcn.140022d9c
mov edi, eax
mov r15d, 1
jmp 0x1400230d9
mov edi, 0x80004005
test edi, edi
js 0x1400230ea
mov r8, r14
mov rcx, rbx
call fcn.140038658
mov edi, eax
cmp edi, 0xc00d1388
jne 0x140023025
test rbx, rbx
je 0x140023103
mov rcx, rbx
call fcn.14003c408
mov rbx, r12
jmp 0x140023072
mov r8, r14
mov rcx, rbx
call fcn.140038658
mov edi, eax
test r15d, r15d
je 0x14002314b
test rbx, rbx
je 0x140023158
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, 0x5c
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_wcsrchr]
test rax, rax
je 0x140023142
mov word [rax], r12w
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test rbx, rbx
je 0x140023158
mov rcx, rbx
call fcn.14003c408
mov eax, edi
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.14003c810
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret