Function at 0x1400789a0
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
movzx r14d, dl
mov rsi, rcx
mov rax, qword [rcx + 0x930]
xor ebp, ebp
test dl, dl
je 0x140078c4b
test rax, rax
jne 0x140078aba
mov ecx, 0x148
call fcn.1400c2704
mov rdi, rax
mov qword [rsp + 0x70], rax
xor edx, edx
mov r8d, 0x148
mov rcx, rax
call fcn.1400c5120
movzx ebx, byte [rsi + 0x209]
mov rcx, rdi
call fcn.140028c90
nop
mov word [rdi + 0xd0], bp
mov byte [rdi + 0xd2], bpl
mov qword [rdi + 0xd4], rbp
mov dword [rdi + 0xdc], ebp
mov byte [rdi + 0xe0], 1
mov qword [rdi + 0xe8], rbp
mov qword [rdi + 0xf0], rbp
mov qword [rdi + 0xf8], rbp
mov qword [rdi + 0x100], rbp
mov dword [rdi + 0x108], 2
mov dword [rdi + 0x10c], 0xa
mov dword [rdi + 0x110], 3
mov qword [rdi + 0x118], rbp
mov qword [rdi + 0x120], rbp
mov qword [rdi + 0x128], rbp
mov qword [rdi + 0x130], rbp
mov byte [0x14016998d], bl
mov rax, qword [rdi + 8]
call qword [0x1400fac68]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateMutexW]
mov qword [0x140169990], rax
mov qword [rsi + 0x930], rdi
mov rax, rdi
test rax, rax
je 0x140078ec5
mov byte [rax + 0xd1], r14b
mov edx, dword [rsi + 0xe98]
mov rcx, rsi
call fcn.140079050
cmp qword [rsi + 0x930], 0
je 0x140078bcb
cmp byte [rsi + 0x928], 1
jne 0x140078bcb
mov r8, qword [0x140169990]
test r8, r8
je 0x140078b0b
mov edx, 0xffffffff
mov rcx, r8
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov r8, qword [0x140169990]
mov edi, ebp
mov rcx, qword [0x140169790]
sub rcx, qword [0x140169788]
movabs r14, 0x2e8ba2e8ba2e8ba3
mov rax, r14
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x140078baa
mov rbx, rbp
movabs r15, 0xd6bf94d5e57a42bd
call fcn.14009a134
mov rcx, rax
mov rax, r15
imul rcx
add rdx, rcx
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, qword [0x140169788]
mov qword [rbx + rax + 0x50], rdx
inc edi
lea rbx, [rbx + 0x58]
mov rcx, qword [0x140169790]
sub rcx, qword [0x140169788]
mov rax, r14
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
movsxd rax, edi
cmp rax, rdx
jb 0x140078b48
mov r8, qword [0x140169990]
test r8, r8
je 0x140078bb8
mov rcx, r8
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseMutex]
lea rcx, str._AsusSync_BluetoothLEManager_UpdateDeviceListReceivedTime__After_update_BLE_devices_received_time_n
call fcn.140095ab0
mov byte [rsi + 0x928], 0
mov rcx, rsi
call fcn.1400729e0
mov dl, 5
mov rcx, rsi
call fcn.140076190
mov rcx, qword [rsi + 0x930]
test rcx, rcx
je 0x140078ec5
cmp byte [rcx + 0xd0], 0
je 0x140078ec5
lea rdx, [rsp + 0x20]
call fcn.140029480
mov rbx, rax
add rsi, 0x938
cmp rsi, rax
je 0x140078c3c
mov rcx, rsi
call fcn.14002a6b0
mov rcx, qword [rbx]
mov qword [rsi], rcx
mov rcx, qword [rbx + 8]
mov qword [rsi + 8], rcx
mov rcx, qword [rbx + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rbx], rbp
mov qword [rbx + 8], rbp
mov qword [rbx + 0x10], rbp
lea rcx, [rsp + 0x20]
call fcn.14002a6b0
jmp 0x140078ec5
test rax, rax
je 0x140078e6f
mov byte [rax + 0xd1], bpl
mov rbx, qword [rcx + 0x930]
test rbx, rbx
je 0x140078ca5
cmp byte [rbx + 0xd0], bpl
je 0x140078ca5
mov rcx, qword [rbx + 0xe8]
test rcx, rcx
je 0x140078ca5
mov rax, qword [rbx + 0x90]
call qword [0x1400fac68]
mov qword [rbx + 0xe8], rbp
mov edx, eax
lea rcx, str._AsusSync_BluetoothLEManager_StopDeviceWatcher__Stop_device_watcher_result__0x_X_n
call fcn.140095ab0
mov byte [rbx + 0xd0], bpl
xor edx, edx
mov rcx, rsi
call fcn.140079050
mov rcx, qword [rsi + 0x978]
test rcx, rcx
je 0x140078d1e
mov rax, qword [rsi + 0x980]
test rax, rax
je 0x140078d1e
cmp rcx, rax
jne 0x140078d1e
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
sub rax, qword [rsi + 0x978]
cmp rax, 0x15f90
jbe 0x140078d02
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
mov r8, rax
mov rdx, qword [rsi + 0x978]
lea rcx, str._AsusSync_MdnsMgr__IsBleConnectionBlock___Block___Start:0x_I64X__current_:0x_I64X_n
call fcn.140095ab0
jmp 0x140078e6f
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
mov r8, rax
mov rdx, qword [rsi + 0x978]
lea rcx, str._AsusSync_MdnsMgr__IsBleConnectionBlock___Busy___Start:0x_I64X__current_:0x_I64X_n
call fcn.140095ab0
cmp qword [rsi + 0x958], rbp
je 0x140078e6f
xor edx, edx
lea rcx, str._AsusSync_MdnsMgr__BluetoothLeManagerControl__d__start_waiting_n
call fcn.140095ab0
xor edx, edx
mov rcx, qword [rsi + 0x958]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
test eax, eax
jne 0x140078db9
xor edx, edx
lea rcx, str._AsusSync_MdnsMgr__BluetoothLeManagerControl__d__Wait_ble_connection_complete_n
call fcn.140095ab0
mov rbx, qword [rsi + 0x930]
test rbx, rbx
je 0x140078da0
mov rax, qword [rbx + 0x10]
call qword [0x1400fac68]
mov rcx, qword [0x140169990]
test rcx, rcx
je 0x140078d89
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [0x140169990], rbp
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
nop
mov edx, 0x148
mov rcx, rbx
call fcn.1400c2470
mov qword [rsi + 0x930], rbp
mov rcx, qword [rsi + 0x958]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseMutex]
jmp 0x140078e6f
cmp eax, 0x102
jne 0x140078e5a
mov rax, qword [rsi + 0x978]
mov r8d, ebp
test rax, rax
je 0x140078e4a
mov rcx, qword [rsi + 0x980]
test rcx, rcx
je 0x140078e4a
cmp rax, rcx
jne 0x140078e4a
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
sub rax, qword [rsi + 0x978]
cmp rax, 0x15f90
jbe 0x140078e2b
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
mov r8, rax
mov rdx, qword [rsi + 0x978]
lea rcx, str._AsusSync_MdnsMgr__IsBleConnectionBlock___Block___Start:0x_I64X__current_:0x_I64X_n
call fcn.140095ab0
mov r8d, 1
xor edx, edx
lea rcx, str._AsusSync_MdnsMgr__BluetoothLeManagerControl__d__wait_event_timeout___Block:_d_n
call fcn.140095ab0
jmp 0x140078e6f
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
mov r8, rax
mov rdx, qword [rsi + 0x978]
lea rcx, str._AsusSync_MdnsMgr__IsBleConnectionBlock___Busy___Start:0x_I64X__current_:0x_I64X_n
call fcn.140095ab0
mov r8d, ebp
xor edx, edx
lea rcx, str._AsusSync_MdnsMgr__BluetoothLeManagerControl__d__wait_event_timeout___Block:_d_n
call fcn.140095ab0
jmp 0x140078e6f
cmp eax, 0x80
jne 0x140078e6f
xor edx, edx
lea rcx, str._AsusSync_MdnsMgr__BluetoothLeManagerControl__d__wait_event_is_released_n
call fcn.140095ab0
cmp byte [rsi + 0xeca], 0
jne 0x140078ec5
mov rbx, qword [rsi + 0x930]
test rbx, rbx
je 0x140078ec5
mov rax, qword [rbx + 0x10]
call qword [0x1400fac68]
mov rcx, qword [0x140169990]
test rcx, rcx
je 0x140078ea7
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [0x140169990], rbp
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
nop
mov edx, 0x148
mov rcx, rbx
call fcn.1400c2470
mov qword [rsi + 0x930], rbp
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret