Function at 0x42a390
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
mov eax, dword [0x47900c]
xor eax, esp
mov dword [esp + 0x90], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x18]
push edi
mov dword [esp + 0x20], eax
mov edi, ecx
mov eax, edi
mov dword [esp + 0x28], edx
cdq
mov dword [esp + 0x24], eax
mov eax, dword [0x47c924]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], edx
test eax, eax
jne 0x42a3f1
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x47c924], eax
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [0x47c924]
xor ebx, ebx
cmp dword [0x47c920], 1
sete bl
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test ebx, ebx
jne 0x42a430
mov eax, 0xf0001000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.00434098
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x10], 0
jne 0x42a441
cmp dword [ebp + 0xc], 0
jne 0x42a71b
test edi, edi
je 0x42a71b
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x42a71b
test esi, esi
je 0x42a45f
mov dword [esi], 0
push dword [esp + 0x14]
mov edi, dword [esp + 0x28]
push edi
call fcn.00429840
mov esi, eax
add esp, 8
test esi, esi
jne 0x42a490
mov eax, 0xf000100c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.00434098
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x18], 0
mov dword [esp + 0x40], 2
mov eax, dword [esi + 0x10]
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], eax
mov eax, dword [ebx]
push esi
push str.Beihai_SendAndReceive__x_n
mov dword [esp + 0x5c], eax
call fcn.00403910
push dword [esp + 0x1c]
mov edx, 0x28
lea ecx, [esp + 0x3c]
push edi
push dword [ebp + 0xc]
push dword [esp + 0x24]
call fcn.00429c10
mov edi, eax
add esp, 0x18
mov eax, dword [esi + 8]
test edi, edi
jne 0x42a4ee
mov edi, eax
push eax
push esi
push str.Beihai_SendAndReceive__x_ret__x_n
call fcn.00403910
add esp, 0xc
test edi, edi
jne 0x42a5d8
mov ecx, dword [esi + 0x18]
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x42a5d1
mov eax, dword [esi + 0xc]
cmp eax, 4
jb 0x42a5d1
mov edx, dword [esp + 0x20]
test edx, edx
je 0x42a544
mov ecx, dword [ecx]
mov dword [edx], ecx
mov al, byte [edx + 3]
mov byte [edx + 3], cl
mov cl, byte [edx + 2]
mov byte [edx], al
movzx eax, byte [edx + 1]
mov byte [edx + 2], al
mov byte [edx + 1], cl
mov eax, dword [esi + 0xc]
add eax, 0xfffffffc
mov dword [esp + 0x10], eax
je 0x42a5ca
cmp dword [esp + 0x1c], 0
je 0x42a5c5
cmp dword [ebx], eax
jb 0x42a5c5
mov ecx, dword [0x47b7e0]
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x42a580
push 0x3ff
push str.D:_buildagent_cd_8816p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
push eax
call dword [0x45e29c]
call dword [esp + 0x34]
add esp, 0xc
jmp 0x42a589
push eax
call fcn.004443a0
add esp, 4
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
test ecx, ecx
je 0x42a5b5
push dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
add eax, 4
push eax
push ecx
call fcn.00437eb0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebx], eax
jmp 0x42a651
mov eax, dword [esp + 0x10]
mov edi, 0xf0001004
mov dword [ebx], eax
jmp 0x42a651
mov edi, 0x403
mov dword [ebx], eax
jmp 0x42a651
mov edi, 0xf0001006
jmp 0x42a651
cmp edi, 0x403
jne 0x42a632
mov eax, dword [esi + 0x18]
mov dword [esp + 0x28], eax
test eax, eax
je 0x42a651
cmp dword [esi + 0xc], 8
jne 0x42a651
mov edx, dword [esp + 0x20]
test edx, edx
je 0x42a616
mov ecx, dword [eax]
mov dword [edx], ecx
mov al, byte [edx + 3]
mov byte [edx], al
movzx eax, byte [edx + 1]
mov byte [edx + 3], cl
mov cl, byte [edx + 2]
mov byte [edx + 2], al
mov eax, dword [esp + 0x28]
mov byte [edx + 1], cl
mov ecx, dword [eax + 4]
mov dword [ebx], ecx
mov al, byte [ebx + 3]
mov byte [ebx + 3], cl
mov cl, byte [ebx + 2]
mov byte [ebx], al
movzx eax, byte [ebx + 1]
mov byte [ebx + 2], al
mov byte [ebx + 1], cl
jmp 0x42a651
cmp edi, 0x401
je 0x42a64a
cmp edi, 0x106
je 0x42a64a
cmp edi, 0x201
jne 0x42a651
mov dword [esi + 0x24], 1
mov ebx, dword [0x47b7dc]
mov eax, dword [esi + 0x18]
test ebx, ebx
je 0x42a678
push 0x418
push str.D:_buildagent_cd_8816p4218434198_thirdparty_bhplugin1Beihai_toolsjhi_libBeihaiPlugin.cpp
push eax
mov ecx, ebx
call dword [0x45e29c]
call ebx
add esp, 0xc
jmp 0x42a681
push eax
call fcn.0043da60
add esp, 4
mov eax, dword [esp + 0x24]
push 0xffffffffffffffff
push dword [0x47c930]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x18], 0
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add dword [esi + 4], 0xffffffff
jne 0x42a6ef
cmp dword [esi + 0x24], 0
je 0x42a6ef
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [esp + 0x28]
push eax
call fcn.0042b150
mov ecx, esi
call fcn.00429700
push dword [0x47c930]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.00434098
mov esp, ebp
pop ebp
ret
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [0x47c930]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.00434098
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x9c]
mov eax, 0xf0001005
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00434098
mov esp, ebp
pop ebp
ret