Function at 0x403640
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54ce53
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
push ebx
push esi
push edi
mov eax, dword [0x5a2740]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x14], ebx
push 0x57e080
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
test eax, eax
je 0x403889
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403889
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], 8
mov dword [ebp - 0x28], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, ebx
call fcn.00414739
push 0
call fcn.0041531d
mov dword [ebp - 0x24], eax
call fcn.004124b6
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4036e0
push 0x80004005
call fcn.004017c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 1
call fcn.004124b6
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x403710
push 0x80004005
call fcn.004017c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
cmp dword [0x5a9834], 1
jle 0x4037bc
mov edi, edi
mov eax, dword [0x5a9834]
dec eax
mov dword [0x5a9834], eax
test eax, eax
jle 0x403792
mov eax, dword [0x5a983c]
add eax, 4
mov dword [0x5a983c], eax
mov ebx, dword [eax]
movzx eax, word [ebx]
cmp eax, 0x2d
je 0x40375b
cmp eax, 0x2f
jne 0x403730
movzx eax, word [ebx + 2]
push eax
call fcn.005265eb
add esp, 4
cmp eax, 0x69
je 0x403782
cmp eax, 0x75
jne 0x403730
lea edx, [ebx + 4]
lea ecx, [ebp - 0x18]
call fcn.00403530
mov esi, dword [ebp - 0x18]
jmp 0x403730
lea edx, [ebx + 4]
lea ecx, [ebp - 0x1c]
call fcn.00403530
mov edi, dword [ebp - 0x1c]
jmp 0x403730
cmp dword [esi - 0xc], 0
sete cl
cmp dword [edi - 0xc], 0
sete al
xor cl, al
jne 0x4037b9
push 0x5991a4
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 3
call fcn.00527d0d
mov ebx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x100]
call fcn.00404060
mov byte [ebp - 4], 4
cmp dword [edi - 0xc], 0
je 0x4037e5
mov ecx, edi
call fcn.004035b0
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], 1
jmp 0x4037f7
cmp dword [esi - 0xc], 0
je 0x4037f7
push esi
lea ecx, [ebp - 0x100]
call fcn.004034e0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x100]
mov ecx, eax
mov dword [ebx + 0x20], eax
call fcn.004164ca
lea ecx, [ebp - 0x100]
mov dword [ebx + 0xcc], eax
mov byte [ebp - 4], 3
call fcn.00403930
mov dword [ebp - 4], 2
jmp 0x40384a
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40386a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40390d
mov ecx, dword [edi]
push edi
jmp 0x403908
call fcn.004124b6
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4038a5
push 0x80004005
call fcn.004017c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
push 0xa9
mov dword [ebp - 4], 0
call fcn.00413b1d
test eax, eax
je 0x4038d8
push 0xa9
push eax
lea ecx, [ebp - 0x14]
call fcn.004023c0
mov esi, dword [ebp - 0x14]
push 0
push 0x10
push esi
call fcn.004114d7
add esi, 0xfffffff0
mov dword [ebx + 0xcc], 2
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40390d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret