Function at 0x140046a90
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x580]
sub rsp, 0x680
mov rax, qword [0x140178010]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov rsi, rdx
mov r15, rcx
mov rcx, qword [0x1401782b0]
lea r13, [0x1401782b0]
cmp rcx, r13
je 0x140046afc
test byte [rcx + 0x1c], 1
je 0x140046afc
cmp byte [rcx + 0x19], 4
jb 0x140046afc
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x148
call fcn.140004c6c
or dword [rsp + 0x30], 0xffffffff
xor r14d, r14d
and qword [rsp + 0x38], r14
test rsi, rsi
jne 0x140046b18
mov eax, 0x80004003
jmp 0x140046eb7
mov r8d, 0x11
lea rdx, str.WsbMountedVolumes
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_wcsncmp]
mov edi, 0x104
test eax, eax
jne 0x140046c4d
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046b66
test byte [rcx + 0x1c], 1
je 0x140046b66
cmp byte [rcx + 0x19], 4
jb 0x140046b66
mov rcx, qword [rcx + 0x10]
lea edx, [rdi + 0x45]
lea r8, [0x140152588]
call fcn.140004c6c
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x208
call sub.msvcrt.dll_memset
lea r8, str.WsbMountedVolumes
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.14003b8c0
mov ebx, eax
test eax, eax
js 0x140046e24
lea r8, [0x14014d7b8]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140052af4
mov ebx, eax
test eax, eax
js 0x140046e24
lea r8, str.WsbMountedVolumeFile_lu
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140052af4
mov ebx, eax
test eax, eax
js 0x140046e24
lea r8, [rsp + 0x30]
mov rcx, rsi
lea rdx, [rsp + 0x40]
call qword [sym.imp.msvcrt.dll_swscanf_s]
cmp eax, 1
je 0x140046bf4
mov ebx, 0x80070057
jmp 0x140046e24
mov ebx, 0x208
lea rcx, [rsp + 0x40]
mov r8d, ebx
xor edx, edx
call sub.msvcrt.dll_memset
mov r8d, ebx
lea rcx, [rbp + 0x360]
xor edx, edx
call sub.msvcrt.dll_memset
mov r9d, dword [rsp + 0x30]
lea r8, str._GlobalrootDeviceHarddiskVolume_lu
mov rdx, rdi
lea rcx, [rbp + 0x360]
call fcn.1400102c4
mov ebx, eax
test eax, eax
js 0x140046e24
lea rdi, [rbp + 0x360]
mov r14d, 1
jmp 0x140046c50
mov rdi, rsi
mov rcx, rdi
call fcn.1401189d8
mov ebx, eax
test eax, eax
jns 0x140046c92
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046c99
test byte [rcx + 0x1c], 1
je 0x140046c99
cmp byte [rcx + 0x19], 2
jb 0x140046c99
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x14a
mov dword [rsp + 0x20], eax
mov r9, rdi
call fcn.140005ce8
mov rcx, qword [0x1401782b0]
test r14d, r14d
je 0x140046e2b
lea rcx, [rsp + 0x38]
call fcn.14008dfcc
mov r14, qword [rsp + 0x38]
mov ebx, eax
test eax, eax
jns 0x140046cf8
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046e16
test byte [rcx + 0x1c], 1
je 0x140046e16
cmp byte [rcx + 0x19], 2
jb 0x140046e16
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x14b
xor r9d, r9d
call fcn.140004c90
jmp 0x140046e0f
xor edx, edx
lea rcx, [rbp + 0x150]
mov r8d, 0x208
call sub.msvcrt.dll_memset
mov r9, r14
mov qword [rsp + 0x20], rsi
lea r8, [0x140151d58]
mov edx, 0x104
lea rcx, [rbp + 0x150]
call fcn.1400102c4
mov ebx, eax
test eax, eax
js 0x140046e0f
lea rcx, [rbp + 0x150]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140046ddf
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046d96
test byte [rcx + 0x1c], 1
je 0x140046d96
cmp byte [rcx + 0x19], 2
jb 0x140046d96
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x14c
mov r9d, edi
call fcn.140004c90
mov rcx, qword [0x1401782b0]
lea eax, [rdi + 0x7ff8fffe]
cmp eax, 1
ja 0x140046dd7
cmp rcx, r13
je 0x140046dd5
test byte [rcx + 0x1c], 1
je 0x140046dd5
cmp byte [rcx + 0x19], 3
jb 0x140046dd5
mov rcx, qword [rcx + 0x10]
lea r9, [rbp + 0x150]
mov edx, 0x14d
lea r8, [0x140152588]
call fcn.140005c6c
mov rcx, qword [0x1401782b0]
xor edi, edi
test edi, edi
jns 0x140046ddf
mov ebx, edi
jmp 0x140046e16
cmp dword [r15 + 0x24], 0
ja 0x140046dfe
lea r8, str.m_numNetworkShareVolumes___0
mov edx, 0x1aec
lea rcx, str.base_stor_blbengine_serviceengine.cpp
call fcn.14008624c
add dword [r15 + 0x24], 0xffffffff
jne 0x140046e0f
call fcn.14012cdf4
test eax, eax
cmovs ebx, eax
mov rcx, qword [0x1401782b0]
test r14, r14
je 0x140046e2b
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046e88
test byte [rcx + 0x1c], 1
je 0x140046e5b
cmp byte [rcx + 0x19], 4
jb 0x140046e5b
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x14e
mov r9d, ebx
call fcn.140004c90
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140046e88
test byte [rcx + 0x1c], 1
je 0x140046e88
cmp byte [rcx + 0x19], 4
jb 0x140046e88
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x14f
call fcn.140004c6c
mov rcx, qword [0x1401782b0]
test ebx, ebx
jns 0x140046eb5
cmp rcx, r13
je 0x140046eb5
test byte [rcx + 0x1c], 1
je 0x140046eb5
cmp byte [rcx + 0x19], 2
jb 0x140046eb5
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0x150
mov r9d, ebx
call fcn.140004c90
mov eax, ebx
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.1401474d0
lea r11, [rsp + 0x680]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret