Function at 0x140027380
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x14018d660]
test ecx, ecx
je 0x140027480
cmp ecx, 2
jne 0x1400275cd
test rax, rax
je 0x1400275cd
lea rax, [0x14018d688]
mov qword [rsp + 0x20], rax
mov edx, 0xffffffff
mov rcx, qword [0x14018d688]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete bl
test eax, eax
jne 0x1400273f1
cmp dword [0x14018d698], eax
jne 0x1400273eb
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
mov qword [0x14018d690], rax
inc dword [0x14018d698]
mov byte [rsp + 0x28], bl
xor edi, edi
mov rcx, qword [0x14018d660]
test rcx, rcx
je 0x140027427
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [0x14018d660]
test rcx, rcx
je 0x14002741d
mov rax, qword [rcx]
lea edx, [rdi + 1]
call qword [rax]
mov rcx, rdi
mov qword [0x14018d660], rcx
test bl, bl
je 0x140027470
mov eax, dword [0x14018d698]
sub eax, 1
mov dword [0x14018d698], eax
jns 0x140027444
mov dword [0x14018d698], edi
jmp 0x140027448
test eax, eax
jne 0x14002744f
mov qword [0x14018d690], rdi
mov rcx, qword [0x14018d688]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [0x14018d660]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
mov rax, rcx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
test rax, rax
jne 0x1400275cd
lea rax, [0x14018d688]
mov qword [rsp + 0x20], rax
mov edx, 0xffffffff
mov rcx, qword [0x14018d688]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete bpl
test eax, eax
jne 0x1400274ce
cmp dword [0x14018d698], eax
jne 0x1400274c8
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
mov qword [0x14018d690], rax
inc dword [0x14018d698]
mov byte [rsp + 0x28], bpl
xor edi, edi
mov rsi, qword [0x14018d660]
test rsi, rsi
jne 0x140027580
lea ecx, [rdi + 0x58]
call fcn.1400f89d8
mov rsi, rax
mov qword [rsp + 0x58], rax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm0
movups xmmword [rsi + 0x20], xmm0
movups xmmword [rsi + 0x30], xmm0
movups xmmword [rsi + 0x40], xmm0
mov qword [rsi + 0x50], rax
mov qword [rsi + 8], rdi
mov qword [rsi + 0x18], rdi
mov qword [rsi + 0x20], reloc.WS2_32.dll_ntohs
mov byte [rsi + 8], al
mov dword [rsi + 0x28], edi
lea rax, vtable.SingletonManager.0
mov qword [rsi], rax
lea rbx, [rsi + 0x30]
mov qword [rsp + 0x60], rbx
mov qword [rbx], rdi
mov qword [rbx + 8], rdi
lea ecx, [rdi + 0x48]
call fcn.1400f89d8
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
mov word [rax + 0x18], 0x101
mov qword [rbx], rax
mov qword [rsi + 0x40], rdi
mov qword [rsi + 0x48], rdi
mov dword [rsi + 0x50], edi
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rsi + 0x40], rax
mov qword [0x14018d660], rsi
test bpl, bpl
je 0x1400275ca
mov eax, dword [0x14018d698]
sub eax, 1
mov dword [0x14018d698], eax
jns 0x14002759e
mov dword [0x14018d698], edi
jmp 0x1400275a2
test eax, eax
jne 0x1400275a9
mov qword [0x14018d690], rdi
mov rcx, qword [0x14018d688]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [0x14018d660]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
mov rax, rsi
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret