Function at 0x1050014
Capabilities:
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x1063194]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
mov dword [ebp - 0x23c], ebx
lea edi, [ebp - 0x238]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x210], ebx
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x220], ebx
stosd dword es:[edi], eax
cmp esi, ebx
je 0x1050279
cmp dword [ebp + 0xc], 4
je 0x1050089
cmp dword [ebp + 0xc], 3
je 0x1050089
cmp dword [ebp + 0xc], 2
jne 0x1050279
cmp ecx, ebx
je 0x1050279
mov dword [ecx], ebx
cmp dword [0x10659f0], ebx
jne 0x10500a8
call fcn.0104f820
cmp eax, ebx
jne 0x105027c
lea eax, [ebp - 0x214]
push eax
push esi
lea edi, [ebp - 0x218]
call fcn.0104fcdf
test eax, eax
jne 0x10500c6
push 0x6e
jmp 0x105027b
push 0x10135b4
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01014ba1
test eax, eax
jl 0x10500bf
lea eax, [ebp - 0x210]
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01014c35
test eax, eax
jl 0x10500bf
lea eax, [esi - 1]
sub eax, dword [ebp - 0x210]
push eax
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0104f62b
test eax, eax
jl 0x10500bf
lea ecx, [ebp - 0x23c]
call fcn.0104f503
cmp eax, ebx
jne 0x105027c
lea eax, [ebp - 0x20c]
push eax
push ebx
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x210], eax
cmp eax, ebx
jne 0x105017e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [ebp - 0x23c]
mov edi, eax
call fcn.0104f3d0
push dword [ebp - 0x214]
call fcn.010213a1
push dword [ebp - 0x218]
call fcn.010213a1
pop ecx
pop ecx
mov eax, edi
jmp 0x105027c
lea esi, [ebp - 0x23c]
call fcn.0104f3d0
push 0x3e8
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [ebp - 0x214]
cmp eax, ebx
mov ebx, dword [ebp - 0x218]
je 0x10501c4
cmp eax, 0x80
je 0x10501c4
cmp eax, 0x102
jne 0x1050253
push 0x20
pop esi
jmp 0x105025b
push ebx
push edi
call fcn.0104fe34
push 2
pop esi
cmp eax, esi
jne 0x1050210
cmp dword [ebp + 0xc], 3
je 0x1050243
push ebx
push edi
call fcn.0104fee7
test eax, eax
jne 0x105022b
xor esi, esi
mov dword [ebp - 0x220], 1
push dword [ebp - 0x210]
push ebx
push edi
push dword [ebp - 0x21c]
call fcn.0104f2c4
test eax, eax
je 0x1050230
mov ecx, dword [ebp - 0x224]
mov dword [ecx], eax
jmp 0x1050267
mov ecx, 0xb7
cmp eax, ecx
jne 0x105022b
cmp dword [ebp + 0xc], esi
jne 0x1050227
push ebx
push edi
call fcn.0104ffbd
jmp 0x10501d8
mov esi, ecx
jmp 0x10501ef
push 0x6e
pop esi
jmp 0x1050243
cmp dword [ebp - 0x220], 0
push 0xe
pop esi
je 0x1050243
push ebx
push edi
call fcn.0104ffbd
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x105025b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.010213a1
push ebx
call fcn.010213a1
pop ecx
pop ecx
mov eax, esi
jmp 0x105027c
push 0x57
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01021557
leave
ret 0xc