// Author: DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

init("protector", "iCrypt");

function detect(bShowType, bShowVersion, bShowOptions) {
    bDetected =
        APK.isArchiveRecordPresent("assets/af.bin") ||
        APK.isArchiveRecordPresent("assets/ijiami.ajm") ||
        APK.isArchiveRecordPresent("assets/ijiami.dat") ||
        APK.isArchiveRecordPresent("assets/IJMDal.Data") ||
        APK.isArchiveRecordPresent("assets/signed.bin") ||
        APK.isArchiveRecordPresent("assets/InteGration_4.5.1.ttf") ||
        APK.isArchiveRecordPresent("assets/libijmDataEncryption.so") ||
        APK.isArchiveRecordPresent("assets/libijmDataEncryption_arm64.so") ||
        APK.isArchiveRecordPresent("assets/libijmDataEncryption_x86.so") ||
        APK.isArchiveRecordPresent("lib/arm/libijm-emulator.so");

    if (bDetected) sVersion = "Enterprise";

    return result(bShowType, bShowVersion, bShowOptions);
}