package com.l7tech.server.policy.assertion.xmlsec;

import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.identity.User;
import com.l7tech.message.Message;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.credential.LoginCredentials;
import com.l7tech.policy.assertion.xmlsec.CancelSecurityContext;
import com.l7tech.security.token.SecurityContextToken;
import com.l7tech.security.token.SecurityToken;
import com.l7tech.server.identity.AuthenticationResult;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AbstractMessageTargetableServerAssertion;
import com.l7tech.server.policy.assertion.AssertionStatusException;
import com.l7tech.server.secureconversation.InboundSecureConversationContextManager;
import com.l7tech.server.secureconversation.OutboundSecureConversationContextManager;
import java.io.IOException;
import org.springframework.beans.factory.BeanFactory;

public class ServerCancelSecurityContext extends AbstractMessageTargetableServerAssertion<CancelSecurityContext> {
   private final InboundSecureConversationContextManager d;
   private final OutboundSecureConversationContextManager e;
   private final String[] f;
   private static final String[] g;

   public ServerCancelSecurityContext(CancelSecurityContext var1, BeanFactory var2) {
      super(var1);
      String[] var3 = g;
      this.d = (InboundSecureConversationContextManager)var2.getBean(var3[7], InboundSecureConversationContextManager.class);
      this.e = (OutboundSecureConversationContextManager)var2.getBean(var3[8], OutboundSecureConversationContextManager.class);
      this.f = var1.getVariablesUsed();
   }

   @Override
   protected AssertionStatus doCheckRequest(PolicyEnforcementContext var1, Message var2, String var3, AuthenticationContext var4) throws IOException, PolicyAssertionException {
      try {
         if (this.assertion.isCancelInbound()) {
            return this.a(var2, var4);
         }
      } catch (IOException var5) {
         throw a(var5);
      }

      return this.a(var1, var4);
   }

   private AssertionStatus a(Message param1, AuthenticationContext param2) {
      // $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: bipush 0
      // 02: invokestatic com/l7tech/server/util/RstSoapMessageProcessor.getRstParameters (Lcom/l7tech/message/Message;Z)Ljava/util/Map;
      // 05: astore 3
      // 06: aload 3
      // 07: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // 0a: bipush 9
      // 0c: aaload
      // 0d: invokeinterface java/util/Map.containsKey (Ljava/lang/Object;)Z 2
      // 12: ifeq 39
      // 15: aload 0
      // 16: getstatic com/l7tech/gateway/common/audit/AssertionMessages.STS_INVALID_RST_REQUEST Lcom/l7tech/gateway/common/audit/Messages$M;
      // 19: bipush 1
      // 1a: anewarray 202
      // 1d: dup
      // 1e: bipush 0
      // 1f: aload 3
      // 20: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // 23: bipush 3
      // 24: aaload
      // 25: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 2a: checkcast java/lang/String
      // 2d: aastore
      // 2e: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 31: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_REQUEST Lcom/l7tech/policy/assertion/AssertionStatus;
      // 34: areturn
      // 35: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 38: athrow
      // 39: aload 3
      // 3a: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // 3d: astore 6
      // 3f: aload 6
      // 41: bipush 10
      // 43: aaload
      // 44: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 49: checkcast java/lang/String
      // 4c: astore 4
      // 4e: getstatic com/l7tech/server/policy/assertion/xmlsec/s.a [I
      // 51: aload 0
      // 52: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 55: checkcast com/l7tech/policy/assertion/xmlsec/CancelSecurityContext
      // 58: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext.getRequiredAuthorization ()Lcom/l7tech/policy/assertion/xmlsec/CancelSecurityContext$AuthorizationType;
      // 5b: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext$AuthorizationType.ordinal ()I
      // 5e: iaload
      // 5f: lookupswitch 65 2 1 25 2 58
      // 78: aload 0
      // 79: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.d Lcom/l7tech/server/secureconversation/InboundSecureConversationContextManager;
      // 7c: aload 4
      // 7e: invokevirtual com/l7tech/server/secureconversation/InboundSecureConversationContextManager.getSession (Ljava/lang/Object;)Lcom/l7tech/server/secureconversation/SecureConversationSession;
      // 81: astore 5
      // 83: aload 5
      // 85: ifnull a0
      // 88: aload 0
      // 89: aload 2
      // 8a: aload 5
      // 8c: invokevirtual com/l7tech/server/secureconversation/SecureConversationSession.getUsedBy ()Lcom/l7tech/identity/User;
      // 8f: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Lcom/l7tech/server/message/AuthenticationContext;Lcom/l7tech/identity/User;)V
      // 92: goto a0
      // 95: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 98: athrow
      // 99: aload 0
      // 9a: aload 2
      // 9b: aload 4
      // 9d: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Lcom/l7tech/server/message/AuthenticationContext;Ljava/lang/String;)V
      // a0: aload 0
      // a1: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.d Lcom/l7tech/server/secureconversation/InboundSecureConversationContextManager;
      // a4: aload 4
      // a6: invokevirtual com/l7tech/server/secureconversation/InboundSecureConversationContextManager.cancelSession (Ljava/lang/Object;)Z
      // a9: ifne e5
      // ac: aload 0
      // ad: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.assertion Lcom/l7tech/policy/assertion/Assertion;
      // b0: checkcast com/l7tech/policy/assertion/xmlsec/CancelSecurityContext
      // b3: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext.isFailIfNotExist ()Z
      // b6: ifeq e5
      // b9: goto c0
      // bc: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // bf: athrow
      // c0: aload 0
      // c1: getstatic com/l7tech/gateway/common/audit/AssertionMessages.STS_EXPIRED_SC_SESSION Lcom/l7tech/gateway/common/audit/Messages$M;
      // c4: bipush 1
      // c5: anewarray 202
      // c8: dup
      // c9: bipush 0
      // ca: aload 4
      // cc: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // cf: bipush 0
      // d0: aaload
      // d1: swap
      // d2: ldc "'"
      // d4: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001" ]
      // d9: aastore
      // da: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // dd: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_REQUEST Lcom/l7tech/policy/assertion/AssertionStatus;
      // e0: areturn
      // e1: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // e4: athrow
      // e5: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // e8: areturn
      // try (4 -> 26): 26 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (50 -> 58): 58 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (64 -> 74): 75 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (69 -> 94): 94 com/l7tech/server/policy/assertion/AssertionStatusException
   }

   private AssertionStatus a(PolicyEnforcementContext param1, AuthenticationContext param2) {
      // $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: aload 0
      // 02: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.f [Ljava/lang/String;
      // 05: aload 0
      // 06: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 09: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getVariableMap ([Ljava/lang/String;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/util/Map; 3
      // 0e: astore 3
      // 0f: aload 2
      // 10: invokevirtual com/l7tech/server/message/AuthenticationContext.getLastAuthenticatedUser ()Lcom/l7tech/identity/User;
      // 13: astore 4
      // 15: aload 4
      // 17: ifnonnull 36
      // 1a: aload 0
      // 1b: getstatic com/l7tech/gateway/common/audit/AssertionMessages.STS_AUTHENTICATION_FAILURE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1e: bipush 1
      // 1f: anewarray 202
      // 22: dup
      // 23: bipush 0
      // 24: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // 27: bipush 6
      // 29: aaload
      // 2a: aastore
      // 2b: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2e: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 31: areturn
      // 32: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 35: athrow
      // 36: aload 0
      // 37: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 3a: checkcast com/l7tech/policy/assertion/xmlsec/CancelSecurityContext
      // 3d: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext.getOutboundServiceUrl ()Ljava/lang/String;
      // 40: ifnonnull 4c
      // 43: ldc ""
      // 45: goto 56
      // 48: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4b: athrow
      // 4c: aload 0
      // 4d: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 50: checkcast com/l7tech/policy/assertion/xmlsec/CancelSecurityContext
      // 53: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext.getOutboundServiceUrl ()Ljava/lang/String;
      // 56: aload 3
      // 57: aload 0
      // 58: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 5b: invokestatic com/l7tech/server/policy/variable/ExpandVariables.process (Ljava/lang/String;Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 5e: astore 5
      // 60: aload 0
      // 61: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.e Lcom/l7tech/server/secureconversation/OutboundSecureConversationContextManager;
      // 64: aload 4
      // 66: aload 5
      // 68: invokestatic com/l7tech/server/secureconversation/OutboundSecureConversationContextManager.newSessionKey (Lcom/l7tech/identity/User;Ljava/lang/String;)Lcom/l7tech/server/secureconversation/OutboundSecureConversationContextManager$OutboundSessionKey;
      // 6b: invokevirtual com/l7tech/server/secureconversation/OutboundSecureConversationContextManager.cancelSession (Ljava/lang/Object;)Z
      // 6e: ifne b8
      // 71: aload 0
      // 72: getfield com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 75: checkcast com/l7tech/policy/assertion/xmlsec/CancelSecurityContext
      // 78: invokevirtual com/l7tech/policy/assertion/xmlsec/CancelSecurityContext.isFailIfNotExist ()Z
      // 7b: ifeq b8
      // 7e: goto 85
      // 81: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 84: athrow
      // 85: aload 0
      // 86: getstatic com/l7tech/gateway/common/audit/AssertionMessages.STS_EXPIRED_SC_SESSION Lcom/l7tech/gateway/common/audit/Messages$M;
      // 89: bipush 1
      // 8a: anewarray 202
      // 8d: dup
      // 8e: bipush 0
      // 8f: aload 4
      // 91: invokeinterface com/l7tech/identity/User.getLogin ()Ljava/lang/String; 1
      // 96: aload 5
      // 98: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // 9b: bipush 1
      // 9c: aaload
      // 9d: dup_x2
      // 9e: pop
      // 9f: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.g [Ljava/lang/String;
      // a2: bipush 4
      // a3: aaload
      // a4: swap
      // a5: ldc "'"
      // a7: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001\u0001\u0001" ]
      // ac: aastore
      // ad: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // b0: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // b3: areturn
      // b4: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerCancelSecurityContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // b7: athrow
      // b8: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // bb: areturn
      // try (10 -> 25): 25 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (27 -> 34): 34 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (45 -> 57): 58 com/l7tech/server/policy/assertion/AssertionStatusException
      // try (52 -> 84): 84 com/l7tech/server/policy/assertion/AssertionStatusException
   }

   private void a(AuthenticationContext var1, User var2) {
      boolean var3 = false;

      for (AuthenticationResult var5 : var1.getAllAuthenticationResults()) {
         User var6 = var5.getUser();

         try {
            if (!var6.getProviderId().equals(var2.getProviderId()) || !var6.getId().equals(var2.getId())) {
               continue;
            }
         } catch (AssertionStatusException var8) {
            throw a(var8);
         }

         var3 = true;
         break;
      }

      try {
         if (!var3) {
            this.logAndAudit(AssertionMessages.STS_AUTHORIZATION_FAILURE, g[2]);
            throw new AssertionStatusException(AssertionStatus.BAD_REQUEST);
         }
      } catch (AssertionStatusException var7) {
         throw a(var7);
      }
   }

   private void a(AuthenticationContext var1, String var2) {
      boolean var3 = false;
      SecurityContextToken var4 = null;

      label65:
      for (LoginCredentials var6 : var1.getCredentials()) {
         SecurityToken[] var7 = var6.getSecurityTokens();
         int var8 = var7.length;
         int var9 = 0;

         SecurityToken var10;
         while (true) {
            if (var9 >= var8) {
               continue label65;
            }

            var10 = var7[var9];

            try {
               if (var10 instanceof SecurityContextToken && var2.equals(((SecurityContextToken)var10).getContextIdentifier())) {
                  break;
               }
            } catch (AssertionStatusException var13) {
               throw a(var13);
            }

            var9++;
         }

         var4 = (SecurityContextToken)var10;
         break;
      }

      label71: {
         try {
            if (var4 == null || !var4.isPossessionProved()) {
               break label71;
            }
         } catch (AssertionStatusException var12) {
            throw a(var12);
         }

         for (AuthenticationResult var15 : var1.getAllAuthenticationResults()) {
            if (var15.matchesSecurityToken(var4)) {
               var3 = true;
               break;
            }
         }
      }

      try {
         if (!var3) {
            this.logAndAudit(AssertionMessages.STS_AUTHORIZATION_FAILURE, g[5]);
            throw new AssertionStatusException(AssertionStatus.BAD_REQUEST);
         }
      } catch (AssertionStatusException var11) {
         throw a(var11);
      }
   }

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

   static {
      String[] var5 = new String[11];
      int var3 = 0;
      String var2 = "\u0016.z\t1MAe%f\u000exD@0%mZ\u007f\u001c\u0016.z\t1MAe%f\u000exD@0%mZ>M]e>z\u001f*\u0002\b\"\u00108l\bxL@1ky\u001f*OF1?l\u001exV@e(h\u0014;GCe?f\u0011=L\r5*{\t1LH\u001a.{\b7P\u0010bg)\t=PY,(lZ\rpcel\u001a\u0017.x\u000f1PJ!k}\u00153GAe%f\u000exR] 8l\u0014,:\u0011#lZ,C]\".}Z5G\\6*n\u001fxF@ 8)\u00147V\u000f&$g\u000e9KAe*gZ9W[-.g\u000e1AN1.mZ-QJ7e',%k\u0015-LK\u0016.j\u000f*Gl*%\u007f\u001f*QN1\"f\u0014\u001bMA1.q\u000e\u0015CA$,l\b(*>}\u00187WA!\u0018l\u0019-PJ\u0006$g\f=P\\$?`\u00156a@+?l\u0002,oN+*n\u001f*";
      int var4 = "\u0016.z\t1MAe%f\u000exD@0%mZ\u007f\u001c\u0016.z\t1MAe%f\u000exD@0%mZ>M]e>z\u001f*\u0002\b\"\u00108l\bxL@1ky\u001f*OF1?l\u001exV@e(h\u0014;GCe?f\u0011=L\r5*{\t1LH\u001a.{\b7P\u0010bg)\t=PY,(lZ\rpcel\u001a\u0017.x\u000f1PJ!k}\u00153GAe%f\u000exR] 8l\u0014,:\u0011#lZ,C]\".}Z5G\\6*n\u001fxF@ 8)\u00147V\u000f&$g\u000e9KAe*gZ9W[-.g\u000e1AN1.mZ-QJ7e',%k\u0015-LK\u0016.j\u000f*Gl*%\u007f\u001f*QN1\"f\u0014\u001bMA1.q\u000e\u0015CA$,l\b(*>}\u00187WA!\u0018l\u0019-PJ\u0006$g\f=P\\$?`\u00156a@+?l\u0002,oN+*n\u001f*"
         .length();
      char var1 = 19;
      int var7 = -1;

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

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

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

                  var2 = "4+z\b0MI\u001b/z\t6Q\u00176/n\u001e+F@'/W\u001a-W\\-(}\u000f<|[6#";
                  var4 = "4+z\b0MI\u001b/z\t6Q\u00176/n\u001e+F@'/W\u001a-W\\-(}\u000f<|[6#".length();
                  var1 = '\r';
                  var7 = -1;
            }

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

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

      return var10000;
   }

   private static String c(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 -> 51;
            case 1 -> 61;
            case 2 -> 127;
            case 3 -> 12;
            case 4 -> 46;
            case 5 -> 84;
            default -> 89;
         });
      }

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