Function at 0x1000638fc
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x280
mov rax, qword [0x100082138]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor edi, edi
mov r13, r8
mov r15, rcx
mov r12d, edx
lea rcx, [rsp + 0x38]
lea r8d, [rdi + 0x28]
xor edx, edx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r14d, edi
mov dword [rsp + 0x30], edi
call sub.msvcrt.dll_memset
cmp r15, rdi
je 0x100063c0a
cmp r12d, 4
lea ebx, [rdi + 2]
je 0x10006396e
cmp r12d, 3
je 0x10006396e
cmp r12d, ebx
jne 0x100063c0a
cmp r13, rdi
je 0x100063c0a
cmp dword [0x10008351c], edi
mov qword [r13], rdi
jne 0x100063990
call fcn.1000644a8
cmp eax, edi
jne 0x100063c0f
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov rcx, r15
call fcn.1000646e0
cmp eax, edi
jne 0x1000639b0
mov eax, 0x6e
jmp 0x100063c0f
lea r9, [0x1000062d8]
lea rax, [rsp + 0x60]
mov r8d, 0x104
lea rcx, [rsp + 0x60]
mov r10d, edi
sub r9, rax
mov rdx, r8
lea rax, [rdx + 0x7ffffefa]
cmp rax, rdi
je 0x1000639f2
movzx eax, word [r9 + rcx]
cmp ax, di
je 0x1000639f2
mov word [rcx], ax
add rcx, rbx
sub rdx, 1
jne 0x1000639d0
cmp rdx, rdi
mov r11d, 0x8007007a
jne 0x100063a03
sub rcx, rbx
mov r10d, r11d
cmp r10d, edi
mov word [rcx], di
jl 0x1000639a6
mov rcx, r8
lea rax, [rsp + 0x60]
cmp word [rax], di
je 0x100063a21
add rax, rbx
sub rcx, 1
jne 0x100063a13
cmp rcx, rdi
je 0x1000639a6
mov rax, r8
mov r10d, 0x103
mov edx, 0x7fffffff
sub rax, rcx
lea rcx, [rsp + 0x60]
sub r10, rax
mov rax, rdx
cmp word [rcx], di
je 0x100063a50
add rcx, rbx
sub rax, 1
jne 0x100063a42
cmp rax, rdi
je 0x1000639a6
sub rdx, rax
cmp r10, 0x7ffffffe
ja 0x1000639a6
sub r8, rdx
lea rcx, [rsp + rdx*2 + 0x60]
mov r9d, edi
je 0x100063aaf
lea rax, [r8 + rdx]
lea rdx, [rax + r10 - 0x104]
mov r10, r15
sub r10, rcx
cmp rdx, rdi
je 0x100063aaa
movzx eax, word [r10 + rcx]
cmp ax, di
je 0x100063aaa
sub r8, 1
mov word [rcx], ax
sub rdx, 1
add rcx, rbx
cmp r8, rdi
jne 0x100063a88
cmp r8, rdi
jne 0x100063ab5
sub rcx, rbx
mov r9d, r11d
cmp r9d, edi
mov word [rcx], di
jl 0x1000639a6
lea rcx, [rsp + 0x30]
call fcn.100068598
cmp eax, edi
jne 0x100063c0f
lea r8, [rsp + 0x60]
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp rax, rdi
mov rbp, rax
jne 0x100063b1c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x30]
mov ebx, eax
call fcn.1000309dc
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.msvcrt.dll_free]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.msvcrt.dll_free]
mov eax, ebx
jmp 0x100063c0f
lea rcx, [rsp + 0x30]
call fcn.1000309dc
mov edx, 0x3e8
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rdi, qword [rsp + 0x28]
test eax, eax
je 0x100063b59
cmp eax, 0x80
je 0x100063b59
cmp eax, 0x102
jne 0x100063bf1
mov ebx, 0x20
jmp 0x100063bf9
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.100064990
cmp eax, ebx
jne 0x100063b72
cmp r12d, 3
jne 0x100063b8d
jmp 0x100063be4
mov ecx, 0xb7
cmp eax, ecx
jne 0x100063bdf
cmp r12d, ebx
jne 0x100063ba6
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.100064c20
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.100064aa0
test eax, eax
jne 0x100063bdf
xor ebx, ebx
lea r14d, [rax + 1]
jmp 0x100063ba8
mov ebx, ecx
mov r8, qword [rsp + 0x20]
mov r9, rbp
mov rdx, rdi
mov rcx, r15
call fcn.100064ca0
test rax, rax
je 0x100063bc6
mov qword [r13], rax
jmp 0x100063c02
test r14d, r14d
mov ebx, 0xe
je 0x100063be4
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.100064c20
jmp 0x100063be4
mov ebx, 0x6e
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100063bf9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
jmp 0x100063b04
mov eax, 0x57
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.10006b1f0
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret