Function at 0x1000510e8
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x370
mov qword [rsp + 0x118], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x100081138]
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.10001e06c
nop
lea rcx, [rsp + 0xe8]
call fcn.100018ee8
nop
lea rcx, [rsp + 0x40]
call fcn.10001e06c
nop
xor ebx, ebx
mov esi, ebx
mov dword [rsp + 0x30], ebx
lea rcx, [rsp + 0x60]
call fcn.10001e06c
nop
mov qword [rsp + 0x68], rbx
mov dword [rsp + 0x58], ebx
lea rcx, [rsp + 0xb8]
call fcn.100018ee8
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 0x1000511b5
lea ecx, [rbx + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1000511ce
lea r8, [rsp + 0xe8]
mov edx, 4
mov rcx, r13
call fcn.10003e708
cmp eax, ebx
jne 0x1000511e6
lea rdx, [0x1000110d0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x65b
jmp 0x10005170d
mov rax, qword [rsp + 0xf8]
cmp eax, 1
jbe 0x10005120b
lea rdx, [0x1000133a0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0xd
jmp 0x10005170d
cmp eax, ebx
jne 0x100051227
lea rdx, [0x1000111d0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0xd
jmp 0x10005170d
mov eax, ebx
mov rdx, qword [rsp + 0xe8]
cmp rdx, rbx
setne al
cmp eax, ebx
jne 0x100051246
mov ecx, 0x80004005
call fcn.10001f28c
int3
add rdx, 0x10
lea rcx, [rsp + 0x40]
call fcn.10001e1c8
mov edx, 0x104
lea rcx, [rsp + 0x150]
mov edi, ebx
lea rsi, [0x1000123c0]
lea rax, [rsp + 0x150]
sub rsi, rax
lea rax, [rdx + 0x7ffffefa]
cmp rax, rbx
je 0x100051297
movzx eax, word [rcx + rsi]
cmp ax, bx
je 0x100051297
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x100051275
xor esi, esi
cmp rdx, rsi
jne 0x1000512a7
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], si
cmp edi, esi
jge 0x1000512bd
mov ebx, 0x65b
mov rdi, qword [rsp + 0x38]
jmp 0x10005170d
mov r8, qword [rsp + 0x40]
cmp dword [r8 - 8], 1
jle 0x1000512dc
mov edx, dword [r8 - 0x10]
lea rcx, [rsp + 0x40]
call fcn.10001e9a0
mov r8, qword [rsp + 0x40]
mov edx, 0x104
lea rcx, [rsp + 0x150]
call fcn.10001f2ac
cmp eax, esi
jge 0x100051301
mov ebx, 0x65b
mov rdi, qword [rsp + 0x38]
jmp 0x10005170d
lea rcx, [rsp + 0x120]
call fcn.10004cefc
mov ebx, eax
cmp eax, esi
jne 0x1000516f7
lea r8, [rsp + 0x150]
xor edx, edx
lea rcx, [rsp + 0x120]
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r12, rax
cmp rax, rsi
jne 0x10005134a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdi, qword [rsp + 0x38]
jmp 0x1000516c9
mov edx, 0x3e8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x10005138b
cmp eax, esi
je 0x10005138b
cmp eax, 0x102
jne 0x100051379
mov ebx, 0x20
mov rdi, qword [rsp + 0x38]
jmp 0x10005170d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdi, qword [rsp + 0x38]
jmp 0x1000516c9
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x5c], esi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x70]
call fcn.10001e09c
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.100050af8
mov ebx, eax
cmp eax, esi
jne 0x1000516fe
mov edx, dword [rsp + 0x5c]
mov dword [rsp + 0x30], edx
xor eax, eax
lea rdi, [0x100008b20]
mov rsi, qword [rsp + 0x60]
lea r8d, [rax + 1]
mov rcx, r8
repe cmpsw word [rsi], word [rdi]
je 0x10005140b
sbb eax, eax
sbb eax, 0xffffffff
xor esi, esi
cmp eax, esi
jne 0x1000514e3
cmp edx, esi
je 0x100051434
cmp r15d, esi
jne 0x100051434
lea rdx, [0x1000116f0]
mov ecx, r8d
call fcn.100037e18
mov ebx, esi
jmp 0x1000516cd
lea rax, [rsp + 0x50]
cmp rax, rsi
jne 0x10005144b
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100051461
lea r8, [rsp + 0x50]
mov edx, 2
mov rcx, r13
call fcn.10003e3c8
cmp eax, esi
jne 0x100051482
lea rdx, [0x10000c4a0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x643
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
cmp r14d, 9
jne 0x100051650
lea rax, [rsp + 0xb8]
cmp rax, rsi
jne 0x1000514a5
lea ecx, [r14 + 0x4e]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1000514c2
lea r8, [rsp + 0xb8]
mov edx, 8
mov rcx, r13
call fcn.10003e708
cmp eax, esi
jne 0x100051650
lea rdx, [0x100013430]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x643
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
cmp r15d, esi
je 0x1000516b3
lea rcx, [rsp + 0x80]
call fcn.10003df74
nop
lea rax, [rsp + 0x70]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x70]
call fcn.10001e09c
nop
mov r8d, ebp
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.10003e014
cmp eax, 0xb7
je 0x100051561
mov r8, qword [rsp + 0x60]
lea rdx, [0x1000116a0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10003dfc8
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
lea rax, [rsp + 0x50]
cmp rax, rsi
jne 0x100051578
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100051593
lea r8, [rsp + 0x50]
mov edx, 2
lea rcx, [rsp + 0x80]
call fcn.10003e3c8
cmp eax, esi
jne 0x1000515c1
lea rdx, [0x10000c4a0]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10003dfc8
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
cmp r14d, 9
jne 0x10005162c
lea rax, [rsp + 0xb8]
cmp rax, rsi
jne 0x1000515e0
lea ecx, [r14 + 0x4e]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1000515fe
lea r8, [rsp + 0xb8]
mov edx, 8
lea rcx, [rsp + 0x80]
call fcn.10003e708
cmp eax, esi
jne 0x10005162c
lea rdx, [0x100013430]
mov ecx, ebp
call fcn.100037e18
mov ebx, 0x643
lea rcx, [rsp + 0x80]
call fcn.10003dfc8
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
cmp dword [rsp + 0xa8], esi
je 0x100051643
lea rcx, [rsp + 0x80]
call fcn.10003e29c
nop
lea rcx, [rsp + 0x80]
call fcn.10003dfc8
mov r9d, r14d
mov r8, qword [rsp + 0x50]
lea rdx, [0x1000117c0]
mov ecx, 1
call fcn.100037e18
cmp r14d, 5
je 0x100051698
cmp r14d, 9
jne 0x1000516cd
mov rdi, qword [rsp + 0x38]
mov r9, rdi
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.10004df34
mov ebx, eax
jmp 0x1000516c9
mov rdi, qword [rsp + 0x38]
mov r8, rdi
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.10004db58
mov ebx, eax
jmp 0x1000516c9
lea rdx, [0x1000116f0]
mov ecx, r8d
call fcn.100037e18
mov ebx, esi
mov rdi, qword [rsp + 0x38]
cmp ebx, esi
jne 0x100051709
lea rcx, [rsp + 0x40]
call fcn.100050f78
cmp eax, esi
je 0x100051760
mov r8d, eax
lea rdx, [0x100011930]
mov ecx, ebp
call fcn.100037e18
mov r13d, dword [rsp + 0x48]
jmp 0x100051769
mov rdi, qword [rsp + 0x38]
jmp 0x10005170d
mov rdi, qword [rsp + 0x38]
mov esi, dword [rsp + 0x30]
jmp 0x10005170d
mov esi, dword [rsp + 0x30]
lea r8, [0x100011810]
mov edx, ebx
mov ecx, ebp
call fcn.100037ee8
mov r13d, dword [rsp + 0x48]
test r13d, r13d
je 0x100051779
test esi, esi
jne 0x100051767
mov qword [rsp + 0x20], rdi
mov r9d, dword [rsp + 0x58]
mov r8, qword [rsp + 0x68]
mov edx, r14d
lea rcx, [rsp + 0x40]
call fcn.100050bf0
xor esi, esi
cmp eax, esi
je 0x100051769
mov r8d, eax
lea rdx, [0x1000118a0]
mov ecx, ebp
call fcn.100037e18
jmp 0x100051769
mov r13d, dword [rsp + 0x48]
jmp 0x100051769
xor esi, esi
cmp r13d, esi
je 0x10005177b
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x10005177b
xor esi, esi
cmp r12, rsi
je 0x100051789
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x138]
cmp rcx, rsi
je 0x10005179c
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x140]
cmp rcx, rsi
je 0x1000517af
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x148]
cmp rcx, rsi
je 0x1000517c2
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x68]
cmp rcx, rsi
je 0x1000517d2
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
nop
lea rcx, [rsp + 0xb8]
call fcn.10001a784
nop
lea rcx, [rsp + 0x60]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0x40]
call fcn.10001f3ec
nop
lea rcx, [rsp + 0xe8]
call fcn.10001a784
nop
lea rcx, [rsp + 0x50]
call fcn.10001f3ec
mov eax, ebx
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.10005cbe0
mov rbx, qword [rsp + 0x3c0]
add rsp, 0x370
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret