Function at 0x140087850
Capabilities:
Delete directory

Disassembly:
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
movzx ebx, dl
mov rsi, rcx
lea rdx, [rbp + 0x38]
call fcn.1400812c0
nop
or edi, 0xffffffff
test bl, bl
je 0x140087a81
lea rdx, [rbp + 0x38]
lea rcx, [rbp - 0x28]
call fcn.14003ba90
nop
mov rdx, rax
lea rcx, [rbp - 0x30]
call fcn.14003d7a0
mov rdx, qword [rbp + 0x38]
mov qword [rbp - 8], rdx
mov rcx, qword [rax]
mov qword [rbp + 0x38], rcx
mov qword [rax], rdx
mov rcx, qword [rbp - 0x30]
mov eax, dword [rcx]
test eax, eax
je 0x1400878cc
cmp eax, edi
je 0x1400878db
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1400878db
mov rcx, qword [rbp - 0x30]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.1400397e0
nop
mov rcx, qword [rbp - 0x28]
mov eax, dword [rcx]
test eax, eax
je 0x1400878f9
cmp eax, 0xffffffff
je 0x140087907
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140087907
mov rcx, qword [rbp - 0x28]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.1400397e0
xor esi, esi
mov rax, qword [rbp + 0x38]
mov ebx, dword [rax + 4]
test ebx, ebx
jle 0x140087a7d
mov r8d, ebx
lea rdx, [rbp + 0x30]
lea rcx, [rbp + 0x38]
call fcn.140031d70
nop
mov rcx, qword [rbp + 0x30]
cmp dword [rcx + 4], 2
jne 0x14008796f
mov rax, qword [rcx + 0x10]
movzx edx, word [rcx + rax]
lea eax, [rdx - 0x41]
cmp eax, 0x39
ja 0x14008794b
lea eax, [rdx - 0x5b]
cmp eax, 5
ja 0x14008795f
cmp edx, 0x7f
jbe 0x14008796f
mov ecx, edx
call fcn.140031cb0
test al, al
je 0x14008796f
mov rcx, qword [rbp + 0x30]
mov rax, qword [rcx + 0x10]
cmp word [rax + rcx + 2], 0x3a
je 0x140087a2a
xor edx, edx
lea rcx, [rbp + 0x30]
call fcn.1400868f0
test al, al
je 0x140087a5b
lea rdx, [rbp + 0x30]
lea rcx, [rbp - 0x20]
call fcn.14008da50
nop
mov rcx, rax
call fcn.1400360e0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne bl
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
je 0x1400879c4
cmp eax, 0xffffffff
je 0x1400879d2
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1400879d2
mov rcx, qword [rbp - 0x20]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.1400397e0
test bl, bl
je 0x140087a54
lea rcx, [rbp + 0x28]
call fcn.14003d220
lea r8d, [rsi - 1]
mov r9d, 1
movzx edx, word [rax]
lea rcx, [rbp + 0x38]
call fcn.140031d40
mov ebx, eax
mov rcx, qword [rbp + 0x30]
mov eax, dword [rcx]
test eax, eax
je 0x140087a15
cmp eax, 0xffffffff
je 0x140087a23
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140087a23
mov rcx, qword [rbp + 0x30]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.1400397e0
mov esi, ebx
jmp 0x140087910
mov eax, dword [rcx]
test eax, eax
je 0x140087a44
cmp eax, 0xffffffff
je 0x140087a7d
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140087a7d
mov rcx, qword [rbp + 0x30]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.1400397e0
jmp 0x140087a7d
test esi, esi
setne bl
jmp 0x140087a5d
xor bl, bl
mov rcx, qword [rbp + 0x30]
mov eax, dword [rcx]
test eax, eax
je 0x140087ab7
cmp eax, 0xffffffff
je 0x140087ac7
mov eax, edi
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140087ac7
mov rcx, qword [rbp + 0x30]
jmp 0x140087ab7
mov bl, 1
jmp 0x140087ac7
lea rdx, [rbp - 0x18]
mov rcx, rsi
call fcn.1400812c0
nop
mov rcx, rax
call fcn.1400880c0
movzx ebx, al
mov rcx, qword [rbp - 0x18]
mov eax, dword [rcx]
test eax, eax
je 0x140087ab7
cmp eax, 0xffffffff
je 0x140087ac7
mov edx, edi
lock xadd dword [rcx], edx
cmp edx, 1
jne 0x140087ac7
mov rcx, qword [rbp - 0x18]
mov r8d, 8
lea edx, [r8 - 6]
call fcn.1400397e0
nop
mov rax, qword [rbp + 0x38]
mov ecx, dword [rax]
test ecx, ecx
je 0x140087adf
cmp ecx, 0xffffffff
je 0x140087af1
lock xadd dword [rax], edi
cmp edi, 1
jne 0x140087af1
mov edx, 2
lea r8d, [rdx + 6]
mov rcx, qword [rbp + 0x38]
call fcn.1400397e0
movzx eax, bl
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret