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

import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.message.HttpRequestKnob;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.xmlsec.SecureConversation;
import com.l7tech.security.xml.SecurityTokenResolver;
import com.l7tech.security.xml.processor.SecurityContextFinder;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AbstractServerAssertion;
import com.l7tech.server.policy.assertion.ServerAssertion;
import com.l7tech.server.secureconversation.InboundSecureConversationContextManager;
import com.l7tech.server.secureconversation.SecureConversationSession;
import com.l7tech.util.Config;
import com.l7tech.xml.SoapFaultLevel;
import com.l7tech.xml.soap.SoapFaultUtils;
import com.l7tech.xml.soap.SoapVersion;
import java.io.IOException;
import org.springframework.context.ApplicationContext;

public class ServerSecureConversation extends AbstractServerAssertion<SecureConversation> {
   private final Config d;
   private final SecurityTokenResolver e;
   private final SecurityContextFinder f;
   private final InboundSecureConversationContextManager g;
   private static final String[] h;

   public ServerSecureConversation(SecureConversation var1, ApplicationContext var2) {
      super(var1);
      String[] var3 = h;
      this.d = (Config)var2.getBean(var3[2], Config.class);
      this.e = (SecurityTokenResolver)var2.getBean(var3[5], SecurityTokenResolver.class);
      this.f = (SecurityContextFinder)var2.getBean(var3[0], SecurityContextFinder.class);
      this.g = (InboundSecureConversationContextManager)var2.getBean(var3[1], InboundSecureConversationContextManager.class);
   }

   private String a(PolicyEnforcementContext var1) {
      HttpRequestKnob var2 = (HttpRequestKnob)var1.getRequest().getKnob(HttpRequestKnob.class);
      if (var2 == null) {
         this.logger.warning(h[4]);
         return "";
      } else {
         return var2.getQueryString() == null ? var2.getRequestUrl() : var2.getRequestUrl() + "?" + var2.getQueryString();
      }
   }

