2022-12-03 22:17:48 -08:00
|
|
|
|
using System.Linq;
|
2023-03-09 11:52:28 -05:00
|
|
|
|
using BinaryObjectScanner.Interfaces;
|
2023-03-07 16:59:14 -05:00
|
|
|
|
using BinaryObjectScanner.Wrappers;
|
2021-03-21 14:30:37 -07:00
|
|
|
|
|
2023-03-09 23:19:27 -05:00
|
|
|
|
namespace BinaryObjectScanner.Protection
|
2020-10-29 10:05:56 -07:00
|
|
|
|
{
|
2022-05-01 17:17:15 -07:00
|
|
|
|
public class Intenium : IPortableExecutableCheck
|
2020-10-29 10:05:56 -07:00
|
|
|
|
{
|
|
|
|
|
|
/*
|
2020-11-01 11:45:30 -07:00
|
|
|
|
* Possible strings for finding INTENIUM Trial & Buy Protection
|
2020-10-29 10:05:56 -07:00
|
|
|
|
*
|
|
|
|
|
|
* Luxor Only:
|
|
|
|
|
|
* - command_buyNowCb - 63 6F 6D 6D 61 6E 64 5F 62 75 79 4E 6F 77 43 62
|
|
|
|
|
|
* - command_testTrialCb - 63 6F 6D 6D 61 6E 64 5F 74 65 73 74 54 72 69 61 6C 43 62
|
|
|
|
|
|
* - PHRASE_TRIAL - 50 48 52 41 53 45 5F 54 52 49 41 4C
|
|
|
|
|
|
* - V_TRIAL_GAME - 56 5F 54 52 49 41 4C 5F 47 41 4D 45
|
|
|
|
|
|
* - V_FULL_GAME - 56 5F 46 55 4C 4C 5F 47 41 4D 45
|
|
|
|
|
|
*
|
|
|
|
|
|
* Luxor, World, Cradle, and Kingdom:
|
|
|
|
|
|
* - Trial + (char)0x00 + P - 54 72 69 61 6C 00 50
|
2020-10-29 11:01:52 -07:00
|
|
|
|
* + This is possibly followed by a version number. Undetermined if it's the software or protection version.
|
2020-10-29 10:05:56 -07:00
|
|
|
|
* - NO NESTED PRMS SUPPORTED - 4E 4F 20 4E 45 53 54 45 44 20 50 52 4D 53 20 53 55 50 50 4F 52 54 45 44
|
|
|
|
|
|
*/
|
2020-10-29 11:01:52 -07:00
|
|
|
|
|
2021-08-31 21:15:56 -07:00
|
|
|
|
/// <inheritdoc/>
|
2022-05-01 17:17:15 -07:00
|
|
|
|
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
2020-10-29 11:01:52 -07:00
|
|
|
|
{
|
2021-08-31 21:15:56 -07:00
|
|
|
|
// Get the sections from the executable, if possible
|
|
|
|
|
|
var sections = pex?.SectionTable;
|
|
|
|
|
|
if (sections == null)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
2022-12-03 22:17:48 -08:00
|
|
|
|
var fileNameResource = pex.FindGenericResource("NO NESTED PRMS SUPPORTED");
|
|
|
|
|
|
if (fileNameResource.Any())
|
2022-08-13 21:04:26 -06:00
|
|
|
|
return "INTENIUM Trial & Buy Protection";
|
2021-08-31 21:15:56 -07:00
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
2020-10-29 10:05:56 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|