// Detect It Easy: detection rule file format
// Author: sendersu
/*
If errors pls contact sendersu on cracklab.team
*/

init("compiler", "REALbasic (by Xojo.com)");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (PE.isOverlayPresent()) {
        var nOffset = PE.getOverlayOffset();
        var nSize = PE.getOverlaySize();
        var nFoundOffset = PE.findString(nOffset, nSize, "REALbasic.Point");
        var nFoundOffset2 = PE.findString(nOffset, nSize, "Xojo.Introspection");
        var bPicklePresent = PE.isResourceGroupNamePresent("PICKLE")

        if (bPicklePresent != 0 && nFoundOffset != -1 && nFoundOffset2 != -1) {
            bDetected = true;
        }
    }

    _setLang("Basic", bDetected);
    return result(bShowType, bShowVersion, bShowOptions);
}