   @Override
   public AssertionStatus checkRequest(PolicyEnforcementContext param1) throws IOException, PolicyAssertionException {
      // $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:
      // 000: aload 0
      // 001: getfield com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 004: invokestatic com/l7tech/policy/assertion/xmlsec/SecurityHeaderAddressableSupport.isLocalRecipient (Lcom/l7tech/policy/assertion/Assertion;)Z
      // 007: ifne 019
      // 00a: aload 0
      // 00b: getstatic com/l7tech/gateway/common/audit/AssertionMessages.REQUESTWSS_NOT_FOR_US Lcom/l7tech/gateway/common/audit/Messages$M;
      // 00e: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 011: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 014: areturn
      // 015: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 018: athrow
      // 019: aload 1
      // 01a: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 01f: invokevirtual com/l7tech/message/Message.isSoap ()Z
      // 022: ifne 034
      // 025: aload 0
      // 026: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SC_REQUEST_NOT_SOAP Lcom/l7tech/gateway/common/audit/Messages$M;
      // 029: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 02c: getstatic com/l7tech/policy/assertion/AssertionStatus.NOT_APPLICABLE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 02f: areturn
      // 030: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 033: athrow
      // 034: aload 0
      // 035: getfield com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.d Lcom/l7tech/util/Config;
      // 038: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.h [Ljava/lang/String;
      // 03b: astore 16
      // 03d: aload 16
      // 03f: bipush 8
      // 041: aaload
      // 042: bipush 1
      // 043: invokeinterface com/l7tech/util/Config.getBooleanProperty (Ljava/lang/String;Z)Z 3
      // 048: ifne 05d
      // 04b: aload 1
      // 04c: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 051: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 054: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 059: astore 2
      // 05a: goto 086
      // 05d: aload 1
      // 05e: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 063: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.h [Ljava/lang/String;
      // 066: astore 16
      // 068: aload 16
      // 06a: bipush 6
      // 06c: aaload
      // 06d: aload 0
      // 06e: getfield com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.e Lcom/l7tech/security/xml/SecurityTokenResolver;
      // 071: aload 0
      // 072: getfield com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.f Lcom/l7tech/security/xml/processor/SecurityContextFinder;
      // 075: aload 0
      // 076: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 079: new com/l7tech/server/policy/assertion/xmlsec/v
      // 07c: dup
      // 07d: aload 0
      // 07e: aload 1
      // 07f: invokespecial com/l7tech/server/policy/assertion/xmlsec/v.<init> (Lcom/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation;Lcom/l7tech/server/message/PolicyEnforcementContext;)V
      // 082: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.getWssResults (Lcom/l7tech/message/Message;Ljava/lang/String;Lcom/l7tech/security/xml/SecurityTokenResolver;Lcom/l7tech/security/xml/processor/SecurityContextFinder;Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;)Lcom/l7tech/security/xml/processor/ProcessorResult;
      // 085: astore 2
      // 086: goto 093
      // 089: astore 3
      // 08a: new com/l7tech/util/CausedIOException
      // 08d: dup
      // 08e: aload 3
      // 08f: invokespecial com/l7tech/util/CausedIOException.<init> (Ljava/lang/Throwable;)V
      // 092: athrow
      // 093: aload 2
      // 094: ifnonnull 0b2
      // 097: aload 0
      // 098: getstatic com/l7tech/gateway/common/audit/AssertionMessages.REQUESTWSS_NO_SECURITY Lcom/l7tech/gateway/common/audit/Messages$M;
      // 09b: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 09e: aload 1
      // 09f: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuthenticationMissing ()V 1
      // 0a4: aload 1
      // 0a5: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setRequestPolicyViolated ()V 1
      // 0aa: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0ad: areturn
      // 0ae: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0b1: athrow
      // 0b2: aload 2
      // 0b3: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getXmlSecurityTokens ()[Lcom/l7tech/security/token/XmlSecurityToken; 1
      // 0b8: astore 3
      // 0b9: aload 3
      // 0ba: astore 4
      // 0bc: aload 4
      // 0be: arraylength
      // 0bf: istore 5
      // 0c1: bipush 0
      // 0c2: istore 6
      // 0c4: iload 6
      // 0c6: iload 5
      // 0c8: if_icmpge 208
      // 0cb: aload 4
      // 0cd: iload 6
      // 0cf: aaload
      // 0d0: astore 7
      // 0d2: aload 7
      // 0d4: instanceof com/l7tech/security/token/SecurityContextToken
      // 0d7: ifeq 202
      // 0da: aload 7
      // 0dc: checkcast com/l7tech/security/token/SecurityContextToken
      // 0df: astore 8
      // 0e1: aload 8
      // 0e3: invokeinterface com/l7tech/security/token/SecurityContextToken.isPossessionProved ()Z 1
      // 0e8: ifne 0f9
      // 0eb: aload 0
      // 0ec: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SC_NO_PROOF_OF_POSSESSION Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0ef: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 0f2: goto 202
      // 0f5: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f8: athrow
      // 0f9: aload 8
      // 0fb: invokeinterface com/l7tech/security/token/SecurityContextToken.getContextIdentifier ()Ljava/lang/String; 1
      // 100: astore 9
      // 102: aload 0
      // 103: getfield com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.g Lcom/l7tech/server/secureconversation/InboundSecureConversationContextManager;
      // 106: aload 9
      // 108: invokevirtual com/l7tech/server/secureconversation/InboundSecureConversationContextManager.getSession (Ljava/lang/Object;)Lcom/l7tech/server/secureconversation/SecureConversationSession;
      // 10b: astore 10
      // 10d: aload 10
      // 10f: ifnonnull 126
      // 112: aload 0
      // 113: aload 1
      // 114: aload 8
      // 116: invokeinterface com/l7tech/security/token/SecurityContextToken.getWsscNamespace ()Ljava/lang/String; 1
      // 11b: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Lcom/l7tech/server/message/PolicyEnforcementContext;Ljava/lang/String;)V
      // 11e: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 121: areturn
      // 122: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 125: athrow
      // 126: aload 10
      // 128: invokevirtual com/l7tech/server/secureconversation/SecureConversationSession.getUsedBy ()Lcom/l7tech/identity/User;
      // 12b: astore 11
      // 12d: aload 1
      // 12e: aload 1
      // 12f: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 134: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getAuthenticationContext (Lcom/l7tech/message/Message;)Lcom/l7tech/server/message/AuthenticationContext; 2
      // 139: astore 12
      // 13b: aload 10
      // 13d: invokevirtual com/l7tech/server/secureconversation/SecureConversationSession.getCredentialSecurityToken ()Lcom/l7tech/security/token/SessionSecurityToken;
      // 140: bipush 0
      // 141: ldc com/l7tech/policy/assertion/xmlsec/SecureConversation
      // 143: bipush 1
      // 144: anewarray 75
      // 147: dup
      // 148: bipush 0
      // 149: aload 8
      // 14b: aastore
      // 14c: invokestatic com/l7tech/policy/assertion/credential/LoginCredentials.makeLoginCredentials (Lcom/l7tech/security/token/SecurityToken;ZLjava/lang/Class;[Lcom/l7tech/security/token/SecurityToken;)Lcom/l7tech/policy/assertion/credential/LoginCredentials;
      // 14f: astore 13
      // 151: aload 12
      // 153: aload 13
      // 155: invokevirtual com/l7tech/server/message/AuthenticationContext.addCredentials (Lcom/l7tech/policy/assertion/credential/LoginCredentials;)V
      // 158: aload 1
      // 159: aload 0
      // 15a: aload 0
      // 15b: aload 10
      // 15d: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Lcom/l7tech/server/secureconversation/SecureConversationSession;)Lcom/l7tech/server/policy/assertion/ServerAssertion;
      // 160: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.addDeferredAssertion (Lcom/l7tech/server/policy/assertion/ServerAssertion;Lcom/l7tech/server/policy/assertion/ServerAssertion;)V 3
      // 165: aload 0
      // 166: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SC_SESSION_FOR_USER Lcom/l7tech/gateway/common/audit/Messages$M;
      // 169: bipush 1
      // 16a: anewarray 244
      // 16d: dup
      // 16e: bipush 0
      // 16f: aload 11
      // 171: invokeinterface com/l7tech/identity/User.getLogin ()Ljava/lang/String; 1
      // 176: aastore
      // 177: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 17a: aload 1
      // 17b: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 180: invokevirtual com/l7tech/message/Message.getXmlKnob ()Lcom/l7tech/message/XmlKnob;
      // 183: invokeinterface com/l7tech/message/XmlKnob.getDocumentReadOnly ()Lorg/w3c/dom/Document; 1
      // 188: invokestatic com/l7tech/xml/soap/SoapUtil.getL7aMessageId (Lorg/w3c/dom/Document;)Ljava/lang/String;
      // 18b: astore 14
      // 18d: aload 1
      // 18e: aload 14
      // 190: ifnonnull 19c
      // 193: ldc ""
      // 195: goto 19e
      // 198: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 19b: athrow
      // 19c: aload 14
      // 19e: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setSavedRequestL7aMessageId (Ljava/lang/String;)V 2
      // 1a3: goto 1f3
      // 1a6: astore 15
      // 1a8: aload 0
      // 1a9: getstatic com/l7tech/gateway/common/audit/AssertionMessages.EXCEPTION_INFO_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1ac: bipush 1
      // 1ad: anewarray 244
      // 1b0: dup
      // 1b1: bipush 0
      // 1b2: aload 15
      // 1b4: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 1b7: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.h [Ljava/lang/String;
      // 1ba: astore 16
      // 1bc: aload 16
      // 1be: bipush 7
      // 1c0: aaload
      // 1c1: swap
      // 1c2: invokedynamic makeConcatWithConstants (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" ]
      // 1c7: aastore
      // 1c8: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 1cb: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_REQUEST Lcom/l7tech/policy/assertion/AssertionStatus;
      // 1ce: areturn
      // 1cf: astore 15
      // 1d1: aload 0
      // 1d2: getstatic com/l7tech/gateway/common/audit/AssertionMessages.EXCEPTION_INFO_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1d5: bipush 1
      // 1d6: anewarray 244
      // 1d9: dup
      // 1da: bipush 0
      // 1db: aload 15
      // 1dd: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 1e0: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.h [Ljava/lang/String;
      // 1e3: bipush 3
      // 1e4: aaload
      // 1e5: swap
      // 1e6: invokedynamic makeConcatWithConstants (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" ]
      // 1eb: aastore
      // 1ec: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 1ef: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_REQUEST Lcom/l7tech/policy/assertion/AssertionStatus;
      // 1f2: areturn
      // 1f3: aload 1
      // 1f4: getstatic com/l7tech/policy/assertion/xmlsec/SecureConversation.VARIABLE_INBOUND_SC_SESSION Ljava/lang/String;
      // 1f7: aload 10
      // 1f9: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 1fe: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 201: areturn
      // 202: iinc 6 1
      // 205: goto 0c4
      // 208: aload 0
      // 209: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SC_REQUEST_NOT_REFER_TO_SC_TOKEN Lcom/l7tech/gateway/common/audit/Messages$M;
      // 20c: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerSecureConversation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V
      // 20f: aload 1
      // 210: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuthenticationMissing ()V 1
      // 215: aload 1
      // 216: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setRequestPolicyViolated ()V 1
      // 21b: getstatic com/l7tech/policy/assertion/AssertionStatus.AUTH_REQUIRED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 21e: areturn
      // try (0 -> 9): 9 org/xml/sax/SAXException
      // try (11 -> 19): 59 org/xml/sax/SAXException
      // try (11 -> 20): 20 com/l7tech/util/InvalidDocumentFormatException
      // try (22 -> 58): 59 org/xml/sax/SAXException
      // try (174 -> 179): 179 org/xml/sax/SAXException
      // try (118 -> 127): 127 org/xml/sax/SAXException
      // try (101 -> 108): 108 org/xml/sax/SAXException
      // try (65 -> 76): 76 org/xml/sax/SAXException
      // try (168 -> 183): 184 com/l7tech/util/InvalidDocumentFormatException
      // try (168 -> 183): 204 org/xml/sax/SAXException
   }

