Function at 0x4a6880
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x54735c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x40]
push esi
push edi
mov edi, dword [ebp + 8]
push eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00401e10
mov ecx, dword [ebp - 0x3c]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x40]
add esp, 8
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jb 0x4a6901
lea eax, [esi + 0x18]
cmp eax, 0x547004
je 0x4a6901
cmp dword [eax + 0x14], 8
mov ecx, eax
jb 0x4a68f3
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
mov ecx, 0x547004
call fcn.00403ab0
push 0xe
xor eax, eax
mov dword [ebp - 0xc], 0
push 0x51e634
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], 7
mov word [ebp - 0x1c], ax
call fcn.00403ab0
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
test eax, eax
je 0x4a69dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4a69dc
push edi
call dword [sym.imp.DuiLib.dll_public:_static_void___cdecl_DuiLib::CPaintManagerUI::SetInstance_struct_HINSTANCE____]
add esp, 4
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x4a69dc
push 0x3d8
call fcn.004f2e7d
add esp, 4
test eax, eax
je 0x4a69dc
mov ecx, eax
call fcn.004a76e0
mov esi, eax
test esi, esi
je 0x4a69dc
push ebx
lea ecx, [ebp - 0x34]
call fcn.00409ce0
lea eax, [ebp - 0x34]
mov ecx, esi
push eax
call fcn.004a9a10
lea ecx, [ebp - 0x34]
call fcn.00409d20
push 0
push 0x190
push 0x258
push 0
push 0
push 0
push 0x81
push 0x51e654
push 0
mov ecx, esi
call dword [sym.imp.DuiLib.dll_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::Create_struct_HWND_____wchar_t_const___unsigned_long_int__unsigned_long_int__int__int__int__int__struct_HMENU____]
mov ecx, esi
call fcn.004a9ac0
call dword [sym.imp.DuiLib.dll_public:_static_void___cdecl_DuiLib::CPaintManagerUI::MessageLoop_void_]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov edx, dword [ebp - 8]
cmp edx, 8
jb 0x4a6a16
mov ecx, dword [ebp - 0x1c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4a6a0c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a6ae7
push edx
push ecx
call fcn.004f2ead
add esp, 8
mov esi, dword [ebp - 0x40]
xor eax, eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 7
mov word [ebp - 0x1c], ax
test esi, esi
je 0x4a6ad2
mov edi, dword [ebp - 0x3c]
cmp esi, edi
je 0x4a6a92
nop dword [eax]
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x4a6a75
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x4a6a6b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a6ae7
mov eax, edx
push ecx
push eax
call fcn.004f2ead
add esp, 8
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
add esi, 0x18
cmp esi, edi
jne 0x4a6a40
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x38]
mov eax, 0x2aaaaaab
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x4a6ac8
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a6ae7
push ecx
push esi
call fcn.004f2ead
add esp, 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f313b
mov esp, ebp
pop ebp
ret 0x10
call fcn.004f855c
int3