Function at 0x407da0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x4fb128]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 0x44], 8
mov dword [ebp - 0x40], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0
push dword [ebp + 8]
mov ecx, 0x4fe804
push 0
call fcn.004038c0
push 0x18
xor eax, eax
push str.PortChange_LogConfig.xml
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], 7
mov dword [ebp - 0xc], 0
mov word [ebp - 0x1c], ax
call fcn.00407850
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push eax
push 0x151
push str.__d_szLogConfig___s
call fcn.0040e8a0
push eax
call fcn.00408330
lea eax, [ebp - 0x1c]
push 0x4e20
push eax
call fcn.00418550
push ebx
call fcn.00403d50
add esp, 0x1c
lea eax, [ebp - 0x78]
push eax
push 0x4c2d80
push dword [0x500870]
call dword [sym.imp.USER32.dll_GetClassInfoW]
lea eax, [ebp - 0x78]
push eax
mov dword [ebp - 0x54], 0x4c3204
call dword [sym.imp.USER32.dll_RegisterClassW]
push str.LPCLocaleCache.Mutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
test edi, edi
je 0x407fbb
mov ecx, dword [0x4fe848]
call fcn.00415f60
test al, al
je 0x407f2a
lea ecx, [ebp - 0x3c]
call fcn.00411a00
mov esi, dword [0x4fe848]
push 0x16b
push str.int___stdcall_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
push str.PortChange.cpp
lea ecx, [ebp - 0x50]
call fcn.0040ff10
push eax
push str.if_hMutex
call fcn.004037d0
add esp, 4
lea ecx, [ebp - 0x3c]
push eax
call fcn.00412110
push eax
lea ecx, [ebp - 0x3c]
call fcn.00414400
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.0040ee50
add esp, 4
mov ecx, esi
push eax
call fcn.004159a0
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x44], vtable.log4cxx::helpers::ObjectPtrT_class_log4cxx::Level_.0
test ecx, ecx
je 0x407f1a
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ecx, [ebp - 0x44]
call fcn.0040e920
lea ecx, [ebp - 0x3c]
call fcn.00411f20
push str.if_hMutex
call fcn.0040e8a0
push eax
call fcn.00408330
add esp, 8
push 0
push 0x4c3204
call dword [sym.imp.USER32.dll_FindWindowW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407f91
push str.ERROR_ALREADY_EXISTS
call fcn.0040e8a0
push eax
call fcn.00408330
add esp, 8
test esi, esi
je 0x407f83
push str.Run_Old_Instance.
call fcn.0040e8a0
push eax
call fcn.00408330
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
jmp 0x408029
push str.else_case_of_ERROR_ALREADY_EXISTS
call fcn.0040e8a0
push eax
call fcn.00408330
add esp, 8
test esi, esi
je 0x407fbb
push str.Run_New_Instance.
call fcn.0040e8a0
push eax
call fcn.00408330
add esp, 8
push dword [ebp + 0x14]
push ebx
call fcn.00405fa0
add esp, 8
mov ecx, 0x4fe804
mov edi, eax
call fcn.004065b0
mov esi, dword [0x4fe838]
test esi, esi
je 0x408019
mov eax, dword [esi]
test eax, eax
je 0x407ff2
push eax
call fcn.00472ee9
add esp, 4
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x408009
push eax
call fcn.00472ee9
add esp, 4
mov dword [esi + 4], 0
push esi
mov dword [esi + 8], 0
call fcn.0047164a
add esp, 4
mov ecx, 0x4fe804
call fcn.00406510
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [ebp - 8], 8
jb 0x40803a
push dword [ebp - 0x1c]
call fcn.0047164a
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x10