Function at 0x14005f2c0
Capabilities:
Delete directory

Disassembly:
push rbp
push rbx
mov rbp, rsp
sub rsp, 0x58
mov qword [rsp + 0x70], rsi
mov rbx, rcx
movzx esi, dl
mov qword [rsp + 0x50], rdi
lea rdx, [rbp + 0x30]
call fcn.140059f40
mov rax, qword [rbp + 0x30]
cmp dword [rax + 4], 0
jne 0x14005f2f6
lea rdx, str.Empty_filename_passed_to_function
jmp 0x14005f317
xor edi, edi
lea rcx, [rbp + 0x30]
xor r8d, r8d
movzx edx, di
lea r9d, [rdi + 1]
call fcn.14001d1b0
cmp eax, 0xffffffff
je 0x14005f34e
lea rdx, str.Broken_filename_passed_to_function
xorps xmm0, xmm0
mov qword [rbp - 0x28], 2
lea rax, str.default
lea rcx, [rbp - 0x28]
mov qword [rbp - 0x10], rax
movdqu xmmword [rbp - 0x20], xmm0
call fcn.140015ec0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
xor bl, bl
mov dword [rax], 0x16
jmp 0x14005f57b
test sil, sil
je 0x14005f53b
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x38]
call fcn.14003a110
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.14003ba30
mov rdx, qword [rbp + 0x30]
mov rcx, qword [rax]
mov qword [rbp + 0x30], rcx
mov qword [rax], rdx
mov rcx, qword [rbp + 0x28]
mov eax, dword [rcx]
test eax, eax
je 0x14005f398
cmp eax, 0xffffffff
je 0x14005f3a6
sub eax, 1
mov dword [rcx], eax
jne 0x14005f3a6
mov rcx, qword [rbp + 0x28]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140016170
mov rcx, qword [rbp - 0x38]
mov eax, dword [rcx]
test eax, eax
je 0x14005f3c0
cmp eax, 0xffffffff
je 0x14005f3ce
sub eax, 1
mov dword [rcx], eax
jne 0x14005f3ce
mov rcx, qword [rbp - 0x38]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140016170
mov rax, qword [rbp + 0x30]
mov ebx, dword [rax + 4]
test ebx, ebx
jle 0x14005f512
nop dword [rax]
mov r8d, ebx
lea rdx, [rbp - 0x28]
lea rcx, [rbp + 0x30]
call fcn.14001d930
cmp dword [rbp - 0x1c], 2
jne 0x14005f450
mov r8, qword [rbp - 0x28]
movsxd r9, dword [rbp - 0x20]
mov rdx, qword [r8]
mov rax, qword [rdx + 0x10]
lea rcx, [rax + r9*2]
movzx ecx, word [rcx + rdx]
lea eax, [rcx - 0x41]
cmp eax, 0x39
ja 0x14005f41d
lea eax, [rcx - 0x5b]
cmp eax, 5
ja 0x14005f433
cmp ecx, 0x7f
jbe 0x14005f450
call fcn.14001d640
test al, al
je 0x14005f450
mov r9d, dword [rbp - 0x20]
mov r8, qword [rbp - 0x28]
mov rdx, qword [r8]
lea eax, [r9 + 1]
movsxd rcx, eax
mov rax, qword [rdx + 0x10]
lea rcx, [rax + rcx*2]
cmp word [rcx + rdx], 0x3a
je 0x14005f512
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x28]
call fcn.140021940
xor edx, edx
lea rcx, [rbp - 0x38]
call fcn.14005eae0
test al, al
je 0x14005f51d
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x30]
call fcn.1400622a0
mov rcx, rax
call fcn.140022520
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov rcx, qword [rbp - 0x30]
test eax, eax
setne bl
mov eax, dword [rcx]
test eax, eax
je 0x14005f4ad
cmp eax, 0xffffffff
je 0x14005f4bb
sub eax, 1
mov dword [rcx], eax
jne 0x14005f4bb
mov rcx, qword [rbp - 0x30]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140016170
test bl, bl
je 0x14005f516
lea rcx, [rbp + 0x28]
call fcn.14003b2f0
lea r8d, [rdi - 1]
mov r9d, 1
lea rcx, [rbp + 0x30]
movzx edx, word [rax]
call fcn.14001d700
mov rcx, qword [rbp - 0x38]
mov ebx, eax
mov eax, dword [rcx]
test eax, eax
je 0x14005f4fa
cmp eax, 0xffffffff
je 0x14005f508
sub eax, 1
mov dword [rcx], eax
jne 0x14005f508
mov rcx, qword [rbp - 0x38]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140016170
mov edi, ebx
test ebx, ebx
jg 0x14005f3e0
mov bl, 1
jmp 0x14005f57b
test edi, edi
setne bl
jmp 0x14005f51f
xor bl, bl
mov rcx, qword [rbp - 0x38]
mov eax, dword [rcx]
test eax, eax
je 0x14005f56c
cmp eax, 0xffffffff
je 0x14005f57b
sub eax, 1
mov dword [rcx], eax
jne 0x14005f57b
mov rcx, qword [rbp - 0x38]
jmp 0x14005f56c
lea rdx, [rbp + 0x28]
mov rcx, rbx
call fcn.140059f40
mov rcx, rax
call fcn.14005fb80
mov rcx, qword [rbp + 0x28]
movzx ebx, al
mov edx, dword [rcx]
test edx, edx
je 0x14005f56c
cmp edx, 0xffffffff
je 0x14005f57b
sub edx, 1
mov dword [rcx], edx
jne 0x14005f57b
mov rcx, qword [rbp + 0x28]
mov r8d, 8
lea edx, [r8 - 6]
call fcn.140016170
mov rax, qword [rbp + 0x30]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x70]
mov ecx, dword [rax]
test ecx, ecx
je 0x14005f59b
cmp ecx, 0xffffffff
je 0x14005f5ad
sub ecx, 1
mov dword [rax], ecx
jne 0x14005f5ad
mov rcx, qword [rbp + 0x30]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140016170
movzx eax, bl
add rsp, 0x58
pop rbx
pop rbp
ret