Function at 0x140060f70
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov edi, ecx
lea rsi, [0x140000000]
cmp edi, 0xfffffffb
je 0x1400614cf
cmp edi, 0xfffffffa
jle 0x140060f98
lea eax, [rdi + 5]
mov r8d, eax
mov ebx, eax
jmp 0x140060f9f
mov eax, edi
mov r8d, edi
mov ebx, edi
test eax, eax
jl 0x140061146
cmp eax, 0x68
jg 0x140061146
movsxd rax, eax
lea rcx, [rax + rax*2]
shl rcx, 4
mov rdx, qword [rsi + rcx + 0xe5068]
test rdx, rdx
je 0x140060fd1
mov rax, qword [rdx + 0x30]
test rax, rax
je 0x140060fda
mov dword [rsp + 0x30], ebx
jmp 0x14006129a
movzx eax, byte [rdx + 0x24f]
test al, 1
mov rdi, qword [rdx + 0xc0]
mov qword [rdx + 0xc0], 0
je 0x140061025
movzx r9d, byte [rdx + 0x247]
mov r10d, r9d
shr r9d, 6
and r10d, 0xffffffdf
and r9d, 1
and eax, 0xfffffffe
shl r9d, 5
or r10d, r9d
mov byte [rdx + 0x247], r10b
mov byte [rdx + 0x24f], al
test al, 2
je 0x140061041
movzx r9d, byte [rdx + 0x23e]
and eax, 0xfffffffd
mov byte [rdx + 0x23d], r9b
mov byte [rdx + 0x24f], al
test al, 4
je 0x14006105d
movzx r9d, byte [rdx + 0x236]
and eax, 0xfffffffb
mov byte [rdx + 0x235], r9b
mov byte [rdx + 0x24f], al
test al, 8
je 0x14006108e
movzx r9d, byte [rdx + 0x24a]
mov r10d, r9d
shr r9d, 2
and r10d, 0xfffffffd
and r9d, 1
and eax, 0xfffffff7
add r9d, r9d
or r10d, r9d
mov byte [rdx + 0x24a], r10b
mov byte [rdx + 0x24f], al
test al, 0x10
je 0x1400610aa
movzx r9d, byte [rdx + 0x23c]
and eax, 0xffffffef
mov byte [rdx + 0x23b], r9b
mov byte [rdx + 0x24f], al
test al, 0x20
je 0x1400610c6
movzx r9d, byte [rdx + 0x240]
and eax, 0xffffffdf
mov byte [rdx + 0x23f], r9b
mov byte [rdx + 0x24f], al
mov dword [rsi + rcx + 0xe5050], 0
mov dword [rsi + rcx + 0xe504c], 0xffffffff
cmp dword [0x1400ce448], 2
jge 0x1400610fd
movsxd r8, r8d
lea rax, [r8 + r8*2]
shl rax, 4
mov dword [rsi + rax + 0xe5048], 0
jmp 0x140061130
movsxd r8, r8d
mov dword [rsp + 0x30], ebx
movsxd rbx, ebx
lea rax, [r8 + r8*2]
shl rax, 4
lea rdx, [rbx + rbx*2]
shl rdx, 4
mov dword [rsi + rax + 0xe5048], 0
mov rcx, qword [rsi + rdx + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test rdi, rdi
je 0x1400612a3
mov qword [rdi + 8], 0
jmp 0x1400612a3
cmp edi, 0xfffffffa
lea ecx, [rdi + 5]
cmovle ecx, edi
mov eax, 0xfb93e673
mul ecx
shr edx, 9
imul ebx, edx, 0x209
sub ecx, ebx
add ecx, 0x69
mov eax, dword [0x1400ce448]
cmp eax, 2
mov dword [rsp + 0x30], ecx
movsxd rdx, ecx
jge 0x14006119d
lea rbx, [rdx + rdx*2]
shl rbx, 4
mov edx, dword [rsi + rbx + 0xe5048]
test edx, edx
jne 0x140061227
mov dword [rsi + rbx + 0xe5048], 1
jmp 0x140061227
lea rbx, [0x1400e5040]
lea rax, [rdx + rdx*2]
shl rax, 4
lea rcx, [rbx + rax + 8]
call fcn.14007a450
test eax, eax
jne 0x14006121d
movsxd rcx, dword [rsp + 0x30]
lea rax, [rcx + rcx*2]
shl rax, 4
mov rdx, qword [rsi + rax + 0xe5040]
test rdx, rdx
je 0x14006149d
lea rax, [rcx + rcx*2]
shl rax, 4
mov dword [rsi + rax + 0xe5048], 0
mov edx, 0xffffffff
lea rax, [rcx + rcx*2]
shl rax, 4
mov rcx, qword [rsi + rax + 0xe5040]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movsxd rax, dword [rsp + 0x30]
lea rdx, [rax + rax*2]
shl rdx, 4
lea rcx, [rbx + rdx + 8]
call fcn.14007a450
mov eax, dword [0x1400ce448]
mov ecx, dword [rsp + 0x30]
cmp eax, 1
je 0x140061472
movsxd rcx, ecx
lea rdx, [rcx + rcx*2]
shl rdx, 4
mov rbx, qword [rsi + rdx + 0xe5068]
test rbx, rbx
je 0x14006125d
cmp edi, dword [rbx + 0x1b0]
jbe 0x1400612e6
mov rbx, qword [rbx + 0x48]
test rbx, rbx
jne 0x140061248
cmp eax, 1
je 0x1400612ad
cmp eax, 2
jge 0x140061274
mov dword [rsi + rdx + 0xe5048], 0
jmp 0x14006129a
movsxd rax, dword [rsp + 0x30]
mov dword [rsi + rdx + 0xe5048], 0
lea rdx, [rax + rax*2]
shl rdx, 4
mov rcx, qword [rsi + rdx + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, edi
xor edx, edx
call fcn.140064640
xor eax, eax
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rsi + rdx + 0xe5058]
lea rcx, [rsp + 0x20]
mov rdx, qword [rsi + rdx + 0xe5060]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
call fcn.14007a420
movsxd rdx, dword [rsp + 0x30]
mov eax, dword [0x1400ce448]
lea rdx, [rdx + rdx*2]
shl rdx, 4
jmp 0x140061262
jne 0x14006125d
cmp eax, 1
je 0x140061439
cmp eax, 2
jge 0x140061307
mov dword [rsi + rdx + 0xe5048], 0
jmp 0x14006132d
movsxd rax, dword [rsp + 0x30]
mov dword [rsi + rdx + 0xe5048], 0
lea rdx, [rax + rax*2]
shl rdx, 4
mov rcx, qword [rsi + rdx + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
movzx eax, byte [rbx + 0x24f]
test al, 1
mov rdi, qword [rbx + 0xc0]
mov qword [rbx + 0xc0], 0
je 0x140061370
movzx edx, byte [rbx + 0x247]
mov ecx, edx
shr edx, 6
and ecx, 0xffffffdf
and edx, 1
and eax, 0xfffffffe
shl edx, 5
or ecx, edx
mov byte [rbx + 0x247], cl
mov byte [rbx + 0x24f], al
test al, 2
je 0x14006138a
movzx edx, byte [rbx + 0x23e]
and eax, 0xfffffffd
mov byte [rbx + 0x23d], dl
mov byte [rbx + 0x24f], al
test al, 4
je 0x1400613a4
movzx edx, byte [rbx + 0x236]
and eax, 0xfffffffb
mov byte [rbx + 0x235], dl
mov byte [rbx + 0x24f], al
test al, 8
je 0x1400613cd
movzx edx, byte [rbx + 0x24a]
mov ecx, edx
shr edx, 2
and ecx, 0xfffffffd
and edx, 1
and eax, 0xfffffff7
add edx, edx
or ecx, edx
mov byte [rbx + 0x24a], cl
mov byte [rbx + 0x24f], al
test al, 0x10
je 0x1400613e7
movzx edx, byte [rbx + 0x23c]
and eax, 0xffffffef
mov byte [rbx + 0x23b], dl
mov byte [rbx + 0x24f], al
test al, 0x20
je 0x140061401
movzx edx, byte [rbx + 0x240]
and eax, 0xffffffdf
mov byte [rbx + 0x23f], dl
mov byte [rbx + 0x24f], al
mov dword [rbx + 0x10], 0
mov dword [rbx + 0xc], 0xffffffff
cmp dword [0x1400ce448], 2
jge 0x140061424
mov dword [rbx + 8], 0
jmp 0x140061130
mov rcx, qword [rbx]
mov dword [rbx + 8], 0
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x140061130
mov rax, qword [rsi + rdx + 0xe5058]
lea rcx, [rsp + 0x20]
mov rdx, qword [rsi + rdx + 0xe5060]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
call fcn.14007a420
movsxd rdx, dword [rsp + 0x30]
mov eax, dword [0x1400ce448]
lea rdx, [rdx + rdx*2]
shl rdx, 4
jmp 0x1400612f5
movsxd rcx, ecx
lea rax, [0x1400e5040]
lea rdx, [rcx + rcx*2]
shl rdx, 4
lea rcx, [rax + rdx + 0x18]
call fcn.14007a3e0
mov eax, dword [0x1400ce448]
mov ecx, dword [rsp + 0x30]
jmp 0x140061230
xor ecx, ecx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
movsxd rcx, dword [rsp + 0x30]
lea rdx, [rcx + rcx*2]
shl rdx, 4
mov qword [rsi + rdx + 0xe5040], rax
mov dword [rsi + rdx + 0xe5048], 0
jmp 0x1400611eb
mov eax, dword [0x1400ce448]
cmp eax, 2
jge 0x1400614f1
cmp eax, 1
je 0x140061565
lea rdx, [0x1400ce380]
mov qword [rsp + 0x30], rdx
jmp 0x140061508
lea rcx, [rsp + 0x30]
call fcn.14007a150
test eax, eax
jne 0x1400612a5
mov rdx, qword [rsp + 0x30]
mov rbx, qword [rdx]
test rbx, rbx
je 0x140061599
mov rax, qword [rbx + 0x48]
mov qword [rdx], rax
mov rcx, qword [rbx + 0xa8]
mov rdi, qword [rbx + 0xc0]
mov qword [rbx + 0xc0], 0
test byte [rcx + 0x5f], 2
je 0x14006154a
mov rcx, qword [rcx + 8]
call fcn.1400719c0
mov rcx, qword [rbx + 0xa8]
call fcn.1400719c0
mov rcx, rbx
call fcn.1400719c0
cmp dword [0x1400ce448], 1
je 0x140061576
jmp 0x140061130
lea rcx, [0x1400ce3e8]
call fcn.14007a3e0
jmp 0x1400614e3
mov rdx, qword [rsp + 0x30]
lea rcx, [rsp + 0x20]
mov rax, qword [rdx + 0x68]
mov rbx, qword [rdx + 0x70]
mov qword [rcx], rax
mov qword [rcx + 8], rbx
call fcn.14007a420
jmp 0x140061130
cmp dword [0x1400ce448], 1
jne 0x1400612a3
mov rax, qword [rdx + 0x68]
lea rcx, [rsp + 0x20]
mov rdx, qword [rdx + 0x70]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
call fcn.14007a420
jmp 0x1400612a3