Function at 0x40ba70
Capabilities:
Check mutex on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52ed60
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4a0
mov eax, dword [0x57c06c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.IMM32.dll_ImmDisableIME]
mov eax, dword [ebx + 8]
lea ecx, [ebp - 0x2c]
mov dword [0x59b48c], eax
call fcn.0041f020
mov esi, eax
cmp esi, 0x57fa20
je 0x40bb0c
mov ecx, 0x57fa20
call fcn.0040b3f0
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [0x57fa20], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [0x57fa30], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
xor ecx, ecx
movzx eax, word [ecx + str.trayad]
lea ecx, [ecx + 2]
mov word [ecx + 0x59e4ce], ax
test ax, ax
jne 0x40bb16
xor ecx, ecx
nop
movzx eax, word [ecx + 0x551500]
lea ecx, [ecx + 2]
mov word [ecx + 0x59e0b6], ax
test ax, ax
jne 0x40bb30
call fcn.0040b5e0
push 8
push 0x551500
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
mov dword [eax + 0x18], 1
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
call fcn.0040b450
push 0x11
xor eax, eax
mov dword [ebp - 0x34], 0
push str.Start_Version_0
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
call fcn.0040b450
push 0x51
push str.TrayAd.cpp
lea ecx, [ebp - 0xe0]
call fcn.00411450
mov esi, eax
lea eax, [ebp - 0x44]
mov dword [esi + 0x64], 2
cmp esi, eax
je 0x40bbcf
cmp dword [ebp - 0x30], 8
mov ecx, eax
push dword [ebp - 0x34]
cmovae ecx, dword [ebp - 0x44]
push ecx
mov ecx, esi
call fcn.0040b450
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.00411a50
lea ecx, [ebp - 0xe0]
call fcn.00411690
lea ecx, [ebp - 0x44]
call fcn.0040b3f0
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
push str.Local_tray_mutex_exist
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call edi
test esi, esi
je 0x40bc90
call edi
cmp eax, 0xb7
jne 0x40bc90
push 0xc
xor eax, eax
mov dword [ebp - 0x34], 0
push str.is_Running..
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
call fcn.0040b450
push 0x57
push str.TrayAd.cpp
lea ecx, [ebp - 0xe0]
call fcn.00411450
lea ecx, [ebp - 0x44]
mov dword [eax + 0x64], 2
cmp eax, ecx
je 0x40bc71
cmp dword [ebp - 0x30], 8
push dword [ebp - 0x34]
cmovae ecx, dword [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0xe0]
call fcn.00411690
lea ecx, [ebp - 0x44]
call fcn.0040b3f0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c19c
xor eax, eax
mov dword [0x59b488], esi
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
mov byte [ebp - 0x2dc], al
mov dword [ebp - 0x2e0], eax
call fcn.004ad0c0
lea edx, [ebp - 0x270]
lea ecx, [ebp - 0x2e0]
call fcn.004af5e0
test al, al
jne 0x40bd23
push str.traynet
mov edx, 0x57fa20
lea ecx, [ebp - 0x2c]
call fcn.0040c440
mov edx, eax
add esp, 4
cmp dword [edx + 0x14], 8
jb 0x40bcf5
mov edx, dword [edx]
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bd00
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x5c]
call fcn.0040b450
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
jmp 0x40bd68
cmp byte [ebp - 0x154], 0
lea edx, [ebp - 0x264]
cmove edx, dword [ebp - 0x268]
add edx, 4
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bd40
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x5c]
call fcn.0040b450
push 0xe
push str.Popup_traynet
lea ecx, [ebp - 0x5c]
call fcn.0040c270
push str._traynet.log
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x2c]
call fcn.0040c440
add esp, 4
mov esi, eax
call fcn.0040b5e0
cmp eax, esi
je 0x40bd9b
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40bd90
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
cmp dword [ebp - 0x48], 8
lea edx, [ebp - 0x5c]
mov dword [ebp - 0x1c], 0
cmovae edx, dword [ebp - 0x5c]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bdc7
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040b450
lea eax, [ebp - 0x2c]
push eax
call fcn.0040b710
mov ecx, eax
call fcn.0040ce10
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
call fcn.0040b710
mov ecx, eax
call fcn.0040d160
test al, al
jne 0x40be76
push 0x11
xor eax, eax
mov dword [ebp - 0x34], 0
push str.CheckLoadRes_quit
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
call fcn.0040b450
push 0x7c
push str.TrayAd.cpp
lea ecx, [ebp - 0xe0]
call fcn.00411450
lea ecx, [ebp - 0x44]
mov dword [eax + 0x64], 0
cmp eax, ecx
je 0x40be5e
cmp dword [ebp - 0x30], 8
push dword [ebp - 0x34]
cmovae ecx, dword [ebp - 0x44]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0xe0]
call fcn.00411690
lea ecx, [ebp - 0x44]
call fcn.0040b3f0
jmp 0x40c0d7
call fcn.0040b710
mov ecx, eax
call fcn.0040d550
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
test al, al
jne 0x40bef7
push 0xf
xor eax, eax
push str.CheckPopup_quit
mov word [ebp - 0x2c], ax
call fcn.0040b450
push 0x82
push str.TrayAd.cpp
lea ecx, [ebp - 0x148]
call fcn.00411450
lea ecx, [ebp - 0x2c]
mov dword [eax + 0x64], 0
cmp eax, ecx
je 0x40bedf
cmp dword [ebp - 0x18], 8
push dword [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x2c]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0x148]
call fcn.00411690
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
jmp 0x40c0d7
push 5
xor eax, eax
push str.Popup
mov word [ebp - 0x2c], ax
call fcn.0040b450
push 0x86
push str.TrayAd.cpp
lea ecx, [ebp - 0x148]
call fcn.00411450
lea ecx, [ebp - 0x2c]
mov dword [eax + 0x64], 2
cmp eax, ecx
je 0x40bf3f
cmp dword [ebp - 0x18], 8
push dword [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x2c]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0x148]
call fcn.00411690
lea ecx, [ebp - 0x2c]
call fcn.0040b3f0
lea ecx, [ebp - 0x4b0]
call fcn.0049c5f0
sub esp, 8
mov dword [ebp - method.t_wndTrayAd.2.virtual_0], vtable.t_wndTrayAd.2.0
xorps xmm0, xmm0
mov dword [ebp - method.t_wndTrayAd.virtual_0], vtable.t_wndTrayAd.0
lea ecx, [ebp - 0x4b0]
mov dword [ebp - method.t_wndTrayAd.1.virtual_0], vtable.t_wndTrayAd.1.0
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
mov byte [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
movups xmmword [ebp - 0x314], xmm0
mov byte [ebp - 0x304], 0
mov byte [ebp - 0x392], 1
mov byte [ebp - 0x394], 1
call fcn.004153d0
test eax, eax
je 0x40c027
mov ecx, dword [ebp - 0x310]
mov dword [ebp - method.t_wndTrayAd.2.virtual_0], vtable.t_wndTrayAd.2.0
mov dword [ebp - method.t_wndTrayAd.virtual_0], vtable.t_wndTrayAd.0
mov dword [ebp - method.t_wndTrayAd.1.virtual_0], vtable.t_wndTrayAd.1.0
test ecx, ecx
je 0x40c0cc
mov dword [ebp - 4], 0
jmp 0x40c0bf
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [ebp - 0x2fc]
push 0
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x2e4], 0
push 0
push eax
movups xmmword [ebp - 0x2fc], xmm0
movq qword [ebp - 0x2ec], xmm0
call esi
test eax, eax
je 0x40c090
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
cmp eax, 0xffffffff
je 0x40c090
lea eax, [ebp - 0x2fc]
push eax
call edi
lea eax, [ebp - 0x2fc]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x2fc]
push eax
call esi
test eax, eax
jne 0x40c062
mov ecx, dword [ebp - 0x310]
mov dword [ebp - method.t_wndTrayAd.2.virtual_0], vtable.t_wndTrayAd.2.0
mov dword [ebp - method.t_wndTrayAd.virtual_0], vtable.t_wndTrayAd.0
mov dword [ebp - method.t_wndTrayAd.1.virtual_0], vtable.t_wndTrayAd.1.0
test ecx, ecx
je 0x40c0cc
mov dword [ebp - 4], 1
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4b0]
call fcn.0049c760
mov eax, dword [0x59b488]
test eax, eax
je 0x40c0f1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x59b488], 0
push 3
xor eax, eax
mov dword [ebp - 0x64], 0
push 0x55163c
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
call fcn.0040b450
push 0x91
push str.TrayAd.cpp
lea ecx, [ebp - 0x2d8]
call fcn.00411450
lea ecx, [ebp - 0x74]
mov dword [eax + 0x64], 2
cmp eax, ecx
je 0x40c14a
cmp dword [ebp - 0x60], 8
push dword [ebp - 0x64]
cmovae ecx, dword [ebp - 0x74]
push ecx
mov ecx, eax
call fcn.0040b450
lea ecx, [ebp - 0x2d8]
call fcn.00411690
lea ecx, [ebp - 0x74]
call fcn.0040b3f0
cmp byte [ebp - 0x154], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x40c189
mov eax, dword [ebp - 0x268]
lea ecx, [ebp - 0x264]
cmp eax, ecx
je 0x40c189
push eax
call fcn.004e4a56
add esp, 4
lea ecx, [ebp - 0x2e0]
call fcn.004af6c0
lea ecx, [ebp - 0x5c]
call fcn.0040b3f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004e24d7
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10