Function at 0x7ff6d8e8e780
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [0x7ff6d8eee010]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rax, qword [0x7ff6d8ef1a88]
mov rsi, r9
mov r15, qword [rsp + 0x118]
mov rbp, rcx
mov r14, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x128]
test rax, rax
jne 0x7ff6d8e8e7e2
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x7ff6d8ef1a88], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov rcx, qword [0x7ff6d8ef1a88]
xor r13d, r13d
cmp dword [0x7ff6d8ef1a6c], 1
mov ebx, r13d
sete bl
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
test ebx, ebx
jne 0x7ff6d8e8e81b
mov eax, 0xf0001000
jmp 0x7ff6d8e8ea72
test rsi, rsi
je 0x7ff6d8e8ea6d
test rbp, rbp
je 0x7ff6d8e8ea6d
test r14, r14
je 0x7ff6d8e8ea6d
test r15, r15
je 0x7ff6d8e8e83e
mov qword [r15], r13
mov rcx, rbp
call fcn.7ff6d8e8d550
mov rbx, rax
test rax, rax
je 0x7ff6d8e8e86e
mov rcx, qword [rax + 0x28]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [rbx + 0x34], r13d
je 0x7ff6d8e8e878
mov rdx, rbp
mov rcx, rbx
call fcn.7ff6d8e8d630
mov eax, 0xf000100c
jmp 0x7ff6d8e8ea72
mov qword [rbx + 0x20], r13
lea rcx, str.Beihai_SendAndReceive__x_n
mov dword [rsp + 0x40], 0xd
mov rdx, rbx
mov rax, qword [rbx + 0x18]
mov qword [rsp + 0x48], rax
mov eax, dword [r14]
mov dword [rsp + 0x58], eax
mov qword [rsp + 0x50], 1
call fcn.7ff6d8e8d530
mov r9d, 0x10
mov qword [rsp + 0x20], rbp
mov r8, rsi
lea rcx, [rsp + 0x30]
lea edx, [r9 + 0x1c]
call fcn.7ff6d8e8dba0
mov r8d, dword [rbx + 0xc]
mov esi, eax
test eax, eax
jne 0x7ff6d8e8e8d5
mov esi, r8d
mov rdx, rbx
mov qword [rsp + 0xf8], r12
lea rcx, str.Beihai_SendAndReceive__x_ret__x_n
call fcn.7ff6d8e8d530
test esi, esi
jne 0x7ff6d8e8e9ac
mov r12, qword [rbx + 0x20]
test r12, r12
je 0x7ff6d8e8e9a5
mov eax, dword [rbx + 0x10]
cmp eax, 4
jb 0x7ff6d8e8e9a5
test rdi, rdi
je 0x7ff6d8e8e932
mov ecx, dword [r12]
mov dword [rdi], ecx
movzx eax, byte [rdi + 3]
mov byte [rdi], al
movzx eax, byte [rdi + 1]
mov byte [rdi + 3], cl
movzx ecx, byte [rdi + 2]
mov byte [rdi + 2], al
mov byte [rdi + 1], cl
mov eax, dword [rbx + 0x10]
lea edi, [rax - 4]
test edi, edi
je 0x7ff6d8e8e99d
test r15, r15
je 0x7ff6d8e8e998
cmp dword [r14], edi
jb 0x7ff6d8e8e998
mov rax, qword [0x7ff6d8ef1858]
mov ecx, edi
test rax, rax
je 0x7ff6d8e8e966
mov r8d, 0x456
lea rdx, str.D:_buildagent_cd_8811p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
call qword [0x7ff6d8ec9610]
jmp 0x7ff6d8e8e96b
call fcn.7ff6d8eac5b0
mov qword [r15], rax
test rax, rax
je 0x7ff6d8e8e98b
mov r8d, edi
lea rdx, [r12 + 4]
mov rcx, rax
call fcn.7ff6d8e9db70
mov dword [r14], edi
jmp 0x7ff6d8e8ea28
mov esi, 0xf0001004
mov dword [r14], edi
jmp 0x7ff6d8e8ea28
mov esi, 0x403
mov dword [r14], edi
jmp 0x7ff6d8e8ea28
mov esi, 0xf0001006
jmp 0x7ff6d8e8ea28
cmp esi, 0x403
jne 0x7ff6d8e8ea09
mov rdx, qword [rbx + 0x20]
test rdx, rdx
je 0x7ff6d8e8ea28
cmp dword [rbx + 0x10], 8
jne 0x7ff6d8e8ea28
test rdi, rdi
je 0x7ff6d8e8e9e3
mov ecx, dword [rdx]
mov dword [rdi], ecx
movzx eax, byte [rdi + 3]
mov byte [rdi], al
movzx eax, byte [rdi + 1]
mov byte [rdi + 3], cl
movzx ecx, byte [rdi + 2]
mov byte [rdi + 2], al
mov byte [rdi + 1], cl
mov ecx, dword [rdx + 4]
mov dword [r14], ecx
movzx eax, byte [r14 + 3]
mov byte [r14], al
movzx eax, byte [r14 + 1]
mov byte [r14 + 3], cl
movzx ecx, byte [r14 + 2]
mov byte [r14 + 2], al
mov byte [r14 + 1], cl
jmp 0x7ff6d8e8ea28
cmp esi, 0x401
je 0x7ff6d8e8ea21
cmp esi, 0x106
je 0x7ff6d8e8ea21
cmp esi, 0x201
jne 0x7ff6d8e8ea28
mov dword [rbx + 0x34], 1
mov rax, qword [0x7ff6d8ef1850]
mov rcx, qword [rbx + 0x20]
mov r12, qword [rsp + 0xf8]
test rax, rax
je 0x7ff6d8e8ea55
mov r8d, 0x46e
lea rdx, str.D:_buildagent_cd_8811p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
call qword [0x7ff6d8ec9610]
jmp 0x7ff6d8e8ea5a
call fcn.7ff6d8ea4cd0
mov rdx, rbp
mov qword [rbx + 0x20], r13
mov rcx, rbx
call fcn.7ff6d8e8d630
mov eax, esi
jmp 0x7ff6d8e8ea72
mov eax, 0xf0001005
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.7ff6d8e98b50
add rsp, 0xb0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret