Function at 0x180097cb0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rsp + 0xf0], rbx
mov rax, qword [0x1806c4cd8]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r15, rdx
mov rsi, rcx
xor r12d, r12d
mov dword [rbp - 0x39], r12d
lea r14, [rcx + 0xb0]
mov qword [rbp - 0x11], r12
mov qword [rbp - 9], r12
mov qword [rbp - 0x11], r12
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r12w
mov r13d, 1
mov dword [rbp - 0x39], r13d
mov rdx, qword [r14 + 0x10]
inc rdx
lea rcx, [rbp - 0x21]
call fcn.180099b70
mov r9, r14
cmp qword [r14 + 0x18], 8
jb 0x180097d3a
mov r9, qword [r14]
mov rdx, qword [r14 + 0x10]
mov rcx, qword [rbp - 0x11]
mov r8, qword [rbp - 9]
mov rax, r8
sub rax, rcx
cmp rdx, rax
ja 0x180097d7d
lea rdi, [rcx + rdx]
mov qword [rbp - 0x11], rdi
lea rbx, [rbp - 0x21]
cmp r8, 8
cmovae rbx, qword [rbp - 0x21]
lea r8, [rdx + rdx]
lea rcx, [rbx + rcx*2]
mov rdx, r9
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi*2], r12w
jmp 0x180097d8b
mov qword [rsp + 0x20], rdx
lea rcx, [rbp - 0x21]
call fcn.1800998c0
mov rcx, qword [rbp - 0x11]
mov rdx, qword [rbp - 9]
mov rax, rdx
sub rax, rcx
cmp rax, r13
jb 0x180097dd0
lea rdi, [rcx + 1]
mov qword [rbp - 0x11], rdi
lea rbx, [rbp - 0x21]
cmp rdx, 8
cmovae rbx, qword [rbp - 0x21]
lea rcx, [rbx + rcx*2]
mov r8d, 2
lea rdx, [0x1805dc02c]
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi*2], r12w
jmp 0x180097de8
mov qword [rsp + 0x20], r13
lea r9, [0x1805dc02c]
mov rdx, r13
lea rcx, [rbp - 0x21]
call fcn.1800998c0
lea r8, str.8B4EA47A_F703_44C6_9267_FC362953DD41
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 1]
call fcn.1800996e0
nop
mov eax, r13d
and eax, 0xfffffffe
mov dword [rbp - 0x39], eax
mov rdx, qword [rbp - 9]
cmp rdx, 8
jb 0x180097e49
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180097e44
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180097e44
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180468ddc
mov qword [rbp - 0x11], r12
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r12w
mov qword [rbp - 0x49], r12
mov word [rbp - 0x41], 0
mov word [rbp - 0x41], 0
cmp qword [rbp + 0xf], 0
je 0x180097e81
lea r8, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae r8, qword [rbp - 1]
jmp 0x180097e84
mov r8, r12
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rbp - 0x49], rax
test rax, rax
je 0x180097ead
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, byte [rbp - 0x40]
cmp eax, 0xb7
cmove ecx, r13d
mov byte [rbp - 0x40], cl
lea rax, [rbp - 0x49]
mov qword [rbp - 0x21], rax
mov byte [rbp - 0x19], 0
mov rcx, qword [rbp - 0x49]
test rcx, rcx
jne 0x180097ec6
xor bl, bl
jmp 0x180097ee2
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x180097edc
xor bl, bl
jmp 0x180097ee2
mov byte [rbp - 0x41], 1
mov bl, 1
mov byte [rbp - 0x19], bl
mov rax, qword [rsi + 0xa8]
test rax, rax
jne 0x180097f3f
lea ecx, [rax + 0x58]
call fcn.1804688ec
mov qword [rbp - 0x29], rax
lea rdx, [rsi + 0xd0]
mov r8, r14
mov rcx, rax
call fcn.180122bd0
nop
mov rdi, qword [rsi + 0xa8]
mov qword [rsi + 0xa8], rax
test rdi, rdi
je 0x180097f3f
mov rcx, rdi
call fcn.180122d10
mov edx, 0x58
mov rcx, rdi
call fcn.180468ddc
mov rax, qword [rsi + 0xa8]
mov rcx, rax
call fcn.180122ee0
mov rdx, r15
mov rcx, qword [rsi + 0xa8]
test al, al
je 0x180097f5f
call fcn.180122fc0
xor dil, dil
jmp 0x180097f67
call fcn.180122d90
movzx edi, al
test bl, bl
je 0x180097f7e
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x180097f7a
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [rbp - 0x41], 0
mov qword [rbp - 0x21], r12
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x180097f95
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x49], r12
mov word [rbp - 0x41], 0
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x180097fde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180097fd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180097fd9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180468ddc
mov qword [rbp + 0xf], r12
mov qword [rbp + 0x17], 7
mov word [rbp - 1], r12w
movzx eax, dil
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1804688c0
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret