Function at 0x1400f0460
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xf0
mov rax, qword [0x1401d6668]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x20], rdx
cmp byte [rcx], 0
je 0x1400f04de
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rax
mov edx, 0xa0070038
lea rcx, [rbp + 7]
call fcn.140022e50
nop
lea rdx, str.Cannot_enter_section_twice
lea rcx, [rbp + 7]
call fcn.140023850
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140022e90
nop
jmp 0x1400f0887
add rcx, 0x48
call fcn.140055cf0
test rax, rax
jne 0x1400f0574
lea rsi, [rdi + 8]
mov r8, rsi
cmp qword [rsi + 0x18], 0x10
jb 0x1400f0501
mov r8, qword [rsi]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
cmp eax, 5
jne 0x1400f0544
cmp qword [rsi + 0x18], 0x10
jb 0x1400f0526
mov rsi, qword [rsi]
mov r8, rsi
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexA]
mov r14, rax
test rax, rax
je 0x1400f08c1
jmp 0x1400f054d
test r14, r14
je 0x1400f08ca
mov rdx, r14
lea rcx, [rsp + 0x20]
call fcn.1400904f0
nop
lea rdx, [rsp + 0x20]
lea rcx, [rdi + 0x48]
call fcn.14009c960
nop
lea rcx, [rsp + 0x20]
call fcn.14009c950
lea rcx, [rdi + 0x48]
call fcn.140055cf0
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x1400f07e8
xorps xmm0, xmm0
cmp eax, 0x102
je 0x1400f07a6
mov edx, 0x20000001
cmp eax, 0xffffffff
je 0x1400f06ab
xor eax, eax
movups xmmword [rbp - 0x21], xmm0
movups xmmword [rbp - 0x11], xmm0
mov qword [rbp - 1], rax
lea rcx, [rbp - 0x21]
call fcn.140022e50
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x19], eax
mov edx, eax
lea rcx, [rbp - 0x69]
call fcn.1400214c0
nop
mov r8, rax
lea rdx, str.Unexpected_result_while_obtaining_mutex._ErrorCode:
lea rcx, [rsp + 0x28]
call fcn.1400202b0
nop
cmp qword [rax + 0x18], 0x10
jb 0x1400f05fb
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp - 0x21]
call fcn.140023820
nop
mov rdx, qword [rbp - 0x79]
cmp rdx, 0x10
jb 0x1400f0644
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400f063f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400f0954
call fcn.140146acc
mov qword [rsp + 0x38], 0
mov qword [rbp - 0x79], reloc.OLEAUT32.dll_SafeArrayDestroy
mov byte [rsp + 0x28], 0
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x1400f0695
inc rdx
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400f0690
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400f095a
call fcn.140146acc
lea rdx, [rbp - 0x21]
mov rcx, rbx
call fcn.140022e90
nop
lea rcx, [rbp - 0x21]
jmp 0x1400f088b
mov byte [rdi], 0
xor eax, eax
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rax
lea rcx, [rbp + 7]
call fcn.140022e50
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0xf], eax
mov edx, eax
lea rcx, [rbp - 0x69]
call fcn.1400214c0
nop
mov r8, rax
lea rdx, str.Mutex_wait_failed._ErrorCode:
lea rcx, [rsp + 0x28]
call fcn.1400202b0
nop
cmp qword [rax + 0x18], 0x10
jb 0x1400f06fa
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp + 7]
call fcn.140023820
nop
mov rdx, qword [rbp - 0x79]
cmp rdx, 0x10
jb 0x1400f0743
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400f073e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400f0960
call fcn.140146acc
mov qword [rsp + 0x38], 0
mov qword [rbp - 0x79], reloc.OLEAUT32.dll_SafeArrayDestroy
mov byte [rsp + 0x28], 0
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x1400f0794
inc rdx
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400f078f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400f08bb
call fcn.140146acc
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140022e90
nop
jmp 0x1400f0887
mov byte [rdi], 0
xor eax, eax
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rax
mov edx, 0xa0070037
lea rcx, [rbp + 7]
call fcn.140022e50
nop
lea rdx, str.Could_not_enter_critical_section
lea rcx, [rbp + 7]
call fcn.140023850
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140022e90
nop
jmp 0x1400f0887
mov byte [rdi], 1
lea r9, [rdi + 0x28]
cmp qword [r9 + 0x18], 0x10
jb 0x1400f07f9
mov r9, qword [r9]
xor r8d, r8d
lea edx, [r8 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rdx, rax
lea rcx, [rdi + 0x50]
call fcn.14009c9b0
lea rcx, [rdi + 0x50]
call fcn.140055cf0
test rax, rax
je 0x1400f0842
lea rcx, [rdi + 0x50]
call fcn.140055cf0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x1400f0842
mov rcx, rbx
call fcn.140022e10
jmp 0x1400f0890
mov rcx, rdi
call fcn.1400f0a10
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rax
mov edx, 0xa0070037
lea rcx, [rbp + 7]
call fcn.140022e50
nop
lea rdx, str.Could_not_enter_critical_section___setting_flag_failed
lea rcx, [rbp + 7]
call fcn.140023850
lea rdx, [rbp + 7]
mov rcx, rbx
call fcn.140022e90
nop
lea rcx, [rbp + 7]
call fcn.140023190
mov rax, rbx
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140146a70
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.140117a1c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov edx, 0x28
lea rcx, [rbp + 7]
call fcn.140024ae0
mov edx, 0x20000001
lea rcx, [rbp + 7]
call fcn.140022e50
nop
mov dword [rbp + 0xf], r12d
mov edx, r12d
lea rcx, [rsp + 0x28]
call fcn.1400214c0
nop
mov r8, rax
lea rdx, str.Failed_to_create_or_open_mutex._ErrorCode:
lea rcx, [rbp - 0x69]
call fcn.1400202b0
nop
mov rcx, rax
call fcn.140020080
mov rdx, rax
lea rcx, [rbp + 7]
call fcn.140023820
nop
lea rcx, [rbp - 0x69]
call fcn.140020090
nop
lea rcx, [rsp + 0x28]
call fcn.140020090
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x49]
call fcn.140022e90
lea rdx, [0x1401d17b0]
lea rcx, [rbp - 0x49]
call fcn.140139bfc
nop
call fcn.140117a1c
nop
call fcn.140117a1c
nop
call fcn.140117a1c
int3