   private void a(PolicyEnforcementContext var1, String var2) {
      this.logAndAudit(AssertionMessages.SC_TOKEN_INVALID);
      var1.setRequestPolicyViolated();
      SoapFaultLevel var3 = new SoapFaultLevel();
      var3.setLevel(1);
      var3.setFaultTemplate(SoapFaultUtils.badContextTokenFault(b(var1), var2, this.a(var1)));
      var1.setFaultlevel(var3);
   }

   private static SoapVersion b(PolicyEnforcementContext var0) {
      PublishedService var1 = var0.getService();
      return var1 != null ? var1.getSoapVersion() : SoapVersion.getDefaultSoapVersion();
   }

   private ServerAssertion a(SecureConversationSession var1) {
      return new c(this, this.assertion, var1);
   }

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

   static {
      String[] var5 = new String[9];
      int var3 = 0;
      String var2 = "-\u000evvaGL'(zmgK@*-|mwKJ'7\u0005wlf@\\\r\u000evvaK{1\u0005cfa]Y*\u0002zmPAV*\u000emw^OV?\fpq\f-\u000eguv\\{1\u0005sjt\u0014\u0017\u0005cb\u007fG\\~\u0019prfKK*KMN_\u0014\u001c=\n{m|Z\u00189\u000e{faOL;K|mpAU7\u0005r#F|t\u0015-\u000evvaGL'?zhv@j;\u0018zoeKJ\u0007\f\u000edvv]L";
      int var4 = "-\u000evvaGL'(zmgK@*-|mwKJ'7\u0005wlf@\\\r\u000evvaK{1\u0005cfa]Y*\u0002zmPAV*\u000emw^OV?\fpq\f-\u000eguv\\{1\u0005sjt\u0014\u0017\u0005cb\u007fG\\~\u0019prfKK*KMN_\u0014\u001c=\n{m|Z\u00189\u000e{faOL;K|mpAU7\u0005r#F|t\u0015-\u000evvaGL'?zhv@j;\u0018zoeKJ\u0007\f\u000edvv]L"
         .length();
      char var1 = 21;
      int var7 = -1;

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

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

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

                  var2 = "]O)(5\r\u00164S:8,\u0001\u0001`\u0001\f\u0006\u00184H-cR,g)\u0016\u001dwD,:6\u0016\\qO>+5\u00016qG:;+\u0001\u0016FD.<<\u0017\u0006DS0*<\u0017\u0001}O8";
                  var4 = "]O)(5\r\u00164S:8,\u0001\u0001`\u0001\f\u0006\u00184H-cR,g)\u0016\u001dwD,:6\u0016\\qO>+5\u00016qG:;+\u0001\u0016FD.<<\u0017\u0006DS0*<\u0017\u0001}O8"
                     .length();
                  var1 = 21;
                  var7 = -1;
            }

            var10000 = 98;
            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] ^ 16);
      }

      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 -> 118;
            case 1 -> 67;
            case 2 -> 61;
            case 3 -> 43;
            case 4 -> 59;
            case 5 -> 6;
            default -> 16;
         });
      }

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