Function at 0x51ba70
Capabilities:
Check mutex on windows

Disassembly:
push 0xffffffffffffffff
push 0x5344a6
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push esi
push edi
mov eax, dword [0x551e00]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x1c], ebx
mov dword [ebx], 0
mov dword [esp + 0x60], 0
mov dword [ebx + 4], 0xffffffff
mov dword [ebx + 8], 0xffffffff
push 0x10
mov byte [esp + 0x64], 2
call fcn.004f92f4
mov edi, eax
add esp, 4
test edi, edi
je 0x51bafd
lea eax, [edi + 4]
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax + 8], 0
and dword [eax], 1
mov dword [eax + 4], eax
mov dword [eax + 8], eax
and dword [eax], 0xfffffffe
mov dword [edi], 0
jmp 0x51baff
xor edi, edi
mov eax, edi
mov dword [esp + 0x50], 0xf
shr eax, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
lea eax, [esp + 0x3c]
mov byte [esp + 0x60], 4
push eax
call fcn.0051e0f0
add esp, 4
lea ecx, [esp + 0x24]
push 0x13
push 0x41a47c
call fcn.00429350
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x30]
call fcn.00428f60
cmp dword [esp + 0x38], 0x10
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp dword [ebx], 0
jne 0x51bb8f
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [ebx], eax
setne byte [esp + 0x13]
jmp 0x51bb94
mov byte [esp + 0x13], 0
push 0x14
push 0x41a490
lea ecx, [esp + 0x2c]
call fcn.00429350
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x30]
call fcn.00428f60
push dword [ebx]
xorps xmm0, xmm0
movq qword [esp + 0x18], xmm0
mov dword [esp + 0x18], ebx
call fcn.0051fcd0
add esp, 4
mov byte [esp + 0x18], 1
cmp byte [esp + 0x13], 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov byte [esp + 0x60], 5
je 0x51bc1d
cmp dword [esp + 0x38], 0x10
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp dword [ebx + 8], 0xffffffff
jne 0x51bc1d
push eax
push closesocket
push 0
push 0
call esi
mov dword [ebx + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebx + 8], 0xffffffff
mov byte [esp + 0x13], 1
setne al
test al, al
jne 0x51bc22
mov byte [esp + 0x13], 0
push 0x12
push 0x41a4a8
lea ecx, [esp + 0x2c]
call fcn.00429350
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x30]
call fcn.00428f60
cmp byte [esp + 0x13], 0
je 0x51bd55
cmp dword [esp + 0x38], 0x10
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
cmp dword [ebx + 4], 0xffffffff
jne 0x51bd55
push eax
push dword [esp + 0x24]
push 0
push 0
call esi
mov dword [ebx + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne cl
cmp dword [ebx + 4], 0xffffffff
setne al
test al, al
je 0x51bd55
test cl, cl
jne 0x51bcdc
test edi, edi
je 0x51bcdc
mov ecx, dword [edi + 4]
lea esi, [edi + 4]
and ecx, 0xfffffffe
je 0x51bcc1
sub esp, 8
mov eax, esp
push ecx
mov dword [eax], edi
mov dword [eax + 4], esi
call fcn.0051a940
add esp, 0xc
and dword [esi], 1
mov dword [esi + 4], esi
mov dword [esi + 8], esi
and dword [esi], 1
mov dword [esi + 4], esi
mov dword [esi + 8], esi
and dword [esi], 0xfffffffe
push edi
mov dword [edi], 0
call fcn.004f9345
add esp, 4
lea eax, [esp + 0x20]
push eax
push 1
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 4
call fcn.0051bea0
cmp dword [esp + 0x38], 0x10
jb 0x51bd0d
push dword [esp + 0x24]
call fcn.004f9345
add esp, 4
cmp dword [esp + 0x50], 0x10
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
jb 0x51bd35
push dword [esp + 0x3c]
call fcn.004f9345
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004f9e32
add esp, 0x54
ret
test edi, edi
je 0x51bd9b
mov ecx, dword [edi + 4]
lea esi, [edi + 4]
and ecx, 0xfffffffe
je 0x51bd80
sub esp, 8
mov eax, esp
push ecx
mov dword [eax], edi
mov dword [eax + 4], esi
call fcn.0051a940
add esp, 0xc
and dword [esi], 1
mov dword [esi + 4], esi
mov dword [esi + 8], esi
and dword [esi], 1
mov dword [esi + 4], esi
mov dword [esi + 8], esi
and dword [esi], 0xfffffffe
push edi
mov dword [edi], 0
call fcn.004f9345
add esp, 4
push 0x53babc
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
call fcn.004f9e41
int3