var File=PE;
includeScript("result");
/**
* The file offset of the entry point.
*/
PE.nEP=PE.getEntryPointOffset();
/**
* Get the signature at an offset of the entry point.
* @see Binary.getSignature
*/
PE.getEPSignature = function(nOffset,nSize)
{
return PE.getSignature(PE.nEP+nOffset,nSize);
}
/**
* Add console and/or administrator requirement to the general options.
* @returns {String}
*/
PE.getGeneralOptionsEx = function()
{
sResult=PE.getGeneralOptions();
if(PE.isConsole())
{
sResult=sResult.append("console");
}
if(/requireAdministrator/.test(PE.getManifest()))
{
sResult=sResult.append("admin");
}
if(PE.isSignedFile())
{
sResult=sResult.append("signed");
}
return sResult;
}
/**
* Locate the first library matching a pattern.
* @returns {?Array} null
if not found, otherwise:
*
[-1]
is the number of the library;
*
[0]
is the name of the library (lower cased);
*
[1]
onwards are the captured subpatterns.
*/
PE.isLibraryPresentExp = function(sLibraryPattern)
{
var aMatch=null;
for (var n=0;n