Function at 0x10042b850
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x290
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rsi, rcx
mov qword [rsp + 0x40], 1
xor ebp, ebp
mov dword [rsp + 0x48], ebp
mov r9d, 0x104
lea r8, str.MSSQLSERVER
lea edx, [r9 + 1]
lea r14, [0x10049b7a0]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [0x10049b9a8], bp
xor edx, edx
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr_l]
xor edx, edx
mov r8d, 0x7080
lea rcx, [0x1004a1be0]
call sub.VCRUNTIME140.dll_memset
mov edi, ebp
lea rbx, [0x1004a1ce2]
lea r15, [0x10047773c]
lea r12, str.GlobalSQLAGENT__150__MEMOBJ_
nop word [rax + rax]
mov dword [rbx - 0x102], edi
mov r9d, 0xa
mov r8d, r9d
lea rdx, [rsp + 0x58]
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itow_s]
lea rcx, [rbx - 0xfe]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r12
xor r9d, r9d
lea r8, [0x100477740]
mov edx, 0x80
call fcn.10042b040
mov word [rbx], bp
mov qword [rbx + 6], rbp
mov qword [rbx + 0xe], rbp
mov qword [rbx + 0x16], rbp
inc edi
lea rbx, [rbx + 0x120]
cmp edi, 0x64
jb 0x10042b900
lea rcx, [0x1004a1be0]
call fcn.10042b770
test eax, eax
jne 0x10042b982
jmp 0x10042bba9
mov qword [rsp + 0x30], r14
lea rax, [0x1004777a0]
mov qword [rsp + 0x28], rax
lea rax, str.GlobalSQLAGENT_PERF_DATA_MUTEX
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, str._ls_ls_ls
mov edx, 0x105
lea rcx, [rsp + 0x70]
call fcn.10042b040
mov word [rsp + 0x278], bp
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, qword [0x10049bbd0]
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1004a1cf8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10042b9f8
mov rcx, qword [0x1004a1cf8]
call fcn.10042e920
test eax, eax
jne 0x10042b97d
mov rcx, qword [0x1004a1cf8]
test rcx, rcx
je 0x10042b97d
mov edx, 0x3e8
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
mov ebx, 1
cmove ebx, ebp
mov dword [rsp + 0x40], ebx
mov rax, qword [0x1004a1cf0]
test rax, rax
je 0x10042bb90
mov dword [rax], ebp
mov dword [rax + 8], ebp
mov dword [rax + 0xc], 0x568
mov rax, qword [0x1004a1cf0]
test rax, rax
je 0x10042bb90
mov dword [rax + 0x10], ebp
xor edx, edx
mov r8d, 0x2800
lea rdi, [0x10049f3e0]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
mov qword [0x10049c3e0], rdi
lea rax, [0x10049cbe4]
mov edx, 5
nop dword [rax]
mov ecx, 0x100
nop word [rax + rax]
mov qword [rax - 4], 0xffffffffffffffff
add rax, 8
sub rcx, 1
jne 0x10042ba90
sub rdx, 1
jne 0x10042ba80
lea rax, [0x10049cbe0]
mov qword [0x10049bbe0], rax
lea rax, [0x10049c3e8]
mov ecx, 0x1f
mov edx, ecx
nop dword [rax]
nop dword [rax + rax]
mov qword [rax], rbp
mov qword [rax + 8], rbp
mov qword [rax + 0x10], rbp
lea rax, [rax + 0x40]
mov qword [rax - 0x28], rbp
mov qword [rax - 0x20], rbp
mov qword [rax - 0x18], rbp
mov qword [rax - 0x10], rbp
mov qword [rax - 8], rbp
sub rdx, 1
jne 0x10042bad0
mov qword [rax], rbp
mov qword [rax + 8], rbp
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rbp
mov qword [rax + 0x28], rbp
mov qword [rax + 0x30], rbp
lea rax, [0x10049bbe8]
nop dword [rax + rax]
mov qword [rax], rbp
mov qword [rax + 8], rbp
mov qword [rax + 0x10], rbp
lea rax, [rax + 0x40]
mov qword [rax - 0x28], rbp
mov qword [rax - 0x20], rbp
mov qword [rax - 0x18], rbp
mov qword [rax - 0x10], rbp
mov qword [rax - 8], rbp
sub rcx, 1
jne 0x10042bb20
mov qword [rax], rbp
mov qword [rax + 8], rbp
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rbp
mov qword [rax + 0x28], rbp
mov qword [rax + 0x30], rbp
call fcn.10042bdb0
test eax, eax
je 0x10042bb90
mov dword [rsi], 1
test ebx, ebx
jne 0x10042bb8c
mov rcx, qword [0x1004a1cf8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [rsp + 0x40], 1
xor eax, eax
jmp 0x10042bbae
test ebx, ebx
jne 0x10042bba9
mov rcx, qword [0x1004a1cf8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [rsp + 0x40], 1
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret