package com.l7tech.server.cluster;

import com.l7tech.common.io.failover.FailoverStrategy;
import com.l7tech.common.io.failover.FailoverStrategyFactory;
import com.l7tech.gateway.common.InvalidLicenseException;
import com.l7tech.gateway.common.LicenseException;
import com.l7tech.gateway.common.AsyncAdminMethods.JobId;
import com.l7tech.gateway.common.admin.LicenseRuntimeException;
import com.l7tech.gateway.common.cluster.ClusterNodeInfo;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.gateway.common.cluster.ClusterPropertyDescriptor;
import com.l7tech.gateway.common.cluster.ClusterStatusAdmin;
import com.l7tech.gateway.common.cluster.ServiceUsage;
import com.l7tech.gateway.common.cluster.ClusterStatusAdmin.ModuleNotFoundException;
import com.l7tech.gateway.common.cluster.ClusterStatusAdmin.NoSuchCapabilityException;
import com.l7tech.gateway.common.cluster.ClusterStatusAdmin.NoSuchPropertyException;
import com.l7tech.gateway.common.licensing.CompositeLicense;
import com.l7tech.gateway.common.licensing.FeatureLicense;
import com.l7tech.gateway.common.licensing.LicenseDocument;
import com.l7tech.gateway.common.module.AssertionModuleInfo;
import com.l7tech.gateway.common.module.CustomAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ModularAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ModuleState;
import com.l7tech.gateway.common.module.ServerModuleConfig;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.module.ServerModuleFilePayload;
import com.l7tech.gateway.common.module.ServerModuleFilePayloadFactory;
import com.l7tech.gateway.common.module.ServerModuleFileStateDifferentiator;
import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.gateway.common.security.rbac.PermissionDeniedException;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsHelper;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsManager;
import com.l7tech.gateway.common.security.signer.SignerUtils.SignedZip;
import com.l7tech.gateway.common.service.MetricsSummaryBin;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.policy.AssertionRegistry;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.ExtensionInterfaceBinding;
import com.l7tech.security.prov.luna.LunaConstants.Config;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.admin.AsyncAdminMethodsImpl;
import com.l7tech.server.admin.ExtensionInterfaceManager;
import com.l7tech.server.event.AdminInfo;
import com.l7tech.server.event.EntityChangeSet;
import com.l7tech.server.event.admin.Deleted;
import com.l7tech.server.event.admin.PersistenceEvent;
import com.l7tech.server.event.admin.Updated;
import com.l7tech.server.licensing.UpdatableCompositeLicenseManager;
import com.l7tech.server.module.ServerModuleFileManager;
import com.l7tech.server.policy.ServerAssertionRegistry;
import com.l7tech.server.policy.module.CustomAssertionModulesConfig;
import com.l7tech.server.policy.module.ModularAssertionModule;
import com.l7tech.server.policy.module.ModularAssertionModulesConfig;
import com.l7tech.server.security.keystore.luna.GatewayLunaPinFinder;
import com.l7tech.server.security.keystore.luna.LunaProber;
import com.l7tech.server.security.rbac.RbacServices;
import com.l7tech.server.service.ServiceMetricsManager;
import com.l7tech.server.service.ServiceMetricsServices;
import com.l7tech.server.util.JaasUtils;
import com.l7tech.util.ArrayUtils;
import com.l7tech.util.CollectionUpdate;
import com.l7tech.util.CollectionUpdateProducer;
import com.l7tech.util.DateTimeConfigUtils;
import com.l7tech.util.Either;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.GoidUpgradeMapper;
import com.l7tech.util.Option;
import com.l7tech.util.Pair;
import com.l7tech.util.TimeUnit;
import com.l7tech.util.ValidationUtils.Validator;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Serializable;
import java.security.KeyStoreException;
import java.security.SignatureException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import java.util.Timer;
import java.util.concurrent.FutureTask;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public class ClusterStatusAdminImp extends AsyncAdminMethodsImpl implements ClusterStatusAdmin, ApplicationContextAware {
   private final CollectionUpdateProducer<ServerModuleFile, FindException> e = new a(this, 300000L, 100, new ServerModuleFileStateDifferentiator());
   private CollectionUpdateProducer<ClusterNodeInfo, FindException> f = new b(this, 300000L, 100, null);
   private ApplicationContext g;
   private final ClusterInfoManager h;
   private final ServiceUsageManager i;
   private final ClusterPropertyManager j;
   private final UpdatableCompositeLicenseManager k;
   private final ServiceMetricsManager l;
   private final ServiceMetricsServices m;
   private final ServerConfig n;
   private final ServerAssertionRegistry o;
   private final RbacServices p;
   private final ExtensionInterfaceManager q;
   private final DateTimeConfigUtils r;
   private final Timer s;
   private ServerModuleFileManager t;
   private TrustedSignerCertsManager u;
   private final Logger v;
   private static final String[] w;

   public ClusterStatusAdminImp(
      ClusterInfoManager var1,
      ServiceUsageManager var2,
      ClusterPropertyManager var3,
      UpdatableCompositeLicenseManager var4,
      ServiceMetricsManager var5,
      ServiceMetricsServices var6,
      ServerConfig var7,
      AssertionRegistry var8,
      RbacServices var9,
      ExtensionInterfaceManager var10,
      DateTimeConfigUtils var11
   ) {
      String[] var12 = w;
      this.s = new Timer(var12[46], false);
      this.v = Logger.getLogger(this.getClass().getName());
      this.h = var1;
      this.i = var2;
      this.j = var3;
      this.m = var6;
      this.k = var4;
      this.l = var5;
      this.n = var7;
      this.o = (ServerAssertionRegistry)var8;
      this.p = var9;
      this.q = var10;
      this.r = var11;
      if (var1 == null) {
         throw new IllegalArgumentException(var12[32]);
      }

      try {
         if (var2 == null) {
            throw new IllegalArgumentException(w[49]);
         }
      } catch (IllegalArgumentException var15) {
         throw a(var15);
      }

      try {
         if (var3 == null) {
            throw new IllegalArgumentException(w[20]);
         }
      } catch (IllegalArgumentException var17) {
         throw a(var17);
      }

      try {
         if (var4 == null) {
            throw new IllegalArgumentException(w[37]);
         }
      } catch (IllegalArgumentException var14) {
         throw a(var14);
      }

      try {
         if (var5 == null) {
            throw new IllegalArgumentException(w[12]);
         }
      } catch (IllegalArgumentException var16) {
         throw a(var16);
      }

      try {
         if (var7 == null) {
            throw new IllegalArgumentException(w[45]);
         }
      } catch (IllegalArgumentException var13) {
         throw a(var13);
      }
   }

   private void b() {
      try {
         this.k.requireFeature(w[35]);
      } catch (LicenseException var2) {
         throw new LicenseRuntimeException(var2);
      }
   }

   public boolean isCluster() {
      try {
         try {
            if (this.getClusterStatus().length > 1) {
               return true;
            }
         } catch (FindException var2) {
            throw a(var2);
         }

         return false;
      } catch (FindException var3) {
         return false;
      }
   }

   public ClusterNodeInfo[] getClusterStatus() throws FindException {
      Collection var1 = this.h.retrieveClusterStatus();
      Object[] var2 = var1.toArray();
      ClusterNodeInfo[] var3 = new ClusterNodeInfo[var1.size()];
      int var4 = 0;

      try {
         while (var4 < var2.length) {
            var3[var4] = (ClusterNodeInfo)var2[var4];
            var4++;
         }

         return var3;
      } catch (FindException var5) {
         throw a(var5);
      }
   }

   public CollectionUpdate<ClusterNodeInfo> getClusterNodesUpdate(int var1) throws FindException {
      return this.f.createUpdate(var1);
   }

   public ServiceUsage[] getServiceUsage() throws FindException {
      Collection var1 = this.i.getAll();
      Object[] var2 = var1.toArray();
      ServiceUsage[] var3 = new ServiceUsage[var1.size()];
      int var4 = 0;

      try {
         while (var4 < var2.length) {
            var3[var4] = (ServiceUsage)var2[var4];
            var4++;
         }

         return var3;
      } catch (FindException var5) {
         throw a(var5);
      }
   }

   public void changeNodeName(String var1, String var2) throws UpdateException {
      String var3 = this.h.renameNode(var1, var2);
      EntityChangeSet var4 = new EntityChangeSet(new String[]{w[55]}, new Object[]{var3}, new Object[]{var2});
      this.a(new Updated(this.a(var1, var2), var4));
   }

   public void removeStaleNode(String var1) throws DeleteException {
      this.v.info(w[21] + var1);
      String var2 = this.h.deleteNode(var1);
      this.i.clear(var1);
      this.a(new Deleted(this.a(var1, var2)));
   }

   public Date getCurrentClusterSystemTime() {
      return Calendar.getInstance().getTime();
   }

   public String getCurrentClusterTimeZone() {
      return TimeZone.getDefault().getID();
   }

   public String getSelfNodeName() {
      return this.h.getSelfNodeInf().getName();
   }

   public ClusterNodeInfo getSelfNode() {
      return this.h.getSelfNodeInf();
   }

   public Collection<ClusterProperty> getAllProperties() throws FindException {
      return this.j.findAll();
   }

   public Map<String, String[]> getKnownProperties() {
      Map var1 = this.n.getClusterPropertyNames();
      Map var2 = this.n.getClusterPropertyDefaults();
      LinkedHashMap var3 = new LinkedHashMap();

      for (String var5 : var1.keySet()) {
         var3.put(var5, new String[]{(String)var1.get(var5), (String)var2.get(var5)});
      }

      return Collections.unmodifiableMap(var3);
   }

   public Set<String> getRegisteredPropertyNames() {
      return this.n.getClusterPropertyNames().keySet();
   }

   public Collection<ClusterPropertyDescriptor> getAllPropertyDescriptors() {
      Map var1 = this.n.getClusterPropertyNames();
      Map var2 = this.n.getClusterPropertyDefaults();
      Map var3 = this.n.getClusterPropertyVisibilities();
      Map var4 = this.n.getClusterPropertyValidators();
      ArrayList var5 = new ArrayList();

      for (String var7 : var1.keySet()) {
         String var8 = (String)var3.get(var7);

         ArrayList var10000;
         ClusterPropertyDescriptor var10001;
         ClusterPropertyDescriptor var10002;
         String var10003;
         String var10004;
         String var10005;
         String var10006;
         label23: {
            try {
               var10000 = var5;
               var10001 = new ClusterPropertyDescriptor;
               var10002 = var10001;
               var10003 = var7;
               var10004 = (String)var1.get(var7);
               var10005 = (String)var2.get(var7);
               if (var8 == null) {
                  var10006 = w[13];
                  break label23;
               }
            } catch (IllegalArgumentException var9) {
               throw a(var9);
            }

            var10006 = var8;
         }

         var10002./* $VF: Unable to resugar constructor */<init>(
            var10003, var10004, var10005, Boolean.parseBoolean(var10006), Option.optional((Validator)var4.get(var7))
         );
         var10000.add(var10001);
      }

      return Collections.unmodifiableCollection(var5);
   }

   public ClusterPropertyDescriptor getPropertyDescriptorByName(String var1) {
      return this.n.getClusterPropertyDescriptor(var1);
   }

   public ClusterProperty findPropertyByName(String var1) throws FindException {
      return (ClusterProperty)this.j.findByUniqueName(var1);
   }

   public Goid saveProperty(ClusterProperty var1) throws SaveException, UpdateException, DeleteException {
      try {
         if (!w[4].equals(var1.getName())) {
            this.b();
         }
      } catch (SaveException var4) {
         throw a(var4);
      }

      Goid var2 = var1.getGoid();

      try {
         if (ClusterProperty.DEFAULT_GOID.equals(var2)) {
            return this.j.save(var1);
         }
      } catch (SaveException var3) {
         throw a(var3);
      }

      this.j.update(var1);
      return var2;
   }

   public void deleteProperty(ClusterProperty var1) throws DeleteException {
      this.j.delete(var1);
   }

   public void deleteBulkProperties(Collection<ClusterProperty> var1) throws DeleteException {
      for (ClusterProperty var3 : var1) {
         this.j.delete(var3);
      }
   }

   public CompositeLicense getCompositeLicense() {
      return this.k.getCurrentCompositeLicense();
   }

   public long getLicenseExpiryWarningPeriod() {
      long var1 = 0L;
      String[] var6 = w;
      String var3 = var6[2];
      String var4 = this.n.getProperty(var3);
      if (var4 != null) {
         try {
            var1 = TimeUnit.parse(var4, TimeUnit.DAYS);
         } catch (NumberFormatException var7) {
            var6 = w;
            this.v.warning(var6[16] + var3 + var6[43] + var4 + var6[9]);
         }
      }

      return var1;
   }

   public FeatureLicense createLicense(LicenseDocument var1) throws InvalidLicenseException {
      return this.k.createFeatureLicense(var1);
   }

   public void validateLicense(FeatureLicense var1) throws InvalidLicenseException {
      this.k.validateLicense(var1);
   }

   public JobId<Boolean> installLicense(FeatureLicense var1) {
      FutureTask var2 = new FutureTask<>(AdminInfo.find(false).wrapCallable(new k(this, var1)));
      this.s.schedule(new x(this, var2), 0L);
      return this.registerJob(var2, Boolean.class);
   }

   public JobId<Boolean> uninstallLicense(LicenseDocument var1) {
      FutureTask var2 = new FutureTask<>(AdminInfo.find(false).wrapCallable(new l(this, var1)));
      this.s.schedule(new y(this, var2), 0L);
      return this.registerJob(var2, Boolean.class);
   }

   public Map<String, Long> getGoidUpgradeMap() {
      return GoidUpgradeMapper.getTableNamePrefixMap();
   }

   public boolean isMetricsEnabled() {
      return this.m.isEnabled();
   }

   public boolean isServiceUsageEnabled() {
      return this.i.isEnabled();
   }

   public int getMetricsFineInterval() {
      return this.m.getFineInterval();
   }

   public Collection<MetricsSummaryBin> summarizeByPeriod(String var1, Goid[] var2, Integer var3, Long var4, Long var5, boolean var6) throws FindException {
      return this.l.summarizeByPeriod(var1, var2, var3, var4, var5, var6);
   }

   public Collection<MetricsSummaryBin> summarizeLatestByPeriod(String var1, Goid[] var2, Integer var3, long var4, boolean var6) throws FindException {
      long var7 = System.currentTimeMillis() - var4;
      return this.l.summarizeByPeriod(var1, var2, var3, var7, null, var6);
   }

   public MetricsSummaryBin summarizeLatest(String var1, Goid[] var2, int var3, int var4, boolean var5) throws FindException {
      return this.l.summarizeLatest(var1, var2, var3, var4, var5);
   }

   @NotNull
   public List<String> getConfiguredDateFormats() {
      try {
         List var10000 = this.r.getConfiguredDateFormats();
         if (var10000 == null) {
            a(0);
         }

         return var10000;
      } catch (IllegalArgumentException var1) {
         throw a(var1);
      }
   }

   @NotNull
   public List<Pair<String, Pattern>> getAutoDateFormats() {
      try {
         List var10000 = this.r.getAutoDateFormats();
         if (var10000 == null) {
            a(1);
         }

         return var10000;
      } catch (IllegalArgumentException var1) {
         throw a(var1);
      }
   }

   @Transactional(propagation = Propagation.SUPPORTS)
   public Collection<AssertionModuleInfo> getAssertionModuleInfo() {
      ArrayList var1 = new ArrayList();

      for (ModularAssertionModule var4 : this.o.getLoadedModules()) {
         var1.add(new AssertionModuleInfo(var4.getName(), var4.getEntityName(), var4.getDigest(), this.a(var4)));
      }

      return var1;
   }

   @Transactional(propagation = Propagation.SUPPORTS)
   @Nullable
   public AssertionModuleInfo getModuleInfoForAssertionClass(@NotNull String var1) throws ModuleNotFoundException {
      try {
         if (var1 == null) {
            a(2);
         }
      } catch (ModuleNotFoundException var4) {
         throw a(var4);
      }

      ModularAssertionModule var2 = this.o.getModuleForAssertion(var1);

      try {
         if (var2 != null) {
            return new AssertionModuleInfo(var2.getName(), var2.getEntityName(), var2.getDigest(), this.a(var2));
         }
      } catch (ModuleNotFoundException var3) {
         throw a(var3);
      }

      throw new ModuleNotFoundException();
   }

   private Collection<String> a(@NotNull ModularAssertionModule var1) {
      try {
         if (var1 == null) {
            a(3);
         }
      } catch (IllegalArgumentException var5) {
         throw a(var5);
      }

      ArrayList var2 = new ArrayList();

      for (Assertion var4 : var1.getAssertionPrototypes()) {
         var2.add(var4.getClass().getName());
      }

      return Collections.unmodifiableCollection(var2);
   }

   public Collection<Pair<String, String>> getExtensionInterfaceInstances() {
      Collection var1 = this.q.getRegisteredInterfaces();
      ArrayList var2 = new ArrayList();

      for (ExtensionInterfaceBinding var4 : var1) {
         var2.add(new Pair(var4.getInterfaceClass().getName(), var4.getInstanceIdentifier()));
      }

      return var2;
   }

   public boolean isExtensionInterfaceAvailable(String var1, String var2) {
      return this.q.isInterfaceRegistered(var1, var2);
   }

   public Either<Throwable, Option<Object>> invokeExtensionMethod(String var1, String var2, String var3, Class[] var4, Object[] var5) throws ClassNotFoundException, NoSuchMethodException {
      return this.q.invokeExtensionMethod(var1, var2, var3, var4, var5);
   }

   private static boolean a(String param0) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 03: bipush 54
      // 05: aaload
      // 06: aload 0
      // 07: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 0a: ifne 35
      // 0d: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 10: bipush 26
      // 12: aaload
      // 13: aload 0
      // 14: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 17: ifne 35
      // 1a: goto 21
      // 1d: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 20: athrow
      // 21: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 24: bipush 40
      // 26: aaload
      // 27: aload 0
      // 28: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 2b: ifeq 3d
      // 2e: goto 35
      // 31: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 34: athrow
      // 35: bipush 1
      // 36: goto 3e
      // 39: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 3c: athrow
      // 3d: bipush 0
      // 3e: ireturn
      // try (0 -> 12): 13 java/lang/IllegalArgumentException
      // try (6 -> 21): 22 java/lang/IllegalArgumentException
      // try (15 -> 26): 26 java/lang/IllegalArgumentException
   }

   public String getHardwareCapability(String param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 1
      // 01: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/String;)Z
      // 04: ifne 0d
      // 07: aconst_null
      // 08: areturn
      // 09: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 0c: athrow
      // 0d: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 10: bipush 0
      // 11: aaload
      // 12: aload 1
      // 13: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 16: ifeq 35
      // 19: invokestatic com/l7tech/server/security/keystore/luna/LunaProber.isLunaClientLibraryAvailable ()Z
      // 1c: ifeq 33
      // 1f: goto 26
      // 22: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 25: athrow
      // 26: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 29: bipush 7
      // 2b: aaload
      // 2c: goto 34
      // 2f: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 32: athrow
      // 33: aconst_null
      // 34: areturn
      // 35: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 38: astore 3
      // 39: aload 3
      // 3a: bipush 25
      // 3c: aaload
      // 3d: aload 1
      // 3e: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 41: ifeq 73
      // 44: new java/io/File
      // 47: dup
      // 48: aload 3
      // 49: bipush 47
      // 4b: aaload
      // 4c: invokespecial java/io/File.<init> (Ljava/lang/String;)V
      // 4f: astore 2
      // 50: aload 2
      // 51: invokevirtual java/io/File.exists ()Z
      // 54: ifeq 70
      // 57: aload 2
      // 58: invokevirtual java/io/File.isDirectory ()Z
      // 5b: ifeq 70
      // 5e: goto 65
      // 61: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 64: athrow
      // 65: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 68: bipush 7
      // 6a: aaload
      // 6b: areturn
      // 6c: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 6f: athrow
      // 70: goto 90
      // 73: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 76: astore 3
      // 77: aload 3
      // 78: bipush 33
      // 7a: aaload
      // 7b: aload 1
      // 7c: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 7f: ifeq 90
      // 82: aload 3
      // 83: bipush 38
      // 85: aaload
      // 86: bipush 0
      // 87: invokestatic com/l7tech/util/ConfigFactory.getBooleanProperty (Ljava/lang/String;Z)Z
      // 8a: istore 2
      // 8b: iload 2
      // 8c: invokestatic java/lang/Boolean.toString (Z)Ljava/lang/String;
      // 8f: areturn
      // 90: aconst_null
      // 91: areturn
      // try (0 -> 5): 5 java/lang/IllegalArgumentException
      // try (7 -> 15): 16 java/lang/IllegalArgumentException
      // try (13 -> 22): 22 java/lang/IllegalArgumentException
      // try (41 -> 47): 48 java/lang/IllegalArgumentException
      // try (44 -> 54): 54 java/lang/IllegalArgumentException
   }

   public Serializable getHardwareCapabilityProperty(String var1, String var2) throws NoSuchCapabilityException, NoSuchPropertyException {
      try {
         if (!a(var1)) {
            throw new NoSuchCapabilityException();
         }
      } catch (NoSuchCapabilityException var3) {
         throw a(var3);
      }

      throw new NoSuchPropertyException();
   }

   public void putHardwareCapabilityProperty(String param1, String param2, Serializable param3) throws NoSuchCapabilityException, NoSuchPropertyException, ClassCastException, IllegalArgumentException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 1
      // 01: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/String;)Z
      // 04: ifne 13
      // 07: new com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException
      // 0a: dup
      // 0b: invokespecial com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException.<init> ()V
      // 0e: athrow
      // 0f: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 12: athrow
      // 13: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 16: bipush 54
      // 18: aaload
      // 19: aload 1
      // 1a: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 1d: ifeq 34
      // 20: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 23: bipush 41
      // 25: aaload
      // 26: aload 2
      // 27: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 2a: ifne 40
      // 2d: goto 34
      // 30: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 33: athrow
      // 34: new com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchPropertyException
      // 37: dup
      // 38: invokespecial com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchPropertyException.<init> ()V
      // 3b: athrow
      // 3c: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 3f: athrow
      // 40: aload 3
      // 41: instanceof [C
      // 44: ifeq 6a
      // 47: aload 3
      // 48: checkcast [C
      // 4b: astore 4
      // 4d: aload 0
      // 4e: aload 4
      // 50: invokevirtual com/l7tech/server/cluster/ClusterStatusAdminImp.a ([C)V
      // 53: aload 4
      // 55: invokestatic com/l7tech/util/ArrayUtils.zero ([C)[C
      // 58: pop
      // 59: goto 67
      // 5c: astore 5
      // 5e: aload 4
      // 60: invokestatic com/l7tech/util/ArrayUtils.zero ([C)[C
      // 63: pop
      // 64: aload 5
      // 66: athrow
      // 67: goto 93
      // 6a: aload 3
      // 6b: instanceof java/lang/CharSequence
      // 6e: ifeq 85
      // 71: aload 0
      // 72: aload 3
      // 73: invokeinterface java/io/Serializable.toString ()Ljava/lang/String; 1
      // 78: invokevirtual java/lang/String.toCharArray ()[C
      // 7b: invokevirtual com/l7tech/server/cluster/ClusterStatusAdminImp.a ([C)V
      // 7e: goto 93
      // 81: invokestatic com/l7tech/server/cluster/ClusterStatusAdminImp.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 84: athrow
      // 85: new java/lang/IllegalArgumentException
      // 88: dup
      // 89: getstatic com/l7tech/server/cluster/ClusterStatusAdminImp.w [Ljava/lang/String;
      // 8c: bipush 29
      // 8e: aaload
      // 8f: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 92: athrow
      // 93: return
      // try (15 -> 28): 28 com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException
      // try (9 -> 21): 22 com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException
      // try (0 -> 7): 7 com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException
      // try (36 -> 39): 43 null
      // try (43 -> 44): 43 null
      // try (50 -> 59): 59 com/l7tech/gateway/common/cluster/ClusterStatusAdmin$NoSuchCapabilityException
   }

   public void testHardwareTokenAvailability(String var1, String var2, char[] var3) throws NoSuchCapabilityException, KeyStoreException {
      try {
         try {
            if (!w[54].equals(var1)) {
               throw new NoSuchCapabilityException();
            }
         } catch (NoSuchCapabilityException var7) {
            throw a(var7);
         }

         LunaProber.testHardwareTokenAvailability(var2, var3);
      } finally {
         ArrayUtils.zero(var3);
      }
   }

   private void a(char[] var1) {
      try {
         try {
            if (!this.p.isPermittedForAnyEntityOfType(JaasUtils.getCurrentUser(), OperationType.DELETE, EntityType.SSG_KEY_ENTRY)) {
               throw new PermissionDeniedException(OperationType.DELETE, EntityType.SSG_KEY_ENTRY, w[11]);
            }
         } catch (ObjectModelException var3) {
            throw a(var3);
         }

         this.j.putProperty(Config.ENCRYPTED_PIN, GatewayLunaPinFinder.encryptLunaPin(var1));
      } catch (ObjectModelException var4) {
         throw new RuntimeException(w[30] + ExceptionUtils.getMessage(var4), ExceptionUtils.getDebugException(var4));
      }
   }

   public FailoverStrategy[] getAllFailoverStrategies() {
      return ((FailoverStrategyFactory)this.g.getBean(w[51])).getAllFailoverStrategy();
   }

   @NotNull
   public List<ServerModuleFile> findAllServerModuleFiles() throws FindException {
      ArrayList var1 = new ArrayList();

      for (ServerModuleFile var4 : this.t.findAll()) {
         ServerModuleFile var5 = new ServerModuleFile();
         var5.copyFrom(var4, false, true, true);
         var1.add(var5);
      }

      try {
         if (var1 == null) {
            a(4);
         }

         return var1;
      } catch (FindException var6) {
         throw a(var6);
      }
   }

   public CollectionUpdate<ServerModuleFile> getServerModuleFileUpdate(int var1) throws FindException {
      return this.e.createUpdate(var1);
   }

   @Nullable
   public ServerModuleFile findServerModuleFileById(@NotNull Goid var1, boolean var2) throws FindException {
      try {
         if (var1 == null) {
            a(5);
         }
      } catch (FindException var5) {
         throw a(var5);
      }

      ServerModuleFile var3 = (ServerModuleFile)this.t.findByPrimaryKey(var1);
      if (var3 != null) {
         ServerModuleFile var4 = new ServerModuleFile();
         var4.copyFrom(var3, var2, true, true);
         return var4;
      } else {
         return null;
      }
   }

   @NotNull
   public Goid saveServerModuleFile(@NotNull byte[] var1, @NotNull String var2, @Nullable String var3) throws SaveException {
      try {
         if (var1 == null) {
            a(6);
         }
      } catch (Throwable var11) {
         throw a(var11);
      }

      try {
         if (var2 == null) {
            a(7);
         }
      } catch (Throwable var16) {
         throw a(var16);
      }

      SignedZip var4 = new SignedZip(TrustedSignerCertsHelper.getTrustedCertificates(this.u));

      Goid var7;
      try {
         ServerModuleFilePayload var5 = (ServerModuleFilePayload)var4.load(
            new ByteArrayInputStream(var1),
            new ServerModuleFilePayloadFactory(
               new CustomAssertionsScannerHelper(this.getServerModuleConfig().getCustomAssertionPropertyFileName()),
               new ModularAssertionsScannerHelper(this.getServerModuleConfig().getModularAssertionManifestAssertionListKey()),
               var3
            )
         );

         try {
            ServerModuleFile var6 = var5.create();
            var6.setName(var2);
            var6.setStateForNode(this.h.thisNodeId(), ModuleState.UPLOADED);
            var7 = this.t.save(var6);
         } catch (Throwable var12) {
            if (var5 != null) {
               try {
                  var5.close();
               } catch (Throwable var9) {
                  var12.addSuppressed(var9);
               }
            }

            throw var12;
         }

         try {
            if (var5 != null) {
               var5.close();
            }
         } catch (Throwable var13) {
            throw a(var13);
         }
      } catch (SignatureException var14) {
         String[] var8 = w;
         throw new SaveException(var8[34], var14);
      } catch (IOException var15) {
         throw new SaveException(w[1] + ExceptionUtils.getMessage(var15), var15);
      }

      try {
         if (var7 == null) {
            a(8);
         }

         return var7;
      } catch (Throwable var10) {
         throw a(var10);
      }
   }

   public void updateServerModuleFileName(@NotNull Goid var1, @NotNull String var2) throws FindException, UpdateException {
      try {
         if (var1 == null) {
            a(9);
         }
      } catch (FindException var4) {
         throw a(var4);
      }

      try {
         if (var2 == null) {
            a(10);
         }
      } catch (FindException var6) {
         throw a(var6);
      }

      ServerModuleFile var3 = (ServerModuleFile)this.t.findByPrimaryKey(var1);

      try {
         if (var3 == null) {
            throw new UpdateException(w[15] + var1 + w[36]);
         }
      } catch (FindException var5) {
         throw a(var5);
      }

      var3.setName(var2);
      this.t.update(var3);
   }

   public void deleteServerModuleFile(@NotNull Goid var1) throws DeleteException {
      try {
         if (var1 == null) {
            a(11);
         }
      } catch (FindException var4) {
         throw a(var4);
      }

      try {
         this.t.delete(var1);
      } catch (FindException var3) {
         throw new DeleteException(var3.getMessage(), var3);
      }
   }

   @NotNull
   public ServerModuleConfig getServerModuleConfig() {
      CustomAssertionModulesConfig var1 = new CustomAssertionModulesConfig(this.n);
      ModularAssertionModulesConfig var2 = new ModularAssertionModulesConfig(this.n, this.k);
      ServerModuleConfig var3 = new ServerModuleConfig();

      try {
         var3.setCustomAssertionPropertyFileName(var1.getCustomAssertionPropertyFileName());
         var3.setModularAssertionManifestAssertionListKey(var2.getManifestHdrAssertionList());
         var3.setCustomAssertionModulesExt(var1.getModulesExt());
         var3.setModularAssertionModulesExt(var2.getModulesExt());
         if (var3 == null) {
            a(12);
         }

         return var3;
      } catch (IllegalArgumentException var4) {
         throw a(var4);
      }
   }

   private ClusterNodeInfo a(String var1, String var2) {
      ClusterNodeInfo var3 = new ClusterNodeInfo();
      var3.setNodeIdentifier(var1);
      var3.setName(var2);
      return var3;
   }

   private void a(PersistenceEvent var1) {
      ApplicationContext var2 = this.g;

      try {
         if (var2 != null) {
            var2.publishEvent(var1);
         }
      } catch (IllegalArgumentException var3) {
         throw a(var3);
      }
   }

   public void setApplicationContext(ApplicationContext var1) throws BeansException {
      this.g = var1;
   }

   @Inject
   @Named("serverModuleFileManager")
   final void a(ServerModuleFileManager var1) {
      this.t = var1;
   }

   @Inject
   @Named("trustedSignerCertsManager")
   final void a(TrustedSignerCertsManager var1) {
      this.u = var1;
   }

   private static Throwable a(Throwable var0) {
      return var0;
   }

   static {
      String[] var5 = new String[57];
      int var3 = 0;
      String var2 = "KBl}W\u0003|E\ty{M\r(eUgaQLyHNyk\u0003\u001akRNswJ\u0002i\u0000JzjV\u0000k\u0000T|iM\rzUUp4\u0003\u0015LNvkM\u001fk\u000eBm~J\u001ewwFg`b\u000bk\u0016DBykW\t]EUckQ!aDRyke\u0005bE\u0007LNvkM\u001fk\u0018GBaML\u0002hI@`|F\bJASpHL\u001ecASf\u0007NBb@B\u0001k\u0004TU`k*`izzm\u0019bL\u0007xkW\u0004aD\u00070}\rI}\u0000J`}WL`OS5|F\u0018{RI5`V\u0000b\u0002\u0007\t/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS4uItlO\t.TH5mK\r`GB5zK\t.lR{o\u0003\u000fbIB{z\u0003<Gn\u0007z`\u0003\u0018fIT5mO\u0019}TBg\u001bmBa|J\u000f}\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b\u0004TU`k\u0018FN{jp\t|VBgCL\b{LBSgO\tLYnq\u001cnH5k[\u0005}TN{i\u0003\u0001aDRyk\u0003\u001bgTO5GgL,\u001auItlO\t.TH5~B\u001e}E\u0007e|L\u001ckRSl.\u0004\u0015GBa]F\u001exEUXaG\u0019bEdz`E\u0005i/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS\u0002IC$cK`}W\t|\u0000wgaS\t|T^5cB\u0002oGBg.J\u001f.RBd{J\u001ekD\u0015RBxaU\u0005`G\u0007fzB\u0000k\u0000IzjFV.\nEIagW\u0015@AJp\u001aUWqoW\t]EUckQ!aDRyke\u0005bEitcF\u0018FN{jb\u0000bsBgxF\u001eCOC`bF*gLBf\u0012AWebJ\r`CB;hJ\u001ekWFyb\u0012AWebJ\r`CB;hJ\u001ekWFyb\u000fSNr`F\bJAStLZ\u0018kS\u0004GH|jbvFy{FLhOU5fB\u001ejWFgk\u0003\u000foPFwgO\u0005zY\u0007e|L\u001ckR^5eF\u0015}THgk\r\u0000{NF;mO\u0005kNSEgMLcUTa.A\t.A\u0007vfB\u001e.AUgoZLaR\u0007VfB\u001e]EV`kM\u000fk2uItlO\t.TH5mK\r`GB5BV\u0002o\u0000DygF\u0002z\u0000w\\@\u0003\u0003`\u0000S}gPLmLRfzF\u001e4\u0000\u0013GBaOP\u001fkRS|aM/bATfkP cK`}W\t|\u0000n{hLLcAItiF\u001e.IT5|F\u001d{IUpj\nSNakN\u0005`DBg7MHq{O\t.FNyk\u0003\u0005}\u0000UpdF\u000fzEC5oPL}I@{oW\u0019|E\u0007voM\u0002aT\u0007wk\u0003\u001akRNsgF\b\rSBgxJ\u000fk\u001afqcJ\u0002=\u0002\t5.m\ty\u0000JzjV\u0000k\u0000J`}WL{SB5jF\noUKa.j(.AIq.N\u0019}T\u0007|`@\u0000{DB5jB\u0018oB^akP\u001blNvkM\u001fk\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b$CHx O[zED} P\t|VBg P\u0005zEJ|`G\t|\u000eB{oA\u0000kD\tCKt}P\"oMB\nSNakN\u0005`DBg\u0017KBl}W\u0003|E\ty{M\r CK|kM\u0018^II\u0014SFckp\t|VBgCL\b{LBSgO\t\u000e\u0007\u0007bgW\u0004.VFy{FL)\u001eGBaCL\b{LB\\`E\u0003HOUT}P\t|TNz``\u0000oST!sBgxF\u001e.cH{hJ\u000b.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\u0014lNvkM\u001fk\u0000rejB\u0018kR\u0007AoP\u0007\u0019\u000fHez\f?kCRgkp\u001coN\bT~S\u0000gAIvk\u0012GBaOV\u0018adFake\u0003|MFa}!sBgxJ\u000fk\u0000rfoD\t.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\nMHq{O\tIONq\u0017FF|bL\u001akRta|B\u0018kG^So@\u0018aR^\u0006MHq{O\t\u0014SFckp\t|VBgCL\b{LBSgO\t\rKBl}W\u0003|E\ty{M\r";
      int var4 = "KBl}W\u0003|E\ty{M\r(eUgaQLyHNyk\u0003\u001akRNswJ\u0002i\u0000JzjV\u0000k\u0000T|iM\rzUUp4\u0003\u0015LNvkM\u001fk\u000eBm~J\u001ewwFg`b\u000bk\u0016DBykW\t]EUckQ!aDRyke\u0005bE\u0007LNvkM\u001fk\u0018GBaML\u0002hI@`|F\bJASpHL\u001ecASf\u0007NBb@B\u0001k\u0004TU`k*`izzm\u0019bL\u0007xkW\u0004aD\u00070}\rI}\u0000J`}WL`OS5|F\u0018{RI5`V\u0000b\u0002\u0007\t/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS4uItlO\t.TH5mK\r`GB5zK\t.lR{o\u0003\u000fbIB{z\u0003<Gn\u0007z`\u0003\u0018fIT5mO\u0019}TBg\u001bmBa|J\u000f}\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b\u0004TU`k\u0018FN{jp\t|VBgCL\b{LBSgO\tLYnq\u001cnH5k[\u0005}TN{i\u0003\u0001aDRyk\u0003\u001bgTO5GgL,\u001auItlO\t.TH5~B\u001e}E\u0007e|L\u001ckRSl.\u0004\u0015GBa]F\u001exEUXaG\u0019bEdz`E\u0005i/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS\u0002IC$cK`}W\t|\u0000wgaS\t|T^5cB\u0002oGBg.J\u001f.RBd{J\u001ekD\u0015RBxaU\u0005`G\u0007fzB\u0000k\u0000IzjFV.\nEIagW\u0015@AJp\u001aUWqoW\t]EUckQ!aDRyke\u0005bEitcF\u0018FN{jb\u0000bsBgxF\u001eCOC`bF*gLBf\u0012AWebJ\r`CB;hJ\u001ekWFyb\u0012AWebJ\r`CB;hJ\u001ekWFyb\u000fSNr`F\bJAStLZ\u0018kS\u0004GH|jbvFy{FLhOU5fB\u001ejWFgk\u0003\u000foPFwgO\u0005zY\u0007e|L\u001ckR^5eF\u0015}THgk\r\u0000{NF;mO\u0005kNSEgMLcUTa.A\t.A\u0007vfB\u001e.AUgoZLaR\u0007VfB\u001e]EV`kM\u000fk2uItlO\t.TH5mK\r`GB5BV\u0002o\u0000DygF\u0002z\u0000w\\@\u0003\u0003`\u0000S}gPLmLRfzF\u001e4\u0000\u0013GBaOP\u001fkRS|aM/bATfkP cK`}W\t|\u0000n{hLLcAItiF\u001e.IT5|F\u001d{IUpj\nSNakN\u0005`DBg7MHq{O\t.FNyk\u0003\u0005}\u0000UpdF\u000fzEC5oPL}I@{oW\u0019|E\u0007voM\u0002aT\u0007wk\u0003\u001akRNsgF\b\rSBgxJ\u000fk\u001afqcJ\u0002=\u0002\t5.m\ty\u0000JzjV\u0000k\u0000J`}WL{SB5jF\noUKa.j(.AIq.N\u0019}T\u0007|`@\u0000{DB5jB\u0018oB^akP\u001blNvkM\u001fk\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b$CHx O[zED} P\t|VBg P\u0005zEJ|`G\t|\u000eB{oA\u0000kD\tCKt}P\"oMB\nSNakN\u0005`DBg\u0017KBl}W\u0003|E\ty{M\r CK|kM\u0018^II\u0014SFckp\t|VBgCL\b{LBSgO\t\u000e\u0007\u0007bgW\u0004.VFy{FL)\u001eGBaCL\b{LB\\`E\u0003HOUT}P\t|TNz``\u0000oST!sBgxF\u001e.cH{hJ\u000b.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\u0014lNvkM\u001fk\u0000rejB\u0018kR\u0007AoP\u0007\u0019\u000fHez\f?kCRgkp\u001coN\bT~S\u0000gAIvk\u0012GBaOV\u0018adFake\u0003|MFa}!sBgxJ\u000fk\u0000rfoD\t.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\nMHq{O\tIONq\u0017FF|bL\u001akRta|B\u0018kG^So@\u0018aR^\u0006MHq{O\t\u0014SFckp\t|VBgCL\b{LBSgO\t\rKBl}W\u0003|E\ty{M\r"
         .length();
      char var1 = '\r';
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 66;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = b(var10000, c(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     w = var5;
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "~vH[>QeBK~9Pd7CQa|~^xQpf0R0gDLr1[drW\u001e4yM77JX3yM>2V\u001e~)Md7KQg|\\u7KK\u007f0";
                  var4 = "~vH[>QeBK~9Pd7CQa|~^xQpf0R0gDLr1[drW\u001e4yM77JX3yM>2V\u001e~)Md7KQg|\\u7KK\u007f0".length();
                  var1 = 4;
                  var7 = -1;
            }

            var10000 = 114;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static char[] c(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 76);
      }

      return var10000;
   }

   private static String b(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 98;
            case 1 -> 101;
            case 2 -> 87;
            case 3 -> 76;
            case 4 -> 97;
            case 5 -> 46;
            default -> 76;
         });
      }

      return new String(var10001).intern();
   }
}
