Function at 0x14005d138
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x580]
sub rsp, 0x680
mov rax, qword [0x14017d140]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov r15, rdx
mov r12, rcx
mov rcx, qword [0x14017d3a8]
lea rdi, [0x14017d3a8]
cmp rcx, rdi
je 0x14005d1a2
test byte [rcx + 0x1c], 1
je 0x14005d1a2
cmp byte [rcx + 0x19], 4
jb 0x14005d1a2
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x148
call fcn.14001dd24
or dword [rsp + 0x30], reloc.ADVAPI32.dll_TraceEvent
xor r13d, r13d
mov r14d, r13d
mov qword [rsp + 0x38], r13
test r15, r15
jne 0x14005d1c1
mov eax, 0x80004003
jmp 0x14005d5c4
lea rsi, [0x140005998]
mov r8d, reloc.ole32.dll_CoRevokeClassObject
mov rcx, r15
mov rdx, rsi
call qword [sym.imp.msvcrt.dll_wcsncmp]
test eax, eax
jne 0x14005d331
mov rbx, qword [0x14017d3a8]
cmp rbx, rdi
je 0x14005d216
test byte [rbx + 0x1c], 1
je 0x14005d216
cmp byte [rbx + 0x19], 4
jb 0x14005d216
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x149
call fcn.14001dd24
mov rbx, qword [0x14017d3a8]
mov r14d, 0x208
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, r14d
call sub.msvcrt.dll_memset
lea rax, [rsp + 0x40]
mov r11d, 0x104
lea rcx, [rsp + 0x40]
mov edi, r13d
sub rsi, rax
lea rax, [r11 + 0x7ffffefa]
test rax, rax
je 0x14005d262
movzx eax, word [rsi + rcx]
test ax, ax
je 0x14005d262
mov word [rcx], ax
add rcx, 2
dec r11
jne 0x14005d241
test r11, r11
jne 0x14005d270
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r13w
test edi, edi
js 0x14005d531
mov ebx, 0x104
lea r8, [0x140001800]
lea rcx, [rsp + 0x40]
mov edx, ebx
call fcn.14006892c
mov edi, eax
test eax, eax
js 0x14005d52a
lea r8, [0x1400059c0]
lea rcx, [rsp + 0x40]
mov edx, ebx
call fcn.14006892c
mov edi, eax
test eax, eax
js 0x14005d52a
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.msvcrt.dll_swscanf_s]
cmp eax, 1
je 0x14005d2dd
mov edi, 0x80070057
jmp 0x14005d52a
lea rcx, [rsp + 0x40]
mov r8, r14
xor edx, edx
call sub.msvcrt.dll_memset
lea rcx, [rbp + 0x360]
mov r8, r14
xor edx, edx
call sub.msvcrt.dll_memset
mov r9d, dword [rsp + 0x30]
lea r8, [0x140013f40]
lea rcx, [rbp + 0x360]
mov rdx, rbx
call fcn.1400284c0
mov edi, eax
test eax, eax
js 0x14005d52a
lea rsi, [rbp + 0x360]
mov r14d, 1
jmp 0x14005d334
mov rsi, r15
mov rcx, rsi
call fcn.140139ee0
mov edi, eax
test eax, eax
jns 0x14005d37d
mov rbx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rbx, rax
je 0x14005d384
test byte [rbx + 0x1c], 1
je 0x14005d384
cmp byte [rbx + 0x19], 2
jb 0x14005d384
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x14a
mov r9, rsi
mov dword [rsp + 0x20], edi
call fcn.14001ecbc
mov rbx, qword [0x14017d3a8]
test r14d, r14d
je 0x14005d531
lea rcx, [rsp + 0x38]
call fcn.1400b0a7c
mov r14, qword [rsp + 0x38]
mov edi, eax
test eax, eax
jns 0x14005d3ea
mov rbx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rbx, rax
je 0x14005d51c
test byte [rbx + 0x1c], 1
je 0x14005d51c
cmp byte [rbx + 0x19], 2
jb 0x14005d51c
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x14b
xor r9d, r9d
call fcn.14001de24
jmp 0x14005d515
lea rcx, [rbp + 0x150]
xor edx, edx
mov r8d, 0x208
call sub.msvcrt.dll_memset
lea r8, [0x1400059f0]
lea rcx, [rbp + 0x150]
mov r9, r14
mov edx, 0x104
mov qword [rsp + 0x20], r15
call fcn.1400284c0
mov edi, eax
test eax, eax
js 0x14005d515
lea rcx, [rbp + 0x150]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x14005d4e5
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov rbx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rbx, rax
je 0x14005d496
test byte [rbx + 0x1c], 1
je 0x14005d496
cmp byte [rbx + 0x19], 2
jb 0x14005d496
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x14c
mov r9d, esi
call fcn.14001de24
mov rbx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp esi, 0x80070003
je 0x14005d4a6
cmp esi, 0x80070002
jne 0x14005d4dd
cmp rbx, rax
je 0x14005d4da
test byte [rbx + 0x1c], 1
je 0x14005d4da
cmp byte [rbx + 0x19], 3
jb 0x14005d4da
mov rcx, qword [rbx + 0x10]
lea r9, [rbp + 0x150]
lea r8, [0x1400068c8]
mov edx, 0x14d
call fcn.14001ec40
mov rbx, qword [0x14017d3a8]
mov esi, r13d
test esi, esi
jns 0x14005d4e5
mov edi, esi
jmp 0x14005d51c
cmp dword [r12 + 0x24], r13d
ja 0x14005d504
lea r8, [0x140005a08]
lea rcx, [0x140005730]
mov edx, 0x1aec
call fcn.1400a8be8
dec dword [r12 + 0x24]
jne 0x14005d515
call fcn.14014e4e0
test eax, eax
cmovs edi, eax
mov rbx, qword [0x14017d3a8]
test r14, r14
je 0x14005d531
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rbx, qword [0x14017d3a8]
lea rsi, [0x14017d3a8]
cmp rbx, rsi
je 0x14005d595
test byte [rbx + 0x1c], 1
je 0x14005d568
cmp byte [rbx + 0x19], 4
jb 0x14005d568
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x14e
mov r9d, edi
call fcn.14001de24
mov rbx, qword [0x14017d3a8]
cmp rbx, rsi
je 0x14005d595
test byte [rbx + 0x1c], 1
je 0x14005d595
cmp byte [rbx + 0x19], 4
jb 0x14005d595
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x14f
call fcn.14001dd24
mov rbx, qword [0x14017d3a8]
test edi, edi
jns 0x14005d5c2
cmp rbx, rsi
je 0x14005d5c2
test byte [rbx + 0x1c], 1
je 0x14005d5c2
cmp byte [rbx + 0x19], 2
jb 0x14005d5c2
mov rcx, qword [rbx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0x150
mov r9d, edi
call fcn.14001de24
mov eax, edi
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.140168920
mov rbx, qword [rsp + 0x6d0]
add rsp, 0x680
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret