Page 26 of 47

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 13 Nov 2017, 23:13
by Dr.MonaLisa
Loewenherz wrote: 13 Nov 2017, 22:10 I love your good work. Best fanpatch without sourcecode ever. ;)
I'm glad that you like the patch.

About the source code: modified game files can be viewed by Notepad to see all the changes. The Launcher source code won't be released, because it could be stolen by people with bad intentions.

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 14 Nov 2017, 14:50
by Loewenherz
I mean, that you patch EE2 and not have the original sourcecode from the game.

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 14 Nov 2017, 18:35
by Dr.MonaLisa
Oh yeah, most of fixes are done by Assembly :(

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 15 Nov 2017, 04:02
by Dr.MonaLisa
I decided to share the Unofficial Patch 1.5 Launcher C++ source code for interested people: viewtopic.php?f=54&t=5026 It requires a donation to prevent abuses, software thieves, etc. Hopefully somebody will find it useful.

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 25 Nov 2017, 16:55
by Kinsiinoo
Hmm, any idea? GOG EE2 with UP :cry:
No virus at all on my pc but kaspersky after the new virus database update marked EE2 UP version as a malware...
Image

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 25 Nov 2017, 17:02
by Dr.MonaLisa
To be honest this should be reported to Kaspersky Support, not to me.

You can read why it's possibly detected here: https://www.ee2.eu/help/#antivirus

The newest virustotal scan of UP1.5 Launcher file: https://www.virustotal.com/#/file/df64c ... /detection
Kaspersky says it's "Clean" there? So I have no idea why it detects it at your computer.

EDIT:
From the screenshot you posted, it seems that it's possibly blocked because of Windows Firewall function in the Launcher. The functions sets Windows Firewall to open game ports (26000 and some others) to fix game hosting / joining issues in Multiplayer mode. Maybe Kaspersky thinks it's dangerous.

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 25 Nov 2017, 17:07
by Kinsiinoo
Hm thanks for the answer, i found this description about that virus on kaspersky website:
https://threats.kaspersky.com/en/threat ... n32.Fibbit
Maybe a new "mark" for some special "hack" you used for the best user experience? IDK i was just surprised :shock:

EDIT: Oh okey, i calm down and reinstall, and add to the exceptions :D

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 25 Nov 2017, 17:17
by Dr.MonaLisa
Those "virus" names don't really matter.
It just depends what signature was similar in the EE2.exe and their virus definitions.

Kaspersky is a Russian Antivirus.
At the website you sent:
Top 10 countries with most attacked users (% of total attacks)
Country % of users attacked worldwide*
1 Russian Federation 62.74
2 Kazakhstan 2.70
3 Austria 2.46
4 Uzbekistan 2.46
5 India 2.42
6 Germany 2.38
7 Ukraine 2.25
8 USA 2.05
9 Japan 1.64
10 South Africa 1.52
Seems like they have some serious problem with this type of attacks in Russia, so maybe virus definitions are very "careful".

Here is the Windows Firewall Rule source code from the Launcher:

Code: Select all

void WindowsFirewallAddEE2Ports() {
		HRESULT hrComInit = S_OK;
		HRESULT hr = S_OK;

		INetFwPolicy2 *pNetFwPolicy2 = NULL;
		INetFwRules *pFwRules = NULL;
		INetFwRule *pFwRule = NULL;

		long CurrentProfilesBitMask = 0;

		BSTR bstrRuleName = SysAllocString(L"Empire Earth II ver. 1.5 ports: 26000, 6500, 13139");
		BSTR bstrRuleDescription = SysAllocString(L"Allow incoming network traffic over ports 26000, 6500, 13139 for Empire Earth II ver. 1.5 Multiplayer");
		BSTR bstrRuleGroup = SysAllocString(L"Empire Earth II");
		BSTR bstrRuleLPorts = SysAllocString(L"26000,6500,13139");
		BSTR bstrRuleInterfaceType = SysAllocString(L"All");

		hrComInit = CoInitializeEx(
			0,
			COINIT_APARTMENTTHREADED
			);

		if (hrComInit != RPC_E_CHANGED_MODE)
		{
			if (FAILED(hrComInit))
			{
				printf("CoInitializeEx failed: 0x%08lx\n", hrComInit);
				goto Cleanup;
			}
		}
		
		hr = WFCOMInitialize(&pNetFwPolicy2);
		if (FAILED(hr))
		{
			goto Cleanup;
		}

		hr = pNetFwPolicy2->get_Rules(&pFwRules);
		if (FAILED(hr))
		{
			printf("get_Rules failed: 0x%08lx\n", hr);
			goto Cleanup;
		}

		hr = pNetFwPolicy2->get_CurrentProfileTypes(&CurrentProfilesBitMask);
		if (FAILED(hr))
		{
			
			printf("get_CurrentProfileTypes failed: 0x%08lx\n", hr);
			goto Cleanup;
		}
		if ((CurrentProfilesBitMask & NET_FW_PROFILE2_PUBLIC) &&
			(CurrentProfilesBitMask != NET_FW_PROFILE2_PUBLIC))
		{
			CurrentProfilesBitMask ^= NET_FW_PROFILE2_PUBLIC;
		}

		hr = CoCreateInstance(
			__uuidof(NetFwRule),
			NULL,
			CLSCTX_INPROC_SERVER,
			__uuidof(INetFwRule),
			(void**)&pFwRule);
		if (FAILED(hr))
		{
			printf("CoCreateInstance for Firewall Rule failed: 0x%08lx\n", hr);
			goto Cleanup;
		}

		// Populate the Firewall Rule object
		//prevent duplicates:
		pFwRules->Remove(bstrRuleName);

		pFwRule->put_Name(bstrRuleName);
		pFwRule->put_Description(bstrRuleDescription);
		pFwRule->put_Protocol(NET_FW_IP_PROTOCOL_UDP);
		pFwRule->put_LocalPorts(bstrRuleLPorts);
		pFwRule->put_Grouping(bstrRuleGroup);
		pFwRule->put_InterfaceTypes(bstrRuleInterfaceType);
		pFwRule->put_Action(NET_FW_ACTION_ALLOW);
		pFwRule->put_Enabled(VARIANT_TRUE);

		// Add the Firewall Rule
		hr = pFwRules->Add(pFwRule);
		if (FAILED(hr))
		{
			
			printf("Firewall Rule Add failed: 0x%08lx\n", hr);
			goto Cleanup;
		}

	Cleanup:

		// Free BSTR's
		SysFreeString(bstrRuleName);
		SysFreeString(bstrRuleDescription);
		SysFreeString(bstrRuleGroup);
		SysFreeString(bstrRuleLPorts);
		SysFreeString(bstrRuleInterfaceType);
		if (pFwRule != NULL)
		{
			pFwRule->Release();
		}

		// Release the INetFwRules object
		if (pFwRules != NULL)
		{
			pFwRules->Release();
		}

		if (pNetFwPolicy2 != NULL)
		{
			pNetFwPolicy2->Release();
		}
		if (SUCCEEDED(hrComInit))
		{
			CoUninitialize();
		}
}

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 30 Nov 2017, 09:23
by Dr.MonaLisa
I received a reply from Kaspersky Lab about this false-positive:
kaspersky-false.PNG
kaspersky-false.PNG (47.77 KiB) Viewed 3588 times

Hopefully it clears things up.

Re: EE2, EE2X - Empire Earth II - Unofficial Patch 1.5 (2015)

Posted: 07 Dec 2017, 18:30
by Dr.MonaLisa
Minor update 156019 has been released!
Most important changes:
- Fixed Unhandled Exception game crashes that may occur in a Multiplayer game room, when host changes map size to Custom.
- Added the "Exclusive", Borderless Windowed Mode support, activated and deactivated by the ALT+ENTER hotkey, only when the "Windowed Mode" option is DISABLED/unchecked in UP1.5 Settings:
* "Run EE2 in Windowed Mode" tooltip: "Check this option to use the Windowed Mode, with window borders, since game start. Otherwise (when this option is unchecked) use the new "Exclusive", Borderless Windowed Mode, activated by the ALT+ENTER hotkey, when the game is already running".
* The "Exclusive" Windowed Mode is only fully supported on Windows 10 (older Windows versions have different window borders size).
* It can be useful, for example when you're observing a Multiplayer game, but you want to watch a movie/TV serie at the same time, using the video player with "Always on top" feature.
- Updated DirectX 9 (DX8 to DX9 converter) to improve reliability.
- Improved the last patrial fix for the "Scout Trick" (aka. "Scout Glitch") - punishment effect radius reduction.

If you have got UP1.5.5+, you can update by clicking: (Click)empireearth2://FunctionMinorVersionInstall[/protocol]