Function at 0x140009f40
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x160]
sub rsp, 0x260
mov rax, qword [0x140081030]
xor rax, rsp
mov qword [rbp + 0x158], rax
cmp qword [0x140081c80], 0
jne 0x140009f7a
mov eax, 6
jmp 0x14000a2d9
mov ebx, dword [0x140081dc0]
mov qword [rsp + 0x48], 0xffffffffffffffff
lea r8, str.GMutexTouchIC
mov edx, 0x200
lea rcx, [rsp + 0x50]
call fcn.1400011f0
lea r8, [rsp + 0x50]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rsp + 0x48], 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 0x140009ff1
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 0x140009ff3
mov al, 1
mov byte [rsp + 0x40], al
test al, al
jne 0x14000a01d
lea r8, str.Device_is_busy.
mov edx, 0x276
lea rcx, str.CTouchIC::Disconnect
call fcn.14000b920
mov ebx, 2
jmp 0x14000a2b5
mov rcx, qword [0x140081c80]
xor ebx, ebx
test rcx, rcx
je 0x14000a299
mov rax, qword [rcx]
call qword [rax + 8]
dec eax
cmp eax, 1
ja 0x14000a299
mov dword [rbp + 0x150], ebx
mov dword [rsp + 0x30], ebx
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x30]
lea rdx, [rbp + 0x150]
call qword [rax + 0xd0]
test eax, eax
jne 0x14000a0a3
cmp dword [rsp + 0x30], 0xb
jne 0x14000a0a3
mov rax, qword [0x140081c80]
mov ecx, dword [rax + 0xbb8]
cmp ecx, 8
jne 0x14000a090
call fcn.14000a300
jmp 0x14000a299
cmp ecx, 9
jne 0x14000a299
call fcn.14000a880
jmp 0x14000a299
mov dword [rbp + 0x150], ebx
mov dword [rsp + 0x30], ebx
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsp + 0x30]
lea rdx, [rbp + 0x150]
call qword [rax + 0xd0]
test eax, eax
jne 0x14000a299
cmp dword [rsp + 0x30], 7
jne 0x14000a299
movzx eax, byte [0x140081d48]
mov byte [rbp + 0x150], al
mov dword [rbp + 0x151], 0x12
mov byte [rbp + 0x155], 0xa0
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x140081d4c], bl
jne 0x14000a12a
lea r8, str.Device_is_not_connected.
mov edx, 0x1154
lea rcx, str.CTouchIC::SendDeviceBridgeCmd
call fcn.14000b920
jmp 0x14000a14e
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9d, 0x1388
mov r8d, 6
lea rdx, [rbp + 0x150]
call qword [rax + 0x48]
movzx eax, byte [0x140081d48]
mov byte [rbp + 0x150], al
mov dword [rbp + 0x151], 0x12
mov byte [rbp + 0x155], 0x20
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x140081d4c], bl
jne 0x14000a199
lea r8, str.Device_is_not_connected.
mov edx, 0x1154
lea rcx, str.CTouchIC::SendDeviceBridgeCmd
call fcn.14000b920
jmp 0x14000a1bd
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9d, 0x1388
mov r8d, 6
lea rdx, [rbp + 0x150]
call qword [rax + 0x48]
movzx eax, byte [0x140081d48]
mov byte [rbp + 0x150], al
mov dword [rbp + 0x151], 0x12
mov byte [rbp + 0x155], bl
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x140081d4c], bl
jne 0x14000a207
lea r8, str.Device_is_not_connected.
mov edx, 0x1154
lea rcx, str.CTouchIC::SendDeviceBridgeCmd
call fcn.14000b920
jmp 0x14000a22b
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9d, 0x1388
mov r8d, 6
lea rdx, [rbp + 0x150]
call qword [rax + 0x48]
movzx eax, byte [0x140081d48]
mov byte [rbp + 0x150], al
mov dword [rbp + 0x151], 0x11
mov byte [rbp + 0x155], bl
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x140081d4c], bl
jne 0x14000a275
lea r8, str.Device_is_not_connected.
mov edx, 0x1154
lea rcx, str.CTouchIC::SendDeviceBridgeCmd
call fcn.14000b920
jmp 0x14000a299
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9d, 0x1388
mov r8d, 6
lea rdx, [rbp + 0x150]
call qword [rax + 0x48]
cmp byte [0x140081d4c], 1
jne 0x14000a2b5
mov rcx, qword [0x140081c80]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov byte [0x140081d4c], bl
mov rcx, qword [rsp + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14000a2d7
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsp + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x14000a2d7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rbp + 0x158]
xor rcx, rsp
call fcn.14003a270
mov rbx, qword [rsp + 0x270]
add rsp, 0x260
pop rbp
ret