Function at 0x401150
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x440
push ebx
mov ebx, dword [esp + 0x448]
push ebp
push edi
mov ecx, 0xcf
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], ebx
call fcn.0040c2d0
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x24]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, eax
test ebp, ebp
je 0x4013aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4013aa
mov edi, dword [esp + 0x45c]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x34c]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebx + 0xa4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
je 0x401242
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x401242
mov edi, 0x40d20c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [esp + 0x34c]
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea ebx, [esp + 0x34c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
test eax, eax
je 0x4012ae
cmp eax, 1
je 0x4012ae
cmp eax, 2
je 0x4012ae
cmp eax, 6
je 0x4012ae
lea eax, [esp + 0x10]
lea ecx, [esp + 0x34c]
push eax
push ecx
call fcn.004013c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40132b
lea edx, [esp + 0x10]
push edx
call fcn.00403190
mov esi, eax
add esp, 4
test esi, esi
jne 0x40132b
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4012b5
lea eax, [esp + 0x10]
push eax
call fcn.00403f90
add esp, 4
mov esi, eax
jmp 0x40131e
mov esi, 9
jmp 0x40132b
mov eax, dword [esp + 0x330]
test eax, eax
jne 0x4012e8
mov eax, dword [esp + 0x32c]
test eax, eax
je 0x4012e8
mov eax, dword [esp + 0x10]
push 0x31
mov ecx, dword [eax + 0x8c]
mov edx, dword [eax + 0x90]
push ecx
push edx
push 0
call edi
cmp eax, 1
jne 0x401319
mov ecx, dword [esp + 0x458]
lea eax, [esp + 0x10]
push eax
push ecx
call fcn.00401050
add esp, 8
test eax, eax
je 0x401312
lea edx, [esp + 0x10]
push edx
call fcn.00403f90
add esp, 4
mov esi, eax
jmp 0x40131e
mov esi, 5
jmp 0x40131e
mov esi, 3
lea eax, [esp + 0x10]
push eax
call fcn.004042c0
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40136b
test esi, esi
jne 0x40134c
mov eax, dword [esp + 0x10]
push 0x40
mov ecx, dword [eax + 0x84]
mov edx, dword [eax + 0x88]
push ecx
jmp 0x401366
cmp esi, 5
je 0x401356
cmp esi, 3
jne 0x40136b
mov eax, dword [esp + 0x10]
push 0x40
mov ecx, dword [eax + 0x7c]
mov edx, dword [eax + 0x80]
push ecx
push edx
push 0
call edi
mov eax, dword [esp + 0x348]
test eax, eax
je 0x40137b
mov esi, 2
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x401394
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x401394
test eax, eax
je 0x401394
call fcn.00401140
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x440
ret 0x14
pop edi
pop ebp
mov eax, 4
pop ebx
add esp, 0x440
ret 0x14