/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.util.TextUtils
 */
package com.l7tech.server.event.admin;

import com.l7tech.server.event.admin.AdminEvent;
import com.l7tech.util.TextUtils;
import java.text.MessageFormat;
import java.util.logging.Level;

public class AdministrativePasswordsResetEvent
extends AdminEvent {
    private static final String RESET_MESSAGE;
    static final long serialVersionUID = -8654915082069088101L;
    private static final String[] a;

    public AdministrativePasswordsResetEvent(Object object, String string) {
        super(object, AdministrativePasswordsResetEvent.formatMessage(string), Level.WARNING);
    }

    private static String formatMessage(String string) {
        String[] stringArray = a;
        int n2 = 255 - stringArray[0].length();
        return MessageFormat.format(stringArray[1], TextUtils.truncateStringAtEnd((String)string, (int)n2));
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "\u001a(:9b@&8*!4n\u00133.&<3q\u0005g)4-('\u0010&/4?5u\u0004g.\";?s@.2g3jz/\u001a(:9b@&8*!4n\u00133.&<3q\u0005g)4-('\u0010&/4?5u\u0004g.\";?s@.2g3jz";
        int n3 = "\u001a(:9b@&8*!4n\u00133.&<3q\u0005g)4-('\u0010&/4?5u\u0004g.\";?s@.2g3jz/\u001a(:9b@&8*!4n\u00133.&<3q\u0005g)4-('\u0010&/4?5u\u0004g.\";?s@.2g3jz".length();
        int n4 = 47;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = AdministrativePasswordsResetEvent.a(59, AdministrativePasswordsResetEvent.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                a = stringArray;
                RESET_MESSAGE = a[1];
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x7C);
        }
        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 -> 103;
                    case 1 -> 124;
                    case 2 -> 115;
                    case 3 -> 97;
                    case 4 -> 60;
                    case 5 -> 91;
                    default -> 124;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

