/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.Config
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.policy.module;

import com.l7tech.server.policy.module.ModulesConfig;
import com.l7tech.util.Config;
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.logging.Logger;
import org.jetbrains.annotations.NotNull;

/*
 * Exception performing whole class analysis ignored.
 */
public class CustomAssertionModulesConfig
implements ModulesConfig {
    private static final Logger a;
    private static final String b;
    private static final String c;
    private static final String d;
    private static final String e;
    private static final String f;
    private static final boolean g = false;
    private static final boolean h = true;
    private static final long i = 4523L;
    public static final String PARAM_CUSTOM_ASSERTIONS_HOTSWAP_WIN_WORKAROUND_SUFFIX;
    private final Config j;
    private List<String> k;
    private static final String[] l;

    public CustomAssertionModulesConfig(@NotNull Config config) {
        if (config == null) {
            CustomAssertionModulesConfig.a(0);
        }
        this.j = config;
        this.k = Arrays.asList(l[14]);
    }

    @Override
    public boolean isFeatureEnabled() {
        return true;
    }

    @Override
    public boolean isScanningEnabled() {
        boolean bl2;
        block7: {
            block6: {
                String string = this.getCustomAssertionPropertyFileName();
                try {
                    try {
                        try {
                            if (string == null || string.isEmpty()) break block6;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw CustomAssertionModulesConfig.a(illegalArgumentException);
                        }
                        if (this.j.getBooleanProperty(l[11], false)) break block6;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw CustomAssertionModulesConfig.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block7;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw CustomAssertionModulesConfig.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    @Override
    public File getModuleDir() {
        String[] stringArray = l;
        String string = this.j.getProperty(stringArray[7]);
        try {
            if (string == null) {
                a.config(stringArray[10]);
                return null;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionModulesConfig.a(illegalArgumentException);
        }
        return new File(string);
    }

    @Override
    public List<String> getModulesExt() {
        return Collections.unmodifiableList(this.k);
    }

    @Override
    public String getDisabledSuffix() {
        return System.getProperty(l[16]);
    }

    public String getCustomAssertionPropertyFileName() {
        String[] stringArray = l;
        String string = this.j.getProperty(stringArray[6]);
        try {
            if (string == null) {
                a.config(stringArray[18]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionModulesConfig.a(illegalArgumentException);
        }
        return string;
    }

    public String getModuleWorkDirectory() {
        String[] stringArray = l;
        String string = this.j.getProperty(stringArray[13]);
        try {
            if (string == null) {
                a.config(stringArray[22]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw CustomAssertionModulesConfig.a(illegalArgumentException);
        }
        return string;
    }

    public long getRescanPeriodMillis() {
        return this.j.getLongProperty(l[5], 4523L);
    }

    public boolean isHotSwapEnabled() {
        return this.j.getBooleanProperty(l[9], true);
    }

    public boolean isSupportedLibrary(@NotNull String string) {
        boolean bl2;
        block8: {
            block7: {
                try {
                    if (string == null) {
                        CustomAssertionModulesConfig.a(1);
                    }
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw CustomAssertionModulesConfig.a(illegalArgumentException);
                }
                try {
                    try {
                        if (!string.endsWith(l[12]) && !string.endsWith(l[23])) break block7;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw CustomAssertionModulesConfig.a(illegalArgumentException);
                    }
                    bl2 = true;
                    break block8;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw CustomAssertionModulesConfig.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    public String getExpandedModuleDirPrefix() {
        return l[8];
    }

    public String getExpandedModuleDirId() {
        return l[26];
    }

    public String getLibPrefix() {
        return l[17];
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[27];
                var3_1 = 0;
                var2_2 = "B323\u001e-#J8\n.\u0010\u00060d<5$\t_p+.\u0003\u0016.Bp>f/!4\n\u0006,S} .\u0015C\u0002i22\u000f\u0012\u000f.\u0007-'3\u0006\u000e'S84a@F1\u0000})'GF1\tx5a\n\u00161S}(.\u0013C B}(4\u000b\u000f\u0006D2('\u000e\u0004\u0006\u001b4((\u0013]\u001fD(55\b\u000elF.5$\u0015\u0017+H35o\u0015\u00061D<(o\n\n.K45\u0016D(55\b\u000elF.5$\u0015\u0017+H35o\u0001\n.B\u0019D(55\b\u000elF.5$\u0015\u0017+H35o\n\f&R1#2\t_p+.\u0003\u0016.Bp\u001fD(55\b\u000elF.5$\u0015\u0017+H35o\u0015\u00061D<(o\u0002\r#E1#)\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u000e-C(*$\u0014DbI22a\u0014\u0013'D4 (\u0002\u0007\u001eD(55\b\u000elF.5$\u0015\u0017+H35o\u0014\u0000#Is\"(\u0014\u0002 K8\u0004\t7'3\u0016D(55\b\u000elF.5$\u0015\u0017+H35o\u0013\u0006/W\u0004\t7'3<D2+n\u000bT6B>.n\u0014\u00060Q84n\u0017\f.N>?n\n\f&R1#n$\u00161S2+\u0000\u0014\u0010'U)/.\t.-C(*$\u0014 -I;/&6D2+o\u000bT6B>.o\u0014\u00060Q84o\u000f\f6T*'1I\u0014+Is1.\u0015\b#U23/\u0003M!R.2.\nM1R; (\u001f\u0004K4$n&\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u0005+K8aa\t\f6\u0007.6$\u0004\n$N8\"6D2+o\u000bT6B>.o\u0014\u00060Q84o\u000f\f6T*'1I\u0014+Is1.\u0015\b#U23/\u0003M!R.2.\nM1R; (\u001f\u000fD(55\b\u000e#T.#3\u0013\n-I\u0004K4$n&\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u0017'J-aa\t\f6\u0007.6$\u0004\n$N8\"\u0004\t'/1\u0004\t'/1";
                var4_3 = "B323\u001e-#J8\n.\u0010\u00060d<5$\t_p+.\u0003\u0016.Bp>f/!4\n\u0006,S} .\u0015C\u0002i22\u000f\u0012\u000f.\u0007-'3\u0006\u000e'S84a@F1\u0000})'GF1\tx5a\n\u00161S}(.\u0013C B}(4\u000b\u000f\u0006D2('\u000e\u0004\u0006\u001b4((\u0013]\u001fD(55\b\u000elF.5$\u0015\u0017+H35o\u0015\u00061D<(o\n\n.K45\u0016D(55\b\u000elF.5$\u0015\u0017+H35o\u0001\n.B\u0019D(55\b\u000elF.5$\u0015\u0017+H35o\n\f&R1#2\t_p+.\u0003\u0016.Bp\u001fD(55\b\u000elF.5$\u0015\u0017+H35o\u0015\u00061D<(o\u0002\r#E1#)\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u000e-C(*$\u0014DbI22a\u0014\u0013'D4 (\u0002\u0007\u001eD(55\b\u000elF.5$\u0015\u0017+H35o\u0014\u0000#Is\"(\u0014\u0002 K8\u0004\t7'3\u0016D(55\b\u000elF.5$\u0015\u0017+H35o\u0013\u0006/W\u0004\t7'3<D2+n\u000bT6B>.n\u0014\u00060Q84n\u0017\f.N>?n\n\f&R1#n$\u00161S2+\u0000\u0014\u0010'U)/.\t.-C(*$\u0014 -I;/&6D2+o\u000bT6B>.o\u0014\u00060Q84o\u000f\f6T*'1I\u0014+Is1.\u0015\b#U23/\u0003M!R.2.\nM1R; (\u001f\u0004K4$n&\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u0005+K8aa\t\f6\u0007.6$\u0004\n$N8\"6D2+o\u000bT6B>.o\u0014\u00060Q84o\u000f\f6T*'1I\u0014+Is1.\u0015\b#U23/\u0003M!R.2.\nM1R; (\u001f\u000fD(55\b\u000e#T.#3\u0013\n-I\u0004K4$n&\u0000>32\u0013\f/\t<52\u0002\u00116N2(2I\u0017'J-aa\t\f6\u0007.6$\u0004\n$N8\"\u0004\t'/1\u0004\t'/1".length();
                var1_4 = 18;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 115;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = CustomAssertionModulesConfig.a(v0, CustomAssertionModulesConfig.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u0013sHiJNp\bt~xvW}\baie\u000f\u0019uhhUS~\ts~nNWp\u0014";
                    var4_3 = "\u0013sHiJNp\bt~xvW}\baie\u000f\u0019uhhUS~\ts~nNWp\u0014".length();
                    var1_4 = 18;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 46;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = CustomAssertionModulesConfig.a(v0, CustomAssertionModulesConfig.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        CustomAssertionModulesConfig.l = var5;
        CustomAssertionModulesConfig.PARAM_CUSTOM_ASSERTIONS_HOTSWAP_WIN_WORKAROUND_SUFFIX = CustomAssertionModulesConfig.l[19];
        CustomAssertionModulesConfig.f = CustomAssertionModulesConfig.l[21];
        CustomAssertionModulesConfig.b = CustomAssertionModulesConfig.l[12];
        CustomAssertionModulesConfig.c = CustomAssertionModulesConfig.l[1];
        CustomAssertionModulesConfig.d = CustomAssertionModulesConfig.l[20];
        CustomAssertionModulesConfig.e = CustomAssertionModulesConfig.l[24];
        CustomAssertionModulesConfig.a = Logger.getLogger(CustomAssertionModulesConfig.class.getName());
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 2[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x31);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 84;
                    case 1 -> 46;
                    case 2 -> 53;
                    case 3 -> 50;
                    case 4 -> 20;
                    case 5 -> 16;
                    default -> 49;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

