Function at 0x40a950
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e6165
mov eax, dword fs:[0]
push eax
sub esp, 0x580
mov eax, dword [0x520628]
xor eax, esp
mov dword [esp + 0x578], eax
push ebx
push esi
push edi
mov eax, dword [0x520628]
xor eax, esp
push eax
lea eax, [esp + 0x590]
mov dword fs:[0], eax
lea eax, [esp + 0x44]
mov esi, ecx
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], 8
mov dword [esp + 0x4c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.00461cb7
push 8
call fcn.004509b2
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x40a9d3
mov dword [eax], vtable.CImpIDispatch.0
mov dword [eax + 4], ebx
jmp 0x40a9d5
xor eax, eax
push 4
mov dword [esi + 0xa4], eax
call fcn.00462395
cmp eax, ebx
je 0x40a9ee
mov dword [eax], vtable.CCustomOccManager.0
jmp 0x40a9f0
xor eax, eax
push eax
call fcn.00458561
add esp, 4
push 0x206
lea edx, [esp + 0x382]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x388], cx
call fcn.00473d40
add esp, 0xc
push 0x104
lea eax, [esp + 0x380]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x37c]
push 0x5c
push ecx
call fcn.0046e8d1
add eax, 2
xor edx, edx
mov word [eax], dx
mov ecx, 0x4c
mov word [esp + 0x352], cx
mov ecx, 0x6e
mov word [esp + 0x358], cx
mov edx, 0x61
mov word [esp + 0x354], dx
mov eax, 0x50
mov word [esp + 0x350], ax
mov ecx, 0x65
mov word [esp + 0x35e], cx
mov edx, 0x63
mov word [esp + 0x35a], dx
mov eax, 0x75
mov word [esp + 0x356], ax
mov ecx, 0x75
mov edx, 0x72
mov word [esp + 0x360], dx
mov word [esp + 0x364], cx
mov eax, 0x68
mov word [esp + 0x35c], ax
mov ecx, 0x78
mov edx, 0x74
mov eax, 0x4d
mov word [esp + 0x366], dx
mov word [esp + 0x36a], cx
mov word [esp + 0x362], ax
lea ecx, [esp + 0x350]
mov edx, 0x2b
push ecx
mov eax, 0x65
mov word [esp + 0x370], dx
mov word [esp + 0x36c], ax
lea edx, [esp + 0x388]
xor eax, eax
push 0x104
push edx
mov word [esp + 0x37a], ax
call fcn.0046ecd5
add esp, 0x14
call fcn.00460929
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40ab48
push 0x80004005
call fcn.00407820
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x59c], ebx
call fcn.00491f20
add esp, 4
push 0x208
lea edx, [esp + 0x380]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00491cf0
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x36c]
push edx
call fcn.00491dd0
add esp, 8
push 1
push 0x5114dc
lea ecx, [esp + 0x1c]
call fcn.00406b80
xor esi, esi
lea ecx, [ecx]
movzx eax, byte [esp + esi + 0x368]
push eax
push 0x5114e0
lea edi, [esp + 0x1c]
call fcn.004073f0
inc esi
add esp, 8
cmp esi, 0x14
jl 0x40abb0
push 1
push 0x5114ec
mov ecx, edi
call fcn.00406b80
mov esi, dword [esp + 0x14]
cmp dword [esi - 4], 1
jle 0x40abf7
mov ecx, dword [esi - 0xc]
push ecx
mov ecx, edi
call fcn.004074b0
mov esi, dword [esp + 0x14]
push esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [esi - 0x10]
cmp dword [esi - 0xc], ebx
mov dword [0x52a510], eax
lea eax, [esi - 0x10]
je 0x40ac59
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40ac31
cmp dword [esi - 8], ebx
jge 0x40ac27
push 0x80070057
call fcn.00407820
xor edx, edx
mov dword [esi - 0xc], ebx
mov word [esi], dx
jmp 0x40ac59
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ac47
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40aca6
push 0x30
push 0x5114f0
push 0x511500
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [0x52a510]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x52a510]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x598], 0xffffffff
lea eax, [esi - 0x10]
jmp 0x40b19e
mov ecx, 0x4c
mov word [esp + 0x334], cx
mov edx, 0x48
mov eax, 0x56
mov ecx, 0x4d
mov word [esp + 0x336], dx
mov word [esp + 0x338], ax
mov word [esp + 0x33a], cx
mov edx, 0x5f
mov eax, 0x25
mov ecx, 0x30
mov word [esp + 0x33c], dx
mov word [esp + 0x33e], ax
mov word [esp + 0x340], cx
mov edx, 0x38
mov eax, 0x58
xor ecx, ecx
mov word [esp + 0x342], dx
mov word [esp + 0x344], ax
mov word [esp + 0x346], cx
call fcn.00460929
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40ad3f
push 0x80004005
call fcn.00407820
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x598], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor eax, 0x1ed8e4e
push eax
lea ecx, [esp + 0x338]
push ecx
lea edi, [esp + 0x20]
call fcn.004073f0
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [eax - 4], 1
jle 0x40ad90
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.004074b0
mov eax, dword [esp + 0x18]
push eax
push 0x80
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
lea eax, [esp + 0xac]
push eax
call fcn.0040d470
mov byte [esp + 0x598], 2
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xac]
mov dword [esi + 0x20], ecx
call fcn.0046323c
mov eax, dword [esi + 0xa4]
cmp eax, ebx
je 0x40ade3
push eax
mov dword [eax], vtable.CImpIDispatch.0
call fcn.004509e1
add esp, 4
mov ecx, dword [0x52a92c]
cmp ecx, ebx
je 0x40ae25
mov esi, ecx
call fcn.0044a600
push eax
call fcn.004509e1
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x40ae10
push eax
call fcn.004509e1
add esp, 4
mov dword [esi + 4], ebx
mov edx, dword [0x52a92c]
push edx
call fcn.004509e1
add esp, 4
mov dword [0x52a92c], ebx
mov ecx, dword [0x52a930]
cmp ecx, ebx
je 0x40ae66
mov esi, ecx
call fcn.0044a600
push eax
call fcn.004509e1
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x40ae52
push eax
call fcn.004509e1
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [0x52a930]
push eax
call fcn.004509e1
add esp, 4
mov dword [0x52a930], ebx
mov eax, dword [0x52bf64]
mov ecx, dword [0x52bf60]
mov edi, eax
sub edi, ecx
sar edi, 2
xor esi, esi
cmp edi, ebx
jle 0x40aeb0
mov edi, edi
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40ae94
call fcn.0046e5b0
mov ecx, dword [0x52bf60]
mov ecx, dword [ecx + esi*4]
push ecx
call fcn.004509e1
mov eax, dword [0x52bf64]
mov ecx, dword [0x52bf60]
inc esi
add esp, 4
cmp esi, edi
jl 0x40ae80
mov ebx, eax
cmp ecx, eax
jbe 0x40aec6
call fcn.0046e5b0
mov eax, dword [0x52bf64]
mov ecx, dword [0x52bf60]
mov esi, dword [0x52bf54]
mov edi, ecx
cmp ecx, eax
jbe 0x40aed7
call fcn.0046e5b0
mov ecx, dword [0x52bf54]
push ebx
push esi
push edi
push ecx
lea edx, [esp + 0x4c]
push edx
mov esi, 0x52bf54
call fcn.0040b510
mov eax, dword [0x52bf7c]
mov ecx, dword [0x52bf78]
mov ebx, eax
cmp ecx, eax
jbe 0x40af11
call fcn.0046e5b0
mov eax, dword [0x52bf7c]
mov ecx, dword [0x52bf78]
mov esi, dword [0x52bf6c]
mov edi, ecx
cmp ecx, eax
jbe 0x40af22
call fcn.0046e5b0
mov eax, dword [0x52bf6c]
push ebx
push esi
push edi
push eax
lea edi, [esp + 0x4c]
mov esi, 0x52bf6c
call fcn.0040b5b0
push 4
call fcn.004509b2
xor edi, edi
add esp, 4
cmp eax, edi
je 0x40af51
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x40af53
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 4
call fcn.0040b300
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x40af8d
push eax
call fcn.004509e1
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.004509e1
add esp, 4
push 4
call fcn.004509b2
add esp, 4
cmp eax, edi
je 0x40afbc
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x40afbe
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 6
call fcn.0040b400
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x40aff8
push eax
call fcn.004509e1
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.004509e1
add esp, 4
lea eax, [esp + 0x1c]
push eax
call fcn.0040b640
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x52bf9c]
mov dword [esp + 0x1c], ecx
mov dword [0x52bf9c], eax
cmp ecx, eax
je 0x40b03a
mov esi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], esi
mov dword [eax], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [0x52bfb4]
mov edx, dword [0x52bfb8]
mov dword [0x52bfb4], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [0x52bfb8], eax
lea esi, [esp + 0x1c]
mov byte [esp + 0x598], 0xa
call fcn.0040b6c0
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x1c]
push eax
call fcn.004509e1
mov eax, dword [0x52a944]
add esp, 4
cmp eax, edi
je 0x40b09e
push eax
call fcn.004509e1
add esp, 4
mov dword [0x52a944], edi
mov eax, dword [0x52ab50]
cmp eax, edi
je 0x40b0b6
push eax
call fcn.004509e1
add esp, 4
mov dword [0x52ab50], edi
mov eax, dword [0x52ab68]
cmp eax, edi
je 0x40b0ce
push eax
call fcn.004509e1
add esp, 4
mov dword [0x52ab68], edi
mov edx, dword [0x52bfc4]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], edi
lea eax, [edx - 0x10]
je 0x40b12d
cmp dword [eax + 0xc], edi
lea ecx, [eax + 0xc]
jge 0x40b106
cmp dword [edx - 8], edi
jge 0x40b0f6
push 0x80070057
call fcn.00407820
mov dword [edx - 0xc], edi
mov edx, dword [0x52bfc4]
xor ecx, ecx
mov word [edx], cx
jmp 0x40b12d
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b11c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [0x52bfc4], eax
mov eax, dword [0x52a510]
cmp eax, edi
je 0x40b150
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x52a510]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x52a510], edi
lea ecx, [esp + 0xac]
mov byte [esp + 0x598], 1
call fcn.0040ea60
mov byte [esp + 0x598], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b18c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x598], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b1b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x590]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x578]
xor ecx, esp
call fcn.0046e186
mov esp, ebp
pop ebp
ret