Function at 0x140061730
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov esi, ecx
mov ecx, esi
lea rdx, [rsp + 0x38]
xor r8d, r8d
mov r9d, Ordinal_34
call fcn.140061ea0
cmp eax, 0x28
je 0x14006175f
test eax, eax
je 0x14006175f
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
cmp esi, 0xfffffffb
je 0x140061da0
cmp esi, 0xfffffffa
jle 0x140061776
lea ecx, [rsi + 5]
mov eax, ecx
mov edx, ecx
jmp 0x14006177c
mov ecx, esi
mov eax, esi
mov edx, esi
test ecx, ecx
jl 0x140061955
cmp ecx, 0x68
jg 0x140061955
movsxd rcx, ecx
mov dword [rsp + 0x30], edx
lea rdx, [0x140000000]
lea r8, [rcx + rcx*2]
shl r8, 4
mov rbx, qword [rdx + r8 + 0xe5068]
test rbx, rbx
je 0x140061ae9
mov rdx, qword [rbx + 0x30]
test rdx, rdx
jne 0x140061ae9
mov rsi, qword [rbx + 0xc0]
mov qword [rbx + 0xc0], 0
test byte [rbx + 0x245], 0x18
jne 0x140061876
movsxd rax, eax
lea rdx, [0x140000000]
mov rcx, rdx
mov rdi, rdx
mov qword [rdx + r8 + 0xe5068], 0
lea rdx, [rax + rax*2]
shl rdx, 4
mov dword [rcx + r8 + 0xe5050], 0
mov dword [rdi + r8 + 0xe504c], 0xffffffff
cmp dword [0x1400ce448], 2
jge 0x140061839
lea rax, [0x140000000]
mov dword [rax + rdx + 0xe5048], 0
jmp 0x140061869
lea rax, [0x140000000]
mov rdi, rax
mov dword [rax + rdx + 0xe5048], 0
movsxd rdx, dword [rsp + 0x30]
lea r8, [rdx + rdx*2]
shl r8, 4
mov rcx, qword [rdi + r8 + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call fcn.1400719c0
jmp 0x14006193f
mov ecx, dword [rbx + 0x1b0]
movabs rdx, 0
mov eax, 0x258
mov qword [rbx + rax - 8], rdx
mov qword [rbx + rax - 0x10], rdx
mov qword [rbx + rax - 0x18], rdx
mov qword [rbx + rax - 0x20], rdx
mov qword [rbx + rax - 0x28], rdx
sub rax, 0x28
jne 0x14006188b
movsxd rdi, dword [rsp + 0x30]
lea rdx, [0x140000000]
movzx eax, byte [rbx + 0x245]
and eax, 0xffffffe7
or eax, 8
or byte [rbx + 0x24e], 4
mov byte [rbx + 0x245], al
mov dword [rbx + 0x1b0], ecx
lea rbx, [rdi + rdi*2]
shl rbx, 4
mov rcx, rdx
cmp dword [0x1400ce448], 2
mov dword [rdx + rbx + 0xe5050], 0
mov dword [rcx + rbx + 0xe504c], 0xffffffff
jge 0x140061914
lea rax, [0x140000000]
mov dword [rax + rbx + 0xe5048], 0
jmp 0x14006193f
lea rax, [0x140000000]
mov rdx, rax
mov dword [rax + rbx + 0xe5048], 0
lea rbx, [rdi + rdi*2]
shl rbx, 4
mov rcx, qword [rdx + rbx + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test rsi, rsi
je 0x140061af2
mov qword [rsi + 8], 0
jmp 0x140061af2
cmp esi, 0xfffffffa
lea ecx, [rsi + 5]
cmovle ecx, esi
mov eax, 0xfb93e673
mul ecx
shr edx, 9
imul ebx, edx, 0x209
sub ecx, ebx
add ecx, 0x69
mov edx, dword [0x1400ce448]
cmp edx, 2
mov dword [rsp + 0x30], ecx
movsxd rax, ecx
jge 0x1400619ba
lea rdi, [rax + rax*2]
lea rax, [0x140000000]
shl rdi, 4
mov ebx, dword [rax + rdi + 0xe5048]
test ebx, ebx
jne 0x140061a59
lea rax, [0x140000000]
mov dword [rax + rdi + 0xe5048], 1
jmp 0x140061a59
lea rbx, [0x1400e5040]
lea rax, [rax + rax*2]
shl rax, 4
lea rcx, [rbx + rax + 8]
call fcn.14007a450
test eax, eax
jne 0x140061a4f
movsxd rdx, dword [rsp + 0x30]
lea rax, [0x140000000]
lea rcx, [rdx + rdx*2]
shl rcx, 4
mov rdi, qword [rax + rcx + 0xe5040]
test rdi, rdi
je 0x140061d64
lea rax, [0x140000000]
lea rcx, [rdx + rdx*2]
shl rcx, 4
mov dword [rax + rcx + 0xe5048], 0
lea rax, [0x140000000]
lea rdi, [rdx + rdx*2]
shl rdi, 4
mov edx, 0xffffffff
mov rcx, qword [rax + rdi + 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 edx, dword [0x1400ce448]
mov ecx, dword [rsp + 0x30]
cmp edx, 1
je 0x140061d39
movsxd rcx, ecx
lea rbx, [0x140000000]
lea rax, [rcx + rcx*2]
xor ecx, ecx
shl rax, 4
mov rbx, qword [rbx + rax + 0xe5068]
test rbx, rbx
je 0x140061a9b
cmp esi, dword [rbx + 0x1b0]
jbe 0x140061b3f
mov rcx, rbx
mov rbx, qword [rbx + 0x48]
test rbx, rbx
jne 0x140061a83
cmp edx, 1
je 0x140061afc
cmp edx, 2
jge 0x140061ab9
lea rdx, [0x140000000]
mov dword [rdx + rax + 0xe5048], 0
jmp 0x140061ae9
lea rdx, [0x140000000]
mov rbx, rdx
mov dword [rdx + rax + 0xe5048], 0
movsxd rax, dword [rsp + 0x30]
lea rdi, [rax + rax*2]
shl rdi, 4
mov rcx, qword [rbx + rdi + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, esi
xor edx, edx
call fcn.140064640
xor eax, eax
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
lea rdx, [0x140000000]
lea rcx, [rsp + 0x20]
mov rdi, rdx
mov rbx, qword [rdx + rax + 0xe5058]
mov rax, qword [rdi + rax + 0xe5060]
mov qword [rcx], rbx
mov qword [rcx + 8], rax
call fcn.14007a420
movsxd rax, dword [rsp + 0x30]
mov edx, dword [0x1400ce448]
lea rax, [rax + rax*2]
shl rax, 4
jmp 0x140061aa0
jne 0x140061a9b
test rcx, rcx
je 0x140061d21
mov rsi, qword [rbx + 0x48]
mov qword [rcx + 0x48], rsi
cmp edx, 1
je 0x140061cde
cmp edx, 2
jge 0x140061b78
lea rdx, [0x140000000]
mov dword [rdx + rax + 0xe5048], 0
jmp 0x140061ba8
lea rdx, [0x140000000]
mov rsi, rdx
mov dword [rdx + rax + 0xe5048], 0
movsxd rax, dword [rsp + 0x30]
lea rdi, [rax + rax*2]
shl rdi, 4
mov rcx, qword [rsi + rdi + 0xe5040]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
movzx eax, byte [rbx + 0x24f]
test al, 1
mov rsi, qword [rbx + 0xc0]
mov qword [rbx + 0xc0], 0
je 0x140061beb
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 0x140061c05
movzx edx, byte [rbx + 0x23e]
and eax, 0xfffffffd
mov byte [rbx + 0x23d], dl
mov byte [rbx + 0x24f], al
test al, 4
je 0x140061c1f
movzx edx, byte [rbx + 0x236]
and eax, 0xfffffffb
mov byte [rbx + 0x235], dl
mov byte [rbx + 0x24f], al
test al, 8
je 0x140061c48
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 0x140061c62
movzx edx, byte [rbx + 0x23c]
and eax, 0xffffffef
mov byte [rbx + 0x23b], dl
mov byte [rbx + 0x24f], al
test al, 0x20
je 0x140061c7c
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 0x140061c9c
mov dword [rbx + 8], 0
jmp 0x140061cac
mov rcx, qword [rbx]
mov dword [rbx + 8], 0
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [0x1400ce448], 2
jl 0x140061cc3
mov rcx, qword [rbx]
test rcx, rcx
je 0x140061cc3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
mov dword [rbx + 0xc], 0xffffffff
mov dword [rbx + 0x10], 0
call fcn.1400719c0
jmp 0x14006193f
lea rdx, [0x140000000]
lea rcx, [rsp + 0x20]
mov rdi, rdx
mov rsi, qword [rdx + rax + 0xe5058]
mov rax, qword [rdi + rax + 0xe5060]
mov qword [rcx], rsi
mov qword [rcx + 8], rax
call fcn.14007a420
movsxd rax, dword [rsp + 0x30]
mov edx, dword [0x1400ce448]
lea rax, [rax + rax*2]
shl rax, 4
jmp 0x140061b5f
lea rsi, [0x140000000]
mov rcx, qword [rbx + 0x48]
mov qword [rsi + rax + 0xe5068], rcx
jmp 0x140061b56
movsxd rcx, ecx
lea rax, [0x1400e5040]
lea rdx, [rcx + rcx*2]
shl rdx, 4
lea rcx, [rax + rdx + 0x18]
call fcn.14007a3e0
mov edx, dword [0x1400ce448]
mov ecx, dword [rsp + 0x30]
jmp 0x140061a62
xor ecx, ecx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
movsxd rdx, dword [rsp + 0x30]
lea rcx, [0x140000000]
lea rdi, [rdx + rdx*2]
shl rdi, 4
mov qword [rcx + rdi + 0xe5040], rax
mov rax, rcx
mov dword [rax + rdi + 0xe5048], 0
jmp 0x140061a16
mov eax, dword [0x1400ce448]
cmp eax, 2
jge 0x140061dc2
cmp eax, 1
je 0x140061e36
lea rdx, [0x1400ce380]
mov qword [rsp + 0x30], rdx
jmp 0x140061dd9
lea rcx, [rsp + 0x30]
call fcn.14007a150
test eax, eax
jne 0x140061af4
mov rdx, qword [rsp + 0x30]
mov rbx, qword [rdx]
test rbx, rbx
je 0x140061e6a
mov rax, qword [rbx + 0x48]
mov qword [rdx], rax
mov rcx, qword [rbx + 0xa8]
mov rsi, qword [rbx + 0xc0]
mov qword [rbx + 0xc0], 0
test byte [rcx + 0x5f], 2
je 0x140061e1b
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 0x140061e47
jmp 0x14006193f
lea rcx, [0x1400ce3e8]
call fcn.14007a3e0
jmp 0x140061db4
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 0x14006193f
cmp dword [0x1400ce448], 1
jne 0x140061af2
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 0x140061af2