Function at 0x140016c50
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x140108440]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
lea r9, [rsp + 0x30]
movzx eax, byte [rcx]
add rcx, 1
add rdx, 2
mov r8d, eax
and eax, 0xf
shr r8b, 4
add eax, 0x61
add r8d, 0x41
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
cmp rcx, r9
jne 0x140016c73
lea rax, [0x140108448]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x140016cbb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x140016cb8
lea rax, [0x140108480]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x140016ceb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x140016ce8
xor ecx, ecx
mov byte [0x140108499], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x1401084a2], rdx
lea r8, [0x140108440]
lea rbx, [0x14010849a]
mov qword [0x1401084b2], rdx
mov qword [0x1401084c2], rdx
mov qword [0x1401084d2], rdx
xor edx, edx
mov qword [0x14010849a], rax
mov qword [0x1401084aa], rax
mov qword [0x1401084ba], rax
mov qword [0x1401084ca], rax
mov byte [0x1401084da], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140016ec6
lea rcx, [0x140108480]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x140016e11
lea rsi, [0x140108380]
lea r8, [0x1401084da]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x140016dbd
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x140016db0
lea rcx, [0x140108480]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x140016eb3
lea rcx, [sym.__shmem3_winpthreads_tdm_cleanup_local_region]
mov qword [0x140108380], rsi
call sym._onexit
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140108380]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x140108480]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x1401084da]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x140016ee6
nop dword [rax]
cmp byte [rax], 0x41
jne 0x140016e63
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x140016e50
mov rax, rdx
mov qword [0x140108380], rax
lea rsi, [0x140108380]
jmp 0x140016e89
cmp rdx, rsi
je 0x140016def
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x140016e80
cmp rdx, rsi
je 0x140016def
mov qword [rdx + 8], rsi
lea rcx, [sym.__shmem3_winpthreads_tdm_cleanup_local_region]
call sym._onexit
jmp 0x140016def
lea rcx, str.failed_to_add_string_to_atom_table_n
call sym.__shmem_get_error
xor eax, eax
jmp 0x140016e08
lea rcx, str.failed_to_to_lock_creation_mutex_n
call sym.__shmem_get_error
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
lea rcx, str.failed_to_get_string_from_atom_n
call sym.__shmem_get_error
xor eax, eax
jmp 0x140016e6f