Function at 0x140009cb0
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x140081030]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov edi, r8d
mov esi, edx
mov ebx, dword [0x140081dc0]
mov qword [rsp + 0x38], 0xffffffffffffffff
lea r8, str.GMutexTouchIC
mov edx, 0x200
lea rcx, [rsp + 0x40]
call fcn.1400011f0
lea r8, [rsp + 0x40]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rsp + 0x38], rax
mov ecx, 0xffffffff
test ebx, ebx
cmovs ebx, ecx
mov edx, ebx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140009d4d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.TouchIC_Mutex_Lock_fail.
mov r8d, eax
mov edx, 0x8f
lea rcx, str.EMCMutex::Lock
call fcn.14000b710
xor al, al
jmp 0x140009d4f
mov al, 1
mov byte [rsp + 0x30], al
test al, al
jne 0x140009d79
mov ebx, 2
mov edx, 0xf8
lea r8, str.Device_is_busy.
lea rcx, str.CTouchIC::Connect
call fcn.14000b920
jmp 0x140009eee
call fcn.140009bd0
mov rcx, qword [0x140082890]
mov rax, qword [0x140081c80]
mov qword [rax + 8], rcx
mov rcx, qword [0x140081c80]
mov rax, qword [0x140082898]
mov qword [rcx + 0x10], rax
mov ebx, 2
lea edx, [rbx + 1]
xor ebp, ebp
cmp edi, 0xb
jne 0x140009dba
mov qword [0x140081d44], rbp
jmp 0x140009dc6
mov dword [0x140081d48], edx
mov dword [0x140081d44], ebx
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov r8d, ebp
cmovne r8d, edx
mov edx, ebp
cmovne edx, ebx
call qword [rax + 0xd8]
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov r8d, edi
mov edx, esi
call qword [rax + 0x18]
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
call qword [rax + 0x30]
test al, al
jne 0x140009e27
mov ebx, 0x1004
mov edx, pe_nt_image_headers64
lea r8, str.Device_is_not_connected.
lea rcx, str.CTouchIC::Connect
call fcn.14000b920
jmp 0x140009eee
mov byte [0x140081d4c], 1
mov rcx, qword [0x140081c80]
test rcx, rcx
je 0x140009eec
mov rax, qword [rcx]
call qword [rax + 8]
dec eax
cmp eax, 1
ja 0x140009eec
mov dword [rsp + 0x24], ebp
mov dword [rsp + 0x20], ebp
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x24]
call qword [rax + 0xd0]
mov ebx, eax
test eax, eax
je 0x140009e94
lea r8, str.Bridge_initialization_error
mov edx, 0x12c
lea rcx, str.CTouchIC::Connect
call fcn.14000b920
jmp 0x140009eee
mov eax, dword [rsp + 0x20]
cmp eax, 0xb
jne 0x140009ed3
mov qword [0x140081d44], rbp
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
xor r8d, r8d
xor edx, edx
call qword [rax + 0xd8]
lea r8, str.Device_connected.
mov edx, 0x151
lea rcx, str.CTouchIC::Connect
call fcn.14000b830
jmp 0x140009eee
cmp eax, 7
jne 0x140009eb9
call fcn.14000a600
mov ebx, eax
test eax, eax
je 0x140009eb9
mov byte [0x140081d4c], bpl
jmp 0x140009eee
mov ebx, ebp
mov rcx, qword [rsp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x140009f10
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x140009f10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14003a270
mov rbx, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
pop rsi
pop rbp
ret