Function at 0x180020b14
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
xor r13d, r13d
mov rdi, rcx
mov rbx, rdx
lea rcx, [rax - 0x77]
lea r8d, [r13 + 0x44]
xor edx, edx
mov ebp, r13d
mov byte [rax - 0x78], r13b
call sub.ntdll.dll_memset
xor ecx, ecx
call fcn.18001a9f8
cmp rbx, r13
mov edx, 0x12c
lea r12d, [r13 + 1]
mov r8d, 0x3c6ef35f
mov r15, rax
je 0x180020b98
cmp byte [rbx], 2
ja 0x180020b98
movzx edx, byte [rbx + 0x2e]
mov rcx, rbx
imul rdx, rdx, 0x16
add rdx, 0x45
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, r13d
je 0x180020c07
lea ebp, [r13 + 0xd]
jmp 0x18002127d
mov ecx, dword [0x180052e00]
mov byte [rsp + 0x30], 2
mov byte [rsp + 0x31], r12b
mov word [rsp + 0x48], r13w
mov word [rsp + 0x46], r13w
mov qword [rsp + 0x3e], r13
imul ecx, ecx, 0x19660d
add ecx, r8d
mov qword [rsp + 0x36], r13
mov dword [rsp + 0x52], edx
mov eax, ecx
mov dword [rsp + 0x4e], 0x1c20
mov dword [rsp + 0x56], edx
imul ecx, ecx, 0x19660d
add ecx, r8d
shr eax, 1
mov dword [rsp + 0x5a], 0xd2f00
mov dword [0x180052e00], ecx
shr ecx, 1
shl eax, 0x10
or eax, ecx
mov dword [rsp + 0x32], r13d
lea rbx, [rsp + 0x30]
mov dword [rsp + 0x4a], eax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp rax, r13
mov qword [rdi], rax
jne 0x180020c29
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x18002127d
lea rax, [rdi + 0x390]
mov ecx, r13d
lea rdx, [rdi + 0x3e0]
mov qword [rax], rax
mov qword [rdi + 0x398], rax
lea rax, [rdi + 0x3a0]
mov qword [rax], rax
mov qword [rdi + 0x3a8], rax
lea rax, [rdi + 0xe48]
mov qword [rax], rax
mov qword [rdi + 0xe50], rax
lea rax, [rdi + 0x1a0]
mov qword [rax], rax
mov qword [rdi + 0x1a8], rax
lea rax, [rdi + 0xd58]
mov qword [rax], rax
mov qword [rdi + 0xd60], rax
lea rax, [rdi + 0x3b0]
mov qword [rax], rax
mov qword [rdi + 0x3b8], rax
lea rax, [rdi + 0x3c0]
mov qword [rax], rax
mov qword [rdi + 0x3c8], rax
lea rax, [rdi + 0x1e8]
mov qword [rax], rax
mov qword [rdi + 0x1f0], rax
lea rax, [rdi + 0x2a8]
mov qword [rax], rax
mov qword [rdi + 0x2b0], rax
lea rax, [rdi + 0xbe0]
mov qword [rax], rax
mov qword [rdi + 0xbe8], rax
movsxd rax, ecx
add ecx, r12d
add rax, 0x3e
shl rax, 4
add rax, rdi
mov qword [rdx + 8], rax
mov qword [rdx], rax
add rdx, 0x10
cmp ecx, 0x80
jb 0x180020cdd
mov rcx, qword [0x180052eb0]
mov dword [rdi + 0xc4], r13d
mov eax, dword [rbx + 2]
mov esi, 0x580
xor edx, edx
mov dword [rdi + 0xe40], eax
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp rax, r13
mov qword [rdi + 0xd38], rax
je 0x18002127d
mov rcx, qword [0x180052eb0]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp qword [rdi + 0xd38], r13
mov qword [rdi + 0xd30], rax
je 0x18002127d
lea rcx, [rdi + 0xbf8]
mov word [rdi + 0xd40], si
mov dword [rsp + 0x20], 0x200
lea r9, [rcx + 0x18]
lea r8, [rcx + 0x10]
lea rdx, [rcx + 8]
call fcn.180041490
cmp eax, r13d
je 0x18002127d
lea rsi, [rdi + 0xc8]
mov r14d, r13d
cmp qword [rsi + 0xa8], r13
jne 0x180020ed0
lea rax, [rsi + 0x10]
lea rcx, [rsi + 0x2c]
mov dword [rsi + 0x24], 0xa
mov dword [rsi + 0x20], 0x4e20
mov dword [rsi + 0x28], r13d
mov qword [rsi + 8], rsi
mov qword [rax], rax
mov qword [rsi], rsi
mov qword [rsi + 0x18], rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
cmp rax, r13
mov qword [rsi + 0xa8], rax
jne 0x180020dfa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x180020e33
lea rcx, [rsi + 0x54]
xor r8d, r8d
xor edx, edx
call fcn.18003fe24
cmp eax, r13d
mov ebp, eax
jne 0x180020e3c
mov r14d, r12d
mov r12d, r13d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.18003fc10
test ebp, ebp
jne 0x180020ed0
add r12d, r14d
cmp r12d, 0xa
jl 0x180020e15
cmp ebp, r13d
je 0x180020ed0
mov rcx, qword [rsi + 0xa8]
cmp rcx, r13
je 0x180020eb8
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x180020e9f
mov r12, qword [rsi]
mov rcx, qword [r12]
mov rax, qword [r12 + 8]
mov qword [rax], rcx
mov qword [rcx + 8], rax
mov rcx, qword [r12 + 0x10]
cmp rcx, r13
je 0x180020e9f
mov edx, 0x2710
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, r13d
jne 0x180020e9f
mov rcx, qword [r12 + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x180052eb0]
mov r8, r12
xor edx, edx
mov qword [r12 + 0x10], r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsi], rsi
jne 0x180020e50
mov rcx, qword [rsi + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0xa8], r13
cmp r14d, r13d
je 0x180020ec6
lea rcx, [rsi + 0x54]
call fcn.18003ff50
lea rcx, [rsi + 0x2c]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp ebp, r13d
jne 0x18002127d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea r8, [r15 + 0x708]
mov esi, 1
mov dword [rdi + 0x1b0], eax
lea rax, [rdi + 0x1b8]
mov qword [rax], rax
mov qword [rdi + 0x1c0], rax
lea rax, [rdi + 0x1c8]
mov qword [rax], rax
mov qword [rdi + 0x1d0], rax
lea rax, [rdi + 0x1d8]
mov qword [rax], rax
mov qword [rdi + 0x1e0], rax
cmp dword [rdi + 0xe40], r13d
lea rax, [r15 + 0x78]
mov qword [rdi + 0x218], r15
mov qword [rdi + 0x208], r15
mov qword [rdi + 0x188], rax
mov qword [rdi + 0x198], rax
lea rax, [r15 + 0xf0]
mov qword [rdi + 0x190], rax
lea rax, [r15 + 0x168]
mov qword [rdi + 0xe60], r13
mov qword [rdi + 0x290], rax
lea rax, [r15 + 0x4b0]
mov qword [rdi + 0xe78], r15
mov qword [rdi + 0xe68], rax
lea rax, [0x18000f9a0]
mov qword [rdi + 0xe30], r8
mov qword [rdi + 0x3d8], r15
mov qword [rdi + 0xe90], r13
mov qword [rdi + 0xea0], r13
mov qword [rdi + 0xe98], rax
mov qword [rdi + 0xea8], r13
mov qword [rdi + 0xeb0], r13
jne 0x18002102e
mov ecx, dword [rdi + 0xc4]
mov edx, ecx
and edx, esi
je 0x180021003
lea rax, [r15 + 0xf]
mov dword [rdi + 0x178], 4
mov dword [rdi + 0x17c], r13d
mov qword [rdi + 0x218], rax
lea rax, [r15 + 0xe10]
mov dword [rdi + 0x180], esi
mov qword [rdi + 0x188], rax
mov dword [rdi + 0x1f8], 3
and ecx, 2
je 0x18002100f
mov qword [rdi + 0x190], r8
cmp edx, esi
jne 0x180021059
cmp ecx, 2
jne 0x180021059
mov rax, qword [rdi + 0xe88]
mov dword [rdi + 0x298], esi
mov qword [rdi + 0x288], rax
jmp 0x180021059
mov dword [rdi + 0x178], 4
mov dword [rdi + 0x17c], 4
mov dword [rdi + 0x180], r13d
mov dword [rdi + 0x1f8], 3
mov dword [rdi + 0x318], esi
mov rax, qword [rbx + 6]
cmp rax, r13
jne 0x180021073
cmp qword [rbx + 0xe], r13
jne 0x180021073
lea rcx, [rdi + 8]
call fcn.18001b080
jmp 0x18002107f
mov qword [rdi + 8], rax
mov rax, qword [rbx + 0xe]
mov qword [rdi + 0x10], rax
mov eax, dword [rbx + 0x1a]
cmp eax, r13d
jne 0x1800210b3
mov ecx, dword [0x180052e00]
mov edx, 0x3c6ef35f
imul ecx, ecx, 0x19660d
add ecx, edx
mov eax, ecx
imul ecx, ecx, 0x19660d
shr eax, 1
add ecx, edx
shl eax, 0x10
mov dword [0x180052e00], ecx
shr ecx, 1
or eax, ecx
mov dword [rdi + 0xc0], eax
movzx eax, word [rbx + 0x18]
cmp ax, r13w
je 0x1800210c9
mov word [rdi + 0x2e], ax
jmp 0x1800210d5
cmp dword [rbx + 2], r13d
je 0x1800210d5
mov word [rdi + 0x2e], 0xa78b
movzx eax, word [rdi + 0x2e]
mov word [rdi + 0xb4], ax
movzx eax, word [rbx + 0x16]
cmp ax, r13w
je 0x1800210f0
mov word [rdi + 0x2c], ax
jmp 0x1800210fc
cmp dword [rbx + 2], r13d
je 0x1800210fc
mov word [rdi + 0x2c], 0x244d
mov eax, dword [rbx + 0x1e]
cmp eax, r13d
je 0x18002110f
imul eax, eax, 0x3c
mov dword [rdi + 0x274], eax
jmp 0x180021119
mov dword [rdi + 0x274], 0x1c20
mov eax, dword [rbx + 0x22]
cmp eax, r13d
je 0x18002112c
imul eax, eax, 0x3c
mov dword [rdi + 0x278], eax
jmp 0x180021136
mov dword [rdi + 0x278], 0x12c
mov eax, dword [rbx + 0x26]
cmp eax, r13d
je 0x180021149
imul eax, eax, 0x3c
mov dword [rdi + 0x27c], eax
jmp 0x180021153
mov dword [rdi + 0x27c], 0x12c
mov eax, dword [rbx + 0x2a]
cmp eax, r13d
je 0x180021166
imul eax, eax, 0x3c
mov dword [rdi + 0xbc], eax
jmp 0x180021170
mov dword [rdi + 0xbc], 0xd2f00
movzx r8d, byte [rbx + 0x2e]
lea rdx, [rbx + 0x2f]
mov rcx, rdi
call fcn.180020948
cmp dword [rdi + 0xe40], r13d
lea r11, [rdi + 0x250]
lea rax, [rdi + 0x260]
mov qword [r11], r11
mov qword [rdi + 0x258], r11
mov qword [rax], rax
mov qword [rdi + 0x268], rax
jne 0x1800211c1
test byte [rdi + 0xc4], 2
je 0x1800211c7
mov dword [rdi + 0x220], esi
mov dword [rdi + 0x224], esi
mov dword [rdi + 0x228], esi
lea rax, [rdi + 0x320]
xor ecx, ecx
mov dword [rdi + 0x330], r13d
mov qword [rdi + 0x340], r13
mov qword [rdi + 0x338], r13
mov qword [rdi + 0x348], r13
mov qword [rax], rax
mov qword [rdi + 0x328], rax
lea rbx, [rdi + 0x350]
call fcn.18001a9f8
mov qword [rbx + 8], rbx
mov qword [rbx], rbx
mov qword [rbx + 0x28], rax
lea rcx, [rbx + 0x10]
xor r8d, r8d
mov qword [rcx], rcx
mov qword [rbx + 0x18], rcx
lea rcx, [rax + 0x78]
mov qword [rbx + 0x20], rcx
lea rax, [rdi + 0x380]
xor edx, edx
mov qword [rax + 8], rax
mov qword [rax], rax
xor ecx, ecx
mov word [rdi + 0x2d0], r13w
mov word [rdi + 0x2d2], r13w
mov word [rdi + 0x2d4], r13w
mov qword [rdi + 0x2f0], r13
mov qword [rdi + 0x2f8], r13
mov dword [rdi + 0x310], r13d
mov dword [rdi + 0x2d8], r13d
mov byte [rdi + 0x2dc], r13b
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rdi + 0x300], rax
lea r11, [rsp + 0x80]
mov eax, ebp
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret