Function at 0x100005a58
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x370
mov rax, qword [0x10000e160]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov rbx, rcx
mov ebp, 1
mov rcx, qword [rbx + 0x880]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x100005cd7
mov rcx, qword [rbx + 0x880]
xor edi, edi
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rbx + 0x89c]
test eax, eax
je 0x100005c31
sub eax, 1
je 0x100005b9a
sub eax, 1
je 0x100005b8b
sub eax, 1
je 0x100005aeb
cmp eax, 1
jne 0x100005cb5
mov rcx, rbx
call fcn.10000649c
jmp 0x100005b93
mov edx, 1
xor ecx, ecx
call sub.bthprops.cpl_BluetoothEnableDiscovery
mov ecx, 0x38
mov esi, eax
call fcn.10000a938
test rax, rax
je 0x100005b2c
mov rcx, qword [rbx + 0x888]
and dword [rax], edi
and qword [rax + 8], rdi
and qword [rax + 0x10], rdi
and qword [rax + 0x20], rdi
mov edx, 0x1f90
mov qword [rax + 0x30], rcx
mov word [rax + 0x18], dx
jmp 0x100005b2e
xor eax, eax
mov qword [rbx + 0x8a0], rax
test rax, rax
je 0x100005b70
lea rdx, [0x100001d90]
mov rcx, rax
call fcn.100007634
mov edi, eax
test eax, eax
js 0x100005b75
mov rcx, qword [rbx + 0x8a0]
lea r9, [rbx + 0x230]
lea rdx, [rbx + 0x24]
mov r8d, Ordinal_258
call fcn.100007704
mov edi, eax
jmp 0x100005b75
mov edi, 0x8007000e
test esi, esi
je 0x100005cb5
xor edx, edx
xor ecx, ecx
call sub.bthprops.cpl_BluetoothEnableDiscovery
jmp 0x100005cb5
mov rcx, rbx
call fcn.10000607c
mov edi, eax
jmp 0x100005cb5
mov rcx, qword [0x10000e7c8]
lea r8, [rsp + 0x260]
mov r9d, 0x80
mov edx, 0x918
call qword [sym.imp.USER32.dll_LoadStringW]
mov rcx, qword [rbx + 0x890]
lea r9, [rsp + 0x260]
xor r8d, r8d
mov edx, 0x408
call qword [sym.imp.USER32.dll_SendMessageW]
lea rcx, [rsp + 0x38]
xor edx, edx
mov r8d, 0x228
call sub.msvcrt.dll_memset
mov rax, qword [rbx + 0x228]
lea r8, [rsp + 0x30]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x230
mov dword [rsp + 0x20], 1
call sub.bthprops.cpl_BluetoothAuthenticateDeviceEx
test eax, eax
je 0x100005cb5
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x100005cb5
mov rsi, qword [rbx + 0x8a0]
xor ebp, ebp
test rsi, rsi
je 0x100005c56
mov rcx, rsi
call fcn.100008d9c
mov rcx, rsi
call sub.msvcrt.dll_free
and qword [rbx + 0x8a0], rdi
lea rcx, [rbx + 0x44c]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x100005cd7
xor edx, edx
lea rcx, [rbx + 0x654]
lea r8d, [rdx + 2]
call fcn.100006d74
lea rcx, [rbx + 0x654]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x100005ca1
lea rcx, [rbx + 0x654]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x100005ca1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rbx + 0x654]
xor edx, edx
mov r8d, 0x208
call sub.msvcrt.dll_memset
test ebp, ebp
je 0x100005cd7
mov edx, dword [rbx + 0x898]
mov rcx, qword [rbx + 0x890]
movsxd r9, edi
xor r8d, r8d
call qword [sym.imp.USER32.dll_SendMessageW]
jmp 0x100005a89
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.10000ad60
lea r11, [rsp + 0x370]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret