Function at 0x180021054
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 r12d, r13d
mov byte [rax - 0x78], r13b
call sub.ntdll.dll_memset
xor ecx, ecx
call fcn.18001ab60
lea ebp, [r13 + 1]
mov edx, 0x12c
mov r8d, 0x3c6ef35f
mov r15, rax
cmp rbx, r13
je 0x1800210d8
cmp byte [rbx], 2
ja 0x1800210d8
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 0x180021147
lea r12d, [r13 + 0xd]
jmp 0x1800217b3
mov ecx, dword [0x1800591c0]
mov byte [rsp + 0x30], 2
mov byte [rsp + 0x31], bpl
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 [0x1800591c0], 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]
mov qword [rdi], rax
cmp rax, r13
jne 0x18002116a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
jmp 0x1800217b3
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, ebp
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 0x18002121e
mov rcx, qword [0x180059270]
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]
mov qword [rdi + 0xd38], rax
cmp rax, r13
je 0x1800217b3
mov rcx, qword [0x180059270]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi + 0xd30], rax
cmp qword [rdi + 0xd38], r13
je 0x1800217b3
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.1800449ec
cmp eax, r13d
je 0x1800217b3
lea rsi, [rdi + 0xc8]
mov r14d, r13d
cmp qword [rsi + 0xa8], r13
jne 0x18002140c
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, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0xa8], rax
cmp rax, r13
jne 0x18002133a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
jmp 0x180021373
lea rcx, [rsi + 0x54]
xor r8d, r8d
xor edx, edx
call fcn.180043204
mov r12d, eax
cmp eax, r13d
jne 0x18002137c
mov r14d, ebp
mov ebp, r13d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.180042ff0
test r12d, r12d
jne 0x18002140c
inc ebp
cmp ebp, 0xa
jl 0x180021356
cmp r12d, r13d
je 0x18002140c
mov rcx, qword [rsi + 0xa8]
cmp rcx, r13
je 0x1800213f4
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1800213db
mov rbp, qword [rsi]
mov rcx, qword [rbp]
mov rax, qword [rbp + 8]
mov qword [rax], rcx
mov qword [rcx + 8], rax
mov rcx, qword [rbp + 0x10]
cmp rcx, r13
je 0x1800213db
mov edx, 0x2710
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, r13d
jne 0x1800213db
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x180059270]
mov r8, rbp
xor edx, edx
mov qword [rbp + 0x10], r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsi], rsi
jne 0x180021390
mov rcx, qword [rsi + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0xa8], r13
cmp r14d, r13d
je 0x180021402
lea rcx, [rsi + 0x54]
call fcn.180043330
lea rcx, [rsi + 0x2c]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp r12d, r13d
jne 0x1800217b3
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
lea rax, [r15 + 0x78]
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 + 0x218], r15
mov qword [rdi + 0x290], rax
lea rax, [r15 + 0x4b0]
mov qword [rdi + 0x208], r15
mov qword [rdi + 0xe68], rax
lea rax, [0x18000f9d4]
mov qword [rdi + 0xe60], r13
mov qword [rdi + 0xe78], r15
mov qword [rdi + 0xe30], r8
mov qword [rdi + 0x3d8], r15
mov qword [rdi + 0xe98], rax
mov qword [rdi + 0xe90], r13
mov qword [rdi + 0xea0], r13
mov qword [rdi + 0xea8], r13
mov qword [rdi + 0xeb0], r13
cmp dword [rdi + 0xe40], r13d
jne 0x18002156a
mov ecx, dword [rdi + 0xc4]
mov edx, ecx
and edx, esi
je 0x18002153f
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 0x18002154b
mov qword [rdi + 0x190], r8
cmp edx, esi
jne 0x180021595
cmp ecx, 2
jne 0x180021595
mov rax, qword [rdi + 0xe88]
mov dword [rdi + 0x298], esi
mov qword [rdi + 0x288], rax
jmp 0x180021595
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 0x1800215af
cmp qword [rbx + 0xe], r13
jne 0x1800215af
lea rcx, [rdi + 8]
call fcn.18001b1ec
jmp 0x1800215bb
mov qword [rdi + 8], rax
mov rax, qword [rbx + 0xe]
mov qword [rdi + 0x10], rax
mov eax, dword [rbx + 0x1a]
cmp eax, r13d
jne 0x1800215ef
mov ecx, dword [0x1800591c0]
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 [0x1800591c0], ecx
shr ecx, 1
or eax, ecx
mov dword [rdi + 0xc0], eax
movzx eax, word [rbx + 0x18]
cmp ax, r13w
jne 0x18002160a
cmp dword [rbx + 2], r13d
je 0x18002160e
mov eax, 0x561d
mov word [rdi + 0x2e], ax
movzx eax, word [rdi + 0x2e]
mov word [rdi + 0xb4], ax
movzx eax, word [rbx + 0x16]
cmp ax, r13w
jne 0x18002162e
cmp dword [rbx + 2], r13d
je 0x180021632
mov eax, 0x7c24
mov word [rdi + 0x2c], ax
mov eax, dword [rbx + 0x1e]
cmp eax, r13d
je 0x180021645
imul eax, eax, 0x3c
mov dword [rdi + 0x274], eax
jmp 0x18002164f
mov dword [rdi + 0x274], 0x1c20
mov eax, dword [rbx + 0x22]
cmp eax, r13d
je 0x180021662
imul eax, eax, 0x3c
mov dword [rdi + 0x278], eax
jmp 0x18002166c
mov dword [rdi + 0x278], 0x12c
mov eax, dword [rbx + 0x26]
cmp eax, r13d
je 0x18002167f
imul eax, eax, 0x3c
mov dword [rdi + 0x27c], eax
jmp 0x180021689
mov dword [rdi + 0x27c], 0x12c
mov eax, dword [rbx + 0x2a]
cmp eax, r13d
je 0x18002169c
imul eax, eax, 0x3c
mov dword [rdi + 0xbc], eax
jmp 0x1800216a6
mov dword [rdi + 0xbc], 0xd2f00
movzx r8d, byte [rbx + 0x2e]
lea rdx, [rbx + 0x2f]
mov rcx, rdi
call fcn.180020e88
lea r11, [rdi + 0x250]
lea rax, [rdi + 0x260]
mov qword [rdi + 0x258], r11
mov qword [rdi + 0x268], rax
mov qword [r11], r11
mov qword [rax], rax
cmp dword [rdi + 0xe40], r13d
jne 0x1800216f7
test byte [rdi + 0xc4], 2
je 0x1800216fd
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.18001ab60
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, r12d
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