Function at 0x10009d894
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x40
mov rbx, r8
mov rsi, rdx
mov rbp, rcx
mov rcx, qword [0x1001653b8]
lea rax, [0x1001653b8]
cmp rcx, rax
je 0x10009d8e1
test byte [rcx + 0x1c], 1
je 0x10009d8e1
cmp byte [rcx + 0x19], 5
jb 0x10009d8e1
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xa
call fcn.10001c7b8
test rbp, rbp
jne 0x10009d8fe
lea r8, [0x100009df8]
lea rcx, [0x10000a090]
mov edx, 0xea
call fcn.100099ad8
and qword [rsp + 0x78], 0
xor edi, edi
xor r13b, r13b
mov dword [rsp + 0x70], edi
test rsi, rsi
je 0x10009d918
mov edi, dword [rsi]
mov dword [rsp + 0x70], edi
test rbx, rbx
je 0x10009d920
mov byte [rbx], 0
lea rdx, [rsp + 0x78]
mov rcx, rbp
call fcn.10009fa14
mov r12, qword [rsp + 0x78]
mov ebp, eax
test eax, eax
js 0x10009db51
test rsi, rsi
je 0x10009d946
test byte [rsi], 7
je 0x10009d9b1
lea rdx, [rsp + 0x70]
mov rcx, r12
call fcn.10009dd8c
mov ebp, eax
test eax, eax
jns 0x10009d9aa
test rbx, rbx
je 0x10009d961
mov byte [rbx], 1
mov rcx, qword [0x1001653b8]
lea rbx, [0x1001653b8]
cmp rcx, rbx
je 0x10009d9a1
test byte [rcx + 0x1c], 1
je 0x10009d9a1
cmp byte [rcx + 0x19], 2
jb 0x10009d9a1
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xb
mov r9d, eax
call fcn.10001c7dc
mov edi, dword [rsp + 0x70]
jmp 0x10009dacc
mov edi, dword [rsp + 0x70]
jmp 0x10009dad3
mov edi, dword [rsp + 0x70]
mov r13b, 1
test dil, 0x10
je 0x10009da36
bt edi, 0xa
jb 0x10009da36
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x10009dac5
test rbx, rbx
je 0x10009d9d6
mov byte [rbx], 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebp, ax
or ebp, 0x80070000
test eax, eax
cmovle ebp, eax
mov rcx, qword [0x1001653b8]
lea rbx, [0x1001653b8]
cmp rcx, rbx
je 0x10009dad3
test byte [rcx + 0x1c], 1
je 0x10009dad3
cmp byte [rcx + 0x19], 2
jb 0x10009dad3
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xc
mov r9, r12
mov dword [rsp + 0x20], ebp
call fcn.10001daa4
jmp 0x10009dacc
and qword [rsp + 0x30], 0
xor r9d, r9d
mov edx, 0x10000
lea r8d, [r9 + 7]
mov rcx, r12
mov dword [rsp + 0x28], 0x6200000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
jne 0x10009dabc
test rbx, rbx
je 0x10009da6f
mov byte [rbx], 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebp, ax
or ebp, 0x80070000
test eax, eax
cmovle ebp, eax
mov rcx, qword [0x1001653b8]
lea rbx, [0x1001653b8]
cmp rcx, rbx
je 0x10009dad3
test byte [rcx + 0x1c], 1
je 0x10009dad3
cmp byte [rcx + 0x19], 2
jb 0x10009dad3
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xd
mov r9d, ebp
call fcn.10001c7dc
jmp 0x10009dacc
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rbx, [0x1001653b8]
mov rcx, qword [0x1001653b8]
test ebp, ebp
jns 0x10009db5f
test r13b, r13b
je 0x10009db5f
cmp rcx, rbx
je 0x10009db0d
test byte [rcx + 0x1c], 1
je 0x10009db0d
cmp byte [rcx + 0x19], 4
jb 0x10009db0d
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xe
mov r9, r12
mov dword [rsp + 0x20], edi
call fcn.10001daa4
mov edx, edi
mov rcx, r12
call fcn.10009dbb8
test eax, eax
jns 0x10009db58
mov rcx, qword [0x1001653b8]
cmp rcx, rbx
je 0x10009db5f
test byte [rcx + 0x1c], 1
je 0x10009db5f
cmp byte [rcx + 0x19], 2
jb 0x10009db5f
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0xf
mov r9, r12
mov dword [rsp + 0x20], eax
call fcn.10001daa4
jmp 0x10009db58
lea rbx, [0x1001653b8]
mov rcx, qword [0x1001653b8]
test r12, r12
je 0x10009db74
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1001653b8]
cmp rcx, rbx
je 0x10009db9a
test byte [rcx + 0x1c], 1
je 0x10009db9a
cmp byte [rcx + 0x19], 5
jb 0x10009db9a
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003ae8]
mov edx, 0x10
call fcn.10001c7b8
mov eax, ebp
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret