Function at 0x10005c944
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x378
mov qword [rsp + 0x118], 0xfffffffffffffffe
mov rax, qword [0x100082138]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov rdi, r9
mov qword [rsp + 0x38], r9
mov r15d, r8d
mov r14d, edx
mov r13, rcx
lea rcx, [rsp + 0x50]
call fcn.10001fee0
nop
lea rcx, [rsp + 0xe8]
call fcn.100019218
nop
lea rcx, [rsp + 0x40]
call fcn.10001fee0
nop
xor ebx, ebx
mov esi, ebx
mov dword [rsp + 0x30], ebx
lea rcx, [rsp + 0x60]
call fcn.10001fee0
nop
mov qword [rsp + 0x68], rbx
mov dword [rsp + 0x58], ebx
lea rcx, [rsp + 0xb8]
call fcn.100019218
nop
mov r12, rbx
mov dword [rsp + 0x48], ebx
mov dword [rdi], ebx
xor edx, edx
lea r8d, [rbx + 0x30]
lea rcx, [rsp + 0x120]
call sub.msvcrt.dll_memset
lea r11, [rsp + 0xe8]
lea ebp, [rbx + 3]
cmp r11, rbx
jne 0x10005ca0c
lea ecx, [rbx + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005ca25
lea r8, [rsp + 0xe8]
mov edx, 4
mov rcx, r13
call fcn.10004584c
cmp eax, ebx
jne 0x10005ca3d
lea rdx, [0x100011430]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x65b
jmp 0x10005cf6d
mov rax, qword [rsp + 0xf8]
cmp eax, 1
jbe 0x10005ca62
lea rdx, [0x100013700]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0xd
jmp 0x10005cf6d
cmp eax, ebx
jne 0x10005ca7e
lea rdx, [0x100011530]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0xd
jmp 0x10005cf6d
mov eax, ebx
mov rdx, qword [rsp + 0xe8]
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x10005ca9d
mov ecx, 0x80004005
call fcn.10001fd10
int3
add rdx, 0x10
lea rcx, [rsp + 0x40]
call fcn.10001ecdc
mov edx, 0x104
lea rcx, [rsp + 0x150]
mov edi, ebx
lea rsi, [0x100012720]
lea rax, [rsp + 0x150]
sub rsi, rax
lea rax, [rdx + 0x7ffffefa]
cmp rax, rbx
je 0x10005caee
movzx eax, word [rcx + rsi]
cmp ax, bx
je 0x10005caee
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x10005cacc
test rdx, rdx
jne 0x10005cafc
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r12w
test edi, edi
jns 0x10005cb16
mov ebx, 0x65b
mov rdi, qword [rsp + 0x38]
mov esi, r12d
jmp 0x10005cf6d
mov r8, qword [rsp + 0x40]
cmp dword [r8 - 8], 1
jle 0x10005cb35
mov edx, dword [r8 - 0x10]
lea rcx, [rsp + 0x40]
call fcn.10001fbd0
mov r8, qword [rsp + 0x40]
mov edx, 0x104
lea rcx, [rsp + 0x150]
call fcn.10001fd58
test eax, eax
jns 0x10005cb5d
mov ebx, 0x65b
mov rdi, qword [rsp + 0x38]
mov esi, r12d
jmp 0x10005cf6d
lea rcx, [rsp + 0x120]
call fcn.100057994
mov ebx, eax
test eax, eax
jne 0x10005cf54
lea r8, [rsp + 0x150]
xor edx, edx
lea rcx, [rsp + 0x120]
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r12, rax
test rax, rax
jne 0x10005cba6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdi, qword [rsp + 0x38]
jmp 0x10005cf26
mov edx, 0x3e8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x10005cbeb
test eax, eax
je 0x10005cbeb
cmp eax, 0x102
jne 0x10005cbd9
mov ebx, 0x20
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdi, qword [rsp + 0x38]
jmp 0x10005cf26
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x5c], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x70]
call fcn.10001ff10
nop
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x5c]
mov rdx, rax
mov rcx, r13
call fcn.10005c1a4
mov ebx, eax
test eax, eax
jne 0x10005cf5e
mov edx, dword [rsp + 0x5c]
mov dword [rsp + 0x30], edx
xor eax, eax
lea rdi, [0x100005b10]
mov rsi, qword [rsp + 0x60]
lea r8d, [rbx + 1]
mov rcx, r8
repe cmpsw word [rsi], word [rdi]
je 0x10005cc6f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10005cd42
test edx, edx
je 0x10005cc96
test r15d, r15d
jne 0x10005cc96
lea rdx, [0x100011a50]
mov ecx, r8d
call fcn.10003c3c0
xor ebx, ebx
jmp 0x10005cf2a
lea rax, [rsp + 0x50]
test rax, rax
jne 0x10005ccab
lea ecx, [rax + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005ccc1
lea r8, [rsp + 0x50]
mov edx, 2
mov rcx, r13
call fcn.1000454bc
test eax, eax
jne 0x10005cce2
lea rdx, [0x10000ca00]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x643
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
cmp r14d, 9
jne 0x10005cead
lea rax, [rsp + 0xb8]
test rax, rax
jne 0x10005cd04
lea ecx, [rax + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005cd21
lea r8, [rsp + 0xb8]
mov edx, 8
mov rcx, r13
call fcn.10004584c
test eax, eax
jne 0x10005cead
lea rdx, [0x100013790]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x643
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
test r15d, r15d
je 0x10005cf10
lea rcx, [rsp + 0x80]
call fcn.100044f88
nop
lea rax, [rsp + 0x70]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x70]
call fcn.10001ff10
nop
mov r8d, ebp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.100045100
cmp eax, 0xb7
je 0x10005cdc0
mov r8, qword [rsp + 0x60]
lea rdx, [0x100011a00]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10004504c
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
lea rax, [rsp + 0x50]
test rax, rax
jne 0x10005cdd5
lea ecx, [rax + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005cdf0
lea r8, [rsp + 0x50]
mov edx, 2
lea rcx, [rsp + 0x80]
call fcn.1000454bc
test eax, eax
jne 0x10005ce1e
lea rdx, [0x10000ca00]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10004504c
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
cmp r14d, 9
jne 0x10005ce88
lea rax, [rsp + 0xb8]
test rax, rax
jne 0x10005ce3c
lea ecx, [rax + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10005ce5a
lea r8, [rsp + 0xb8]
mov edx, 8
lea rcx, [rsp + 0x80]
call fcn.10004584c
test eax, eax
jne 0x10005ce88
lea rdx, [0x100013790]
mov ecx, ebp
call fcn.10003c3c0
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10004504c
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
cmp dword [rsp + 0xa8], 0
je 0x10005cea0
lea rcx, [rsp + 0x80]
call fcn.100045390
nop
lea rcx, [rsp + 0x80]
call fcn.10004504c
mov r9d, r14d
mov r8, qword [rsp + 0x50]
lea rdx, [0x100011b20]
mov ecx, 1
call fcn.10003c3c0
cmp r14d, 5
je 0x10005cef5
cmp r14d, 9
jne 0x10005cf2a
mov rdi, qword [rsp + 0x38]
mov r9, rdi
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.100058dd8
mov ebx, eax
jmp 0x10005cf26
mov rdi, qword [rsp + 0x38]
mov r8, rdi
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.100058794
mov ebx, eax
jmp 0x10005cf26
lea rdx, [0x100011a50]
mov ecx, r8d
call fcn.10003c3c0
xor ebx, ebx
mov rdi, qword [rsp + 0x38]
test ebx, ebx
jne 0x10005cf69
lea rcx, [rsp + 0x40]
call fcn.10005c744
test eax, eax
je 0x10005cfbe
mov r8d, eax
lea rdx, [0x100011c90]
mov ecx, ebp
call fcn.10003c3c0
mov r13d, dword [rsp + 0x48]
jmp 0x10005cfc3
mov rdi, qword [rsp + 0x38]
mov esi, r12d
jmp 0x10005cf6d
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005cf6d
mov esi, dword [rsp + 0x30]
lea r8, [0x100011b70]
mov edx, ebx
mov ecx, ebp
call fcn.10003c494
mov r13d, dword [rsp + 0x48]
test r13d, r13d
je 0x10005cfd1
test esi, esi
jne 0x10005cfc3
mov qword [rsp + 0x20], rdi
mov r9d, dword [rsp + 0x58]
mov r8, qword [rsp + 0x68]
mov edx, r14d
lea rcx, [rsp + 0x40]
call fcn.10005c2d4
test eax, eax
je 0x10005cfc3
mov r8d, eax
lea rdx, [0x100011c00]
mov ecx, ebp
call fcn.10003c3c0
jmp 0x10005cfc3
mov r13d, dword [rsp + 0x48]
test r13d, r13d
je 0x10005cfd1
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test r12, r12
je 0x10005cfdf
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x138]
test rcx, rcx
je 0x10005cff2
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x140]
test rcx, rcx
je 0x10005d005
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x148]
test rcx, rcx
je 0x10005d018
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x10005d028
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
nop
lea rcx, [rsp + 0xb8]
call fcn.10001f53c
nop
lea rcx, [rsp + 0x60]
call fcn.10001fba0
nop
lea rcx, [rsp + 0x40]
call fcn.10001fba0
nop
lea rcx, [rsp + 0xe8]
call fcn.10001f53c
nop
lea rcx, [rsp + 0x50]
call fcn.10001fba0
mov eax, ebx
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.10006b1f0
add rsp, 0x378
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret