Function at 0x402550
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4db870
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x501008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x3c], ebx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], esi
movlpd qword [ebp - 0x18], xmm0
call fcn.004059c0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x4025b6
mov dword [ebp - 4], 1
jmp 0x402687
mov eax, dword [ecx]
lea edx, [ebp - 0x34]
push edx
call dword [eax + 0x6c]
mov byte [ebp - 4], 2
cmp dword [ebp - 0x24], 0
jne 0x4025e1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.004021f0
mov dword [ebp - 4], 7
jmp 0x402687
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebx], eax
test eax, eax
jne 0x402612
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 8
call fcn.004021f0
mov dword [ebp - 4], 0xc
jmp 0x402687
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402674
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xd
call fcn.004021f0
mov dword [ebp - 4], 0x11
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x402668
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x402668
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x402668
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
jmp 0x402826
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x12
call fcn.004021f0
mov dword [ebp - 4], 0x16
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4026b2
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x4026af
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x4026af
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov esi, dword [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
cmp dword [esi + 0x10], 0
je 0x4027e4
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
push ecx
lea edx, [ebp - 0x28]
mov dword [ebp - 4], 0x17
mov ecx, esi
call fcn.0041b100
mov eax, dword [ebp - 0x24]
add esp, 4
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
cmp ebx, eax
je 0x4027d2
nop dword [eax]
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x18
push eax
mov ecx, ebx
call fcn.0041aef0
mov ecx, dword [ebp - 0x18]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x1c]
add esp, 4
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x4027ba
cmp dword [edi + 0x10], 0
lea esi, [edi + 0x18]
je 0x4027ba
cmp dword [esi + 0x10], 0
je 0x4027ba
mov ecx, edi
call fcn.00402ef0
mov ecx, 0x501160
mov edx, eax
call fcn.00402ef0
cmp edx, eax
jne 0x4027ba
call fcn.00402e50
mov ecx, edi
mov edx, eax
call fcn.00402e50
mov ecx, eax
call fcn.00417d60
test al, al
je 0x4027ba
cmp dword [esi + 0x14], 8
jb 0x4027ab
mov esi, dword [esi]
xor edx, edx
mov ecx, esi
call fcn.00417b90
mov ecx, dword [ebp - 0x3c]
mov dword [ecx + 8], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x17
call fcn.00405800
add ebx, 0x18
cmp ebx, dword [ebp - 0x38]
jne 0x402710
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.00405800
mov ebx, dword [ebp - 0x3c]
mov ecx, ebx
call fcn.00402860
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
push dword [ebx + 8]
push dword [ebp - 0x40]
call fcn.00402b90
call dword [sym.imp.ole32.dll_OleUninitialize]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x402826
add ecx, 0x34
cmp dword [ecx], 0
je 0x402826
call fcn.00412c40
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d99e2
mov esp, ebp
pop ebp
ret 8