Function at 0x14002e460
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [0x14008e010]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rax, qword [0x140091a88]
mov ebp, r9d
mov r15, qword [rsp + 0x110]
mov rsi, r8
mov r14, qword [rsp + 0x118]
mov r13d, edx
mov rdi, qword [rsp + 0x120]
mov r12, rcx
test rax, rax
jne 0x14002e4cd
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x140091a88], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov rcx, qword [0x140091a88]
xor ebx, ebx
cmp dword [0x140091a6c], 1
sete bl
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
test ebx, ebx
jne 0x14002e502
mov eax, 0xf0001000
jmp 0x14002e751
test rsi, rsi
jne 0x14002e50f
test ebp, ebp
jne 0x14002e74c
test r12, r12
je 0x14002e74c
test r14, r14
je 0x14002e74c
test r15, r15
je 0x14002e52d
mov qword [r15], 0
mov rcx, r12
call fcn.14002d550
mov rbx, rax
test rax, rax
je 0x14002e55d
mov rcx, qword [rax + 0x28]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [rbx + 0x34], 0
je 0x14002e567
mov rdx, r12
mov rcx, rbx
call fcn.14002d630
mov eax, 0xf000100c
jmp 0x14002e751
mov qword [rbx + 0x20], 0
lea rcx, str.Beihai_SendAndReceive__x_n
mov dword [rsp + 0x40], 2
mov rdx, rbx
mov rax, qword [rbx + 0x18]
mov qword [rsp + 0x48], rax
mov eax, dword [r14]
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x50], r13d
call fcn.14002d530
mov r9d, ebp
mov qword [rsp + 0x20], r12
mov r8, rsi
lea rcx, [rsp + 0x30]
mov edx, 0x28
call fcn.14002dba0
mov r8d, dword [rbx + 0xc]
mov esi, eax
test eax, eax
jne 0x14002e5c2
mov esi, r8d
mov rdx, rbx
lea rcx, str.Beihai_SendAndReceive__x_ret__x_n
call fcn.14002d530
test esi, esi
jne 0x14002e68f
mov rbp, qword [rbx + 0x20]
test rbp, rbp
je 0x14002e688
mov eax, dword [rbx + 0x10]
cmp eax, 4
jb 0x14002e688
test rdi, rdi
je 0x14002e616
mov ecx, dword [rbp]
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 0x14002e680
test r15, r15
je 0x14002e67b
cmp dword [r14], edi
jb 0x14002e67b
mov rax, qword [0x140091858]
mov ecx, edi
test rax, rax
je 0x14002e64a
mov r8d, 0x3ff
lea rdx, str.D:_buildagent_cd_8816p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
call qword [0x140069610]
jmp 0x14002e64f
call fcn.14004c5b0
mov qword [r15], rax
test rax, rax
je 0x14002e66e
mov r8d, edi
lea rdx, [rbp + 4]
mov rcx, rax
call fcn.14003db70
mov dword [r14], edi
jmp 0x14002e70b
mov esi, 0xf0001004
mov dword [r14], edi
jmp 0x14002e70b
mov esi, 0x403
mov dword [r14], edi
jmp 0x14002e70b
mov esi, 0xf0001006
jmp 0x14002e70b
cmp esi, 0x403
jne 0x14002e6ec
mov rdx, qword [rbx + 0x20]
test rdx, rdx
je 0x14002e70b
cmp dword [rbx + 0x10], 8
jne 0x14002e70b
test rdi, rdi
je 0x14002e6c6
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 0x14002e70b
cmp esi, 0x401
je 0x14002e704
cmp esi, 0x106
je 0x14002e704
cmp esi, 0x201
jne 0x14002e70b
mov dword [rbx + 0x34], 1
mov rax, qword [0x140091850]
mov rcx, qword [rbx + 0x20]
test rax, rax
je 0x14002e730
mov r8d, 0x418
lea rdx, str.D:_buildagent_cd_8816p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
call qword [0x140069610]
jmp 0x14002e735
call fcn.140044cd0
mov rdx, r12
mov qword [rbx + 0x20], 0
mov rcx, rbx
call fcn.14002d630
mov eax, esi
jmp 0x14002e751
mov eax, 0xf0001005
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.140038b50
mov rbx, qword [rsp + 0xf8]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret