/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.SingleCertX509KeyManager
 *  com.l7tech.common.protocol.SecureSpanConstants
 *  com.l7tech.common.protocol.SecureSpanConstants$HttpQueryParameters
 *  com.l7tech.gateway.common.admin.UDDIRegistryAdmin$EndpointScheme
 *  com.l7tech.gateway.common.audit.Audit
 *  com.l7tech.gateway.common.audit.LoggingAudit
 *  com.l7tech.gateway.common.security.keystore.SsgKeyEntry
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.gateway.common.transport.SsgConnector$Endpoint
 *  com.l7tech.gateway.common.uddi.UDDIRegistry
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.GoidRange
 *  com.l7tech.uddi.EndpointPair
 *  com.l7tech.uddi.UDDIClient
 *  com.l7tech.uddi.UDDIClientConfig
 *  com.l7tech.uddi.UDDIClientFactory
 *  com.l7tech.uddi.UDDIClientTLSConfig
 *  com.l7tech.uddi.UDDIClientTLSConfig$TLSConfigAdapter
 *  com.l7tech.uddi.UDDIException
 *  com.l7tech.uddi.UDDINamedEntity
 *  com.l7tech.uddi.WsdlPortInfo
 *  com.l7tech.uddi.WsdlPortInfoImpl
 *  com.l7tech.util.InetAddressUtil
 *  org.springframework.context.ApplicationEvent
 */
package com.l7tech.server.uddi;

import com.l7tech.common.io.SingleCertX509KeyManager;
import com.l7tech.common.protocol.SecureSpanConstants;
import com.l7tech.gateway.common.admin.UDDIRegistryAdmin;
import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.LoggingAudit;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.gateway.common.uddi.UDDIRegistry;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.GoidRange;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.policy.variable.ServerVariables;
import com.l7tech.server.security.keystore.SsgKeyStoreManager;
import com.l7tech.server.transport.SsgConnectorActivationEvent;
import com.l7tech.server.transport.SsgConnectorDeactivationEvent;
import com.l7tech.server.uddi.UDDITemplate;
import com.l7tech.server.uddi.UDDITemplateManager;
import com.l7tech.server.uddi.t;
import com.l7tech.server.util.PostStartupApplicationListener;
import com.l7tech.uddi.EndpointPair;
import com.l7tech.uddi.UDDIClient;
import com.l7tech.uddi.UDDIClientConfig;
import com.l7tech.uddi.UDDIClientFactory;
import com.l7tech.uddi.UDDIClientTLSConfig;
import com.l7tech.uddi.UDDIException;
import com.l7tech.uddi.UDDINamedEntity;
import com.l7tech.uddi.WsdlPortInfo;
import com.l7tech.uddi.WsdlPortInfoImpl;
import com.l7tech.util.InetAddressUtil;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.KeyStoreException;
import java.security.UnrecoverableKeyException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.KeyManager;
import javax.net.ssl.TrustManager;
import org.springframework.context.ApplicationEvent;

public class UDDIHelper
implements PostStartupApplicationListener {
    public static final String PROP_INQUIRY_URLS;
    public static final String PROP_RESULT_ROWS_MAX;
    public static final String PROP_RESULT_BATCH_SIZE;
    private static final Logger a;
    private static final String b;
    private static final String c;
    private final ServerConfig d;
    private final SsgKeyStoreManager e;
    private final TrustManager f;
    private final HostnameVerifier g;
    private final UDDITemplateManager h;
    private final int i;
    private final int j;
    private final Map<Goid, String> k = new HashMap<Goid, String>();
    private static final String[] l;

    public UDDIHelper(ServerConfig serverConfig, SsgKeyStoreManager ssgKeyStoreManager, TrustManager trustManager, HostnameVerifier hostnameVerifier, UDDITemplateManager uDDITemplateManager, Properties properties) {
        this.d = serverConfig;
        this.e = ssgKeyStoreManager;
        this.f = trustManager;
        this.g = hostnameVerifier;
        this.h = uDDITemplateManager;
        String[] stringArray = l;
        String string = properties.getProperty(stringArray[25], stringArray[36]);
        int n2 = Integer.parseInt(string);
        String string2 = properties.getProperty(stringArray[16], stringArray[12]);
        int n3 = Integer.parseInt(string2);
        if (n3 > n2) {
            n3 = n2;
        }
        this.j = n3;
        this.i = n2;
    }

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

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public Set<EndpointPair> getAllExternalEndpointAndWsdlUrls(Goid goid) {
        HashMap<Goid, String> hashMap;
        HashSet<EndpointPair> hashSet = new HashSet<EndpointPair>();
        EndpointPair endpointPair = this.k;
        synchronized (endpointPair) {
            hashMap = new HashMap<Goid, String>(this.k);
        }
        endpointPair = new EndpointPair(this.a(goid, false), this.b(goid, false));
        String[] stringArray = l;
        if (hashMap.values().contains(stringArray[3])) {
            hashSet.add(endpointPair);
        }
        if (hashMap.values().contains(l[30])) {
            hashSet.add(new EndpointPair(this.a(goid, true), this.b(goid, false)));
        }
        if (hashSet.isEmpty()) {
            hashSet.add(endpointPair);
        }
        return hashSet;
    }

    public String getExternalWsdlUrlForService(Goid goid) {
        return this.b(goid, false);
    }

    public String getBaseWsdlUrl() {
        return this.a(SecureSpanConstants.WSDL_PROXY_FILE, false);
    }

    public String getQueryWsdlString() {
        return SecureSpanConstants.WSDL_PROXY_FILE + "?" + SecureSpanConstants.HttpQueryParameters.PARAM_SERVICEOID;
    }

    public String getExternalPolicyUrlForService(Goid goid, boolean bl2, boolean bl3) {
        String string;
        String[] stringArray = l;
        String string2 = this.d.getProperty(stringArray[1], stringArray[26]);
        Object[] objectArray = new Object[6];
        objectArray[0] = this.a();
        objectArray[1] = this.d();
        objectArray[2] = this.e();
        objectArray[3] = goid.toHexString();
        if (bl2) {
            v1 = stringArray[21];
        } else {
            stringArray = l;
            v1 = objectArray[4] = stringArray[33];
        }
        if (bl3) {
            stringArray = l;
            string = stringArray[29];
        } else {
            string = l[6];
        }
        objectArray[5] = string;
        return MessageFormat.format(string2, objectArray);
    }

    public String getExternalUrlForService(Goid goid) {
        return this.a(goid, false);
    }

    public boolean isGatewayUrl(String string) {
        boolean bl2;
        block3: {
            bl2 = false;
            try {
                String string2;
                URL uRL = new URL(string);
                if (uRL.getHost() == null || (bl2 = InetAddressUtil.isLocalSystemAddress((String)(string2 = uRL.getHost())))) break block3;
                for (String string3 : this.h()) {
                    if (!string2.equalsIgnoreCase(string3)) continue;
                    bl2 = true;
                    break;
                }
            }
            catch (MalformedURLException malformedURLException) {
                // empty catch block
            }
        }
        return bl2;
    }

    public UDDINamedEntity[] getMatchingBusinesses(UDDIClient uDDIClient, String string, boolean bl2) throws UDDIException {
        int n2;
        int n3;
        int n4;
        ArrayList<UDDINamedEntity> arrayList;
        block18: {
            block17: {
                arrayList = new ArrayList<UDDINamedEntity>();
                n4 = this.b();
                int n5 = this.c();
                n3 = 0;
                while (arrayList.size() < n4) {
                    int n6 = n3 * n5;
                    try {
                        if (n6 > 0) {
                            ++n6;
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    Collection collection = uDDIClient.listBusinessEntities(string, bl2, n6, n5);
                    try {
                        if (collection == null) {
                            return arrayList.toArray(new UDDINamedEntity[arrayList.size()]);
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    try {
                        arrayList.addAll(collection);
                        if (!uDDIClient.listMoreAvailable()) {
                            break;
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    ++n3;
                }
                try {
                    try {
                        if (arrayList.size() < n4 && !uDDIClient.listMoreAvailable()) break block17;
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    n2 = 1;
                    break block18;
                }
                catch (UDDIException uDDIException) {
                    throw UDDIHelper.a((Exception)((Object)uDDIException));
                }
            }
            n2 = 0;
        }
        n3 = n2;
        try {
            if (n3 != 0) {
                arrayList.subList(n4, arrayList.size()).clear();
                arrayList.add(WsdlPortInfoImpl.MAXED_OUT_SEARCH_RESULT_ENTITY);
            }
        }
        catch (UDDIException uDDIException) {
            throw UDDIHelper.a((Exception)((Object)uDDIException));
        }
        return arrayList.toArray(new UDDINamedEntity[arrayList.size()]);
    }

    public WsdlPortInfo[] getWsdlInfoForServiceKey(UDDIClient uDDIClient, String string, boolean bl2) throws UDDIException {
        Collection collection = uDDIClient.listWsdlPortsForService(string, bl2);
        try {
            if (collection == null) {
                return new WsdlPortInfo[0];
            }
        }
        catch (UDDIException uDDIException) {
            throw UDDIHelper.a((Exception)((Object)uDDIException));
        }
        return collection.toArray(new WsdlPortInfo[collection.size()]);
    }

    public WsdlPortInfo[] getWsdlByServiceName(UDDIClient uDDIClient, String string, boolean bl2, boolean bl3) throws UDDIException {
        int n2;
        int n3;
        int n4;
        ArrayList<WsdlPortInfo> arrayList;
        block27: {
            block26: {
                arrayList = new ArrayList<WsdlPortInfo>();
                n4 = this.b();
                int n5 = this.c();
                String string2 = this.getQueryWsdlString();
                n3 = 0;
                while (arrayList.size() < n4) {
                    int n6 = n3 * n5;
                    try {
                        if (n6 > 0) {
                            ++n6;
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    Collection collection = uDDIClient.listServiceWsdls(string, bl2, n6, n5, bl3);
                    try {
                        if (collection == null) {
                            return arrayList.toArray(new WsdlPortInfo[arrayList.size()]);
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    for (WsdlPortInfo wsdlPortInfo : collection) {
                        WsdlPortInfoImpl wsdlPortInfoImpl;
                        String string3;
                        block25: {
                            string3 = wsdlPortInfo.getWsdlUrl();
                            try {
                                if (string3 == null) {
                                    continue;
                                }
                            }
                            catch (UDDIException uDDIException) {
                                throw UDDIHelper.a((Exception)((Object)uDDIException));
                            }
                            try {
                                if (!this.isGatewayUrl(string3)) break block25;
                                if (!(wsdlPortInfo instanceof WsdlPortInfoImpl)) continue;
                            }
                            catch (UDDIException uDDIException) {
                                throw UDDIHelper.a((Exception)((Object)uDDIException));
                            }
                            wsdlPortInfoImpl = (WsdlPortInfoImpl)wsdlPortInfo;
                            wsdlPortInfoImpl.setGatewayWsdl(true);
                            continue;
                        }
                        try {
                            if (string3.indexOf(string2) == -1 || !(wsdlPortInfo instanceof WsdlPortInfoImpl)) continue;
                        }
                        catch (UDDIException uDDIException) {
                            throw UDDIHelper.a((Exception)((Object)uDDIException));
                        }
                        wsdlPortInfoImpl = (WsdlPortInfoImpl)wsdlPortInfo;
                        wsdlPortInfoImpl.setLikelyGatewayWsdl(true);
                    }
                    try {
                        arrayList.addAll(collection);
                        if (!uDDIClient.listMoreAvailable()) {
                            break;
                        }
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    ++n3;
                }
                try {
                    try {
                        if (arrayList.size() < n4 && !uDDIClient.listMoreAvailable()) break block26;
                    }
                    catch (UDDIException uDDIException) {
                        throw UDDIHelper.a((Exception)((Object)uDDIException));
                    }
                    n2 = 1;
                    break block27;
                }
                catch (UDDIException uDDIException) {
                    throw UDDIHelper.a((Exception)((Object)uDDIException));
                }
            }
            n2 = 0;
        }
        n3 = n2;
        try {
            if (n3 != 0) {
                arrayList.subList(n4, arrayList.size()).clear();
                arrayList.add(WsdlPortInfoImpl.MAXED_OUT_SEARCH_RESULT);
            }
        }
        catch (UDDIException uDDIException) {
            throw UDDIHelper.a((Exception)((Object)uDDIException));
        }
        return arrayList.toArray(new WsdlPortInfo[arrayList.size()]);
    }

    public UDDIClientConfig newUDDIClientConfig(UDDIRegistry uDDIRegistry) throws FindException {
        boolean bl2 = true;
        UDDITemplate uDDITemplate = this.h.getUDDITemplate(uDDIRegistry.getUddiRegistryType());
        if (uDDITemplate != null) {
            bl2 = uDDITemplate.isCloseSession();
        }
        return new UDDIClientConfig(uDDIRegistry.getInquiryUrl(), uDDIRegistry.getPublishUrl(), uDDIRegistry.getSubscriptionUrl(), uDDIRegistry.getSecurityUrl(), uDDIRegistry.getRegistryAccountUserName(), ServerVariables.expandSinglePasswordOnlyVariable((Audit)new LoggingAudit(a), uDDIRegistry.getRegistryAccountPassword()), bl2, this.a(uDDIRegistry));
    }

    public UDDIClient newUDDIClient(UDDIRegistry uDDIRegistry) throws FindException {
        UDDIClientFactory uDDIClientFactory = UDDIClientFactory.getInstance();
        return uDDIClientFactory.newUDDIClient(this.newUDDIClientConfig(uDDIRegistry));
    }

    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        if (applicationEvent instanceof SsgConnectorActivationEvent) {
            SsgConnectorActivationEvent ssgConnectorActivationEvent = (SsgConnectorActivationEvent)applicationEvent;
            this.a(ssgConnectorActivationEvent.getConnector());
        } else if (applicationEvent instanceof SsgConnectorDeactivationEvent) {
            SsgConnectorDeactivationEvent ssgConnectorDeactivationEvent = (SsgConnectorDeactivationEvent)applicationEvent;
            this.b(ssgConnectorDeactivationEvent.getConnector());
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void a(SsgConnector ssgConnector) {
        if (ssgConnector.offersEndpoint(SsgConnector.Endpoint.MESSAGE_INPUT)) {
            Map<Goid, String> map = this.k;
            synchronized (map) {
                this.k.put(ssgConnector.getGoid(), ssgConnector.getScheme());
            }
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    private void b(SsgConnector ssgConnector) {
        Map<Goid, String> map = this.k;
        synchronized (map) {
            this.k.remove(ssgConnector.getGoid());
        }
    }

    String a() {
        String string = this.d.getProperty(l[37]);
        String string2 = string == null || string.trim().isEmpty() ? this.d.getHostname() : string;
        return string2;
    }

    private int b() {
        return this.d.getIntProperty(l[19], this.i);
    }

    private int c() {
        return this.d.getIntProperty(l[2], this.j);
    }

    private String a(Goid goid, boolean bl2) {
        return this.a(SecureSpanConstants.SERVICE_FILE, bl2) + goid.toHexString();
    }

    private String b(Goid goid, boolean bl2) {
        String string = SecureSpanConstants.HttpQueryParameters.PARAM_SERVICEOID + "=" + goid.toHexString();
        return this.a(SecureSpanConstants.WSDL_PROXY_FILE, bl2) + "?" + string;
    }

    private String a(String string, boolean bl2) {
        if (bl2) {
            String string2 = string;
            String string3 = this.g();
            String string4 = InetAddressUtil.getHostForUrl((String)this.a());
            String[] stringArray = l;
            return stringArray[4] + string4 + string3 + string2;
        }
        String string5 = string;
        String string6 = this.f();
        String string7 = InetAddressUtil.getHostForUrl((String)this.a());
        return l[32] + string7 + string6 + string5;
    }

    private String d() {
        String[] stringArray = l;
        return this.d.getProperty(stringArray[14], stringArray[35]);
    }

    private String e() {
        String[] stringArray = l;
        return this.d.getProperty(stringArray[10], stringArray[24]);
    }

    private String f() {
        Object object = this.d.getProperty(l[27], "");
        if (((String)object).length() > 0) {
            object = ":" + (String)object;
        }
        return object;
    }

    private String g() {
        Object object = this.d.getProperty(l[20], "");
        if (((String)object).length() > 0) {
            object = ":" + (String)object;
        }
        return object;
    }

    private Collection<String> h() {
        ArrayList<String> arrayList = new ArrayList<String>();
        arrayList.add(this.a());
        arrayList.add(this.d.getHostname());
        return arrayList;
    }

    /*
     * Loose catch block
     */
    private UDDIClientTLSConfig a(UDDIRegistry uDDIRegistry) {
        String[] stringArray;
        SingleCertX509KeyManager singleCertX509KeyManager;
        block14: {
            singleCertX509KeyManager = null;
            if (!uDDIRegistry.isClientAuth()) break block14;
            Goid goid = uDDIRegistry.getKeystoreGoid();
            String string = uDDIRegistry.getKeyAlias();
            if (!GoidRange.ZEROED_PREFIX.isInRange(goid)) break block14;
            try {
                block15: {
                    if (goid.getLow() < -1L) break block14;
                    break block15;
                    catch (FindException findException) {
                        throw UDDIHelper.a((Exception)((Object)findException));
                    }
                }
                if (string == null) break block14;
            }
            catch (FindException findException) {
                throw UDDIHelper.a((Exception)((Object)findException));
            }
            try {
                SsgKeyEntry ssgKeyEntry = this.e.lookupKeyByKeyAlias(string, goid);
                singleCertX509KeyManager = new SingleCertX509KeyManager(ssgKeyEntry.getCertificateChain(), ssgKeyEntry.getPrivateKey());
            }
            catch (FindException findException) {
                stringArray = l;
                a.log(Level.WARNING, stringArray[28], findException);
            }
            catch (KeyStoreException keyStoreException) {
                stringArray = l;
                a.log(Level.WARNING, stringArray[8], keyStoreException);
            }
            catch (UnrecoverableKeyException unrecoverableKeyException) {
                stringArray = l;
                a.log(Level.WARNING, stringArray[8], unrecoverableKeyException);
            }
        }
        int n2 = 30000;
        stringArray = l;
        long l2 = this.d.getLongProperty(stringArray[9], 30000L);
        if (l2 == 0L) {
            l2 = 30000L;
            a.log(Level.WARNING, stringArray[11]);
        } else if (l2 < 0L) {
            l2 = 30000L;
            stringArray = l;
            a.log(Level.WARNING, stringArray[17]);
        }
        int n3 = 60000;
        stringArray = l;
        long l3 = this.d.getLongProperty(stringArray[23], 60000L);
        if (l3 == 0L) {
            l3 = 60000L;
            a.log(Level.WARNING, stringArray[34]);
        } else if (l3 < 0L) {
            l3 = 60000L;
            a.log(Level.WARNING, l[15]);
        }
        return new UDDIClientTLSConfig((KeyManager)singleCertX509KeyManager, this.f, this.g, l2, l3);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[39];
                var3_1 = 0;
                var2_2 = "\u0012ZSvj0|\u000b\u0010^q50g\u0015G\u0016\u0012ZSvj5a\u000bWTf\u00117b3[Zo($z\u0002\u0016\u0012ZSvj7k\u0014K[kj'o\u0013]_@7,t\u0002\u0004/jcO\b\u000fJCo7\u007f!H\u00102P\\q+2`GMTw!(k]\u001e\u0002\tQ\u0005/jcO\u0017)\"LEp6em\bPQv#0|\u000ePP?\u0011\u0001J.\u001eo1qu7GURfd(o\t_Pz6k\u0013\u0012ZSvj&a\tPR|0\u0011g\n[Xj0\u0010\u0004RBl0 |\u000fJCo75a\u0015J_&\u001eA~(0kGQQ?teg\u0014\u001eYp0eo\u000bRXh!!.\u0001QE?'){\u0014JRmd5|\bNRm0<4G\u0019B{ , \u0004QYq!&z3WZz+0z@\u0010\u0017J7,`\u0000\u001eSz\"${\u000bJ\u0017p\"e=W\u000e\u0007/\u0003V\u000e\u0007<$_Yq+1.\u0000[C?!+j\u0017Q^q0eh\bL\u0017W\u0010\u0011^G_D?**./jcOd)g\u0014JRq!7.\u000eM\u0017{!#g\t[S1\u000f\u0004RBl0 |\u000fJCo4*|\u0013\\.R[z#$bGPRx%1g\u0011[\u0017i%){\u0002\u001eDj45b\u000e[S?\"*|G][j71k\u0015\u001eGm+5k\u0015JN%db{\u0003Z^10,c\u0002QBkck.2M^q#ej\u0002XVj(1.\bX\u0017)tu>W\u0016\u0012ZSvj7k\u0014K[kj'o\u0013]_@7,t\u0002c.R[z#$bGPRx%1g\u0011[\u0017i%){\u0002\u001eDj45b\u000e[S?\"*|G][j71k\u0015\u001eGm+5k\u0015JN%db{\u0003Z^1'*`\t[Tk\u0010,c\u0002QBkck.2M^q#ej\u0002XVj(1.\bX\u0017,tu>W\u0013\u0012ZSvj&a\tPR|0\u0011g\n[Xj0\u0014\u0012ZSvj7k\u0014K[kj(o\u001faEp36\u0010\u0004RBl0 |\u000fJCo75a\u0015J\u0003\u001e[D\u0004/jcO\f\u0012ZSvj1g\n[Xj0\u0004_\n\u0003,\u0014\u0012ZSvj7k\u0014K[kj(o\u001faEp36E\u000fJCo~j!\u001c\u000eJ%?tsHMDxk5a\u000bWTfk!g\u0014]X 7 |\u0011WTz+,jZE\u0004bb#{\u000bRSp'xuSC\u0011v*)g\t[\ndq8\u000f\u0004RBl0 |\u000fJCo4*|\u0013)\"LEp6em\bPQv#0|\u000ePP?\u0011\u0001J.\u001eo1qu7GURfd(o\t_Pz6k\u0003\u001e[D\u0005/jcO\u0017>$_Yq+1.\u0000[C?!+j\u0017Q^q0eh\bL\u0017W\u0010\u0011^4\u001eVld+aGvcK\u0014\u0016.\u000bWDk!+k\u0015\u001e^ld!k\u0001WYz k\u0007\u000fJCo~j!\u0002\tQX&\u001eA~(0kGQQ?teg\u0014\u001eYp0eo\u000bRXh!!.\u0001QE?'){\u0014JRmd5|\bNRm0<4G\u0019B{ , \u0013WZz+0z@\u0010\u0017J7,`\u0000\u001eSz\"${\u000bJ\u0017p\"e8W\u000e\u0007/\u0004_\u000e\u000f/\u0003V\u000e\u0007";
                var4_3 = "\u0012ZSvj0|\u000b\u0010^q50g\u0015G\u0016\u0012ZSvj5a\u000bWTf\u00117b3[Zo($z\u0002\u0016\u0012ZSvj7k\u0014K[kj'o\u0013]_@7,t\u0002\u0004/jcO\b\u000fJCo7\u007f!H\u00102P\\q+2`GMTw!(k]\u001e\u0002\tQ\u0005/jcO\u0017)\"LEp6em\bPQv#0|\u000ePP?\u0011\u0001J.\u001eo1qu7GURfd(o\t_Pz6k\u0013\u0012ZSvj&a\tPR|0\u0011g\n[Xj0\u0010\u0004RBl0 |\u000fJCo75a\u0015J_&\u001eA~(0kGQQ?teg\u0014\u001eYp0eo\u000bRXh!!.\u0001QE?'){\u0014JRmd5|\bNRm0<4G\u0019B{ , \u0004QYq!&z3WZz+0z@\u0010\u0017J7,`\u0000\u001eSz\"${\u000bJ\u0017p\"e=W\u000e\u0007/\u0003V\u000e\u0007<$_Yq+1.\u0000[C?!+j\u0017Q^q0eh\bL\u0017W\u0010\u0011^G_D?**./jcOd)g\u0014JRq!7.\u000eM\u0017{!#g\t[S1\u000f\u0004RBl0 |\u000fJCo4*|\u0013\\.R[z#$bGPRx%1g\u0011[\u0017i%){\u0002\u001eDj45b\u000e[S?\"*|G][j71k\u0015\u001eGm+5k\u0015JN%db{\u0003Z^10,c\u0002QBkck.2M^q#ej\u0002XVj(1.\bX\u0017)tu>W\u0016\u0012ZSvj7k\u0014K[kj'o\u0013]_@7,t\u0002c.R[z#$bGPRx%1g\u0011[\u0017i%){\u0002\u001eDj45b\u000e[S?\"*|G][j71k\u0015\u001eGm+5k\u0015JN%db{\u0003Z^1'*`\t[Tk\u0010,c\u0002QBkck.2M^q#ej\u0002XVj(1.\bX\u0017,tu>W\u0013\u0012ZSvj&a\tPR|0\u0011g\n[Xj0\u0014\u0012ZSvj7k\u0014K[kj(o\u001faEp36\u0010\u0004RBl0 |\u000fJCo75a\u0015J\u0003\u001e[D\u0004/jcO\f\u0012ZSvj1g\n[Xj0\u0004_\n\u0003,\u0014\u0012ZSvj7k\u0014K[kj(o\u001faEp36E\u000fJCo~j!\u001c\u000eJ%?tsHMDxk5a\u000bWTfk!g\u0014]X 7 |\u0011WTz+,jZE\u0004bb#{\u000bRSp'xuSC\u0011v*)g\t[\ndq8\u000f\u0004RBl0 |\u000fJCo4*|\u0013)\"LEp6em\bPQv#0|\u000ePP?\u0011\u0001J.\u001eo1qu7GURfd(o\t_Pz6k\u0003\u001e[D\u0005/jcO\u0017>$_Yq+1.\u0000[C?!+j\u0017Q^q0eh\bL\u0017W\u0010\u0011^4\u001eVld+aGvcK\u0014\u0016.\u000bWDk!+k\u0015\u001e^ld!k\u0001WYz k\u0007\u000fJCo~j!\u0002\tQX&\u001eA~(0kGQQ?teg\u0014\u001eYp0eo\u000bRXh!!.\u0001QE?'){\u0014JRmd5|\bNRm0<4G\u0019B{ , \u0013WZz+0z@\u0010\u0017J7,`\u0000\u001eSz\"${\u000bJ\u0017p\"e8W\u000e\u0007/\u0004_\u000e\u000f/\u0003V\u000e\u0007".length();
                var1_4 = 16;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = UDDIHelper.a(v0, UDDIHelper.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "6`p^\u0002\u0012N\u001dcvY\f haDX\u0003U8ijX\u0002";
                    var4_3 = "6`p^\u0002\u0012N\u001dcvY\f haDX\u0003U8ijX\u0002".length();
                    var1_4 = 11;
                    var0_5 = -1;
lbl22:
                    // 2 sources

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

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

                ** continue;
            }
        }
        UDDIHelper.l = var5;
        UDDIHelper.PROP_RESULT_BATCH_SIZE = UDDIHelper.l[2];
        UDDIHelper.PROP_RESULT_ROWS_MAX = UDDIHelper.l[19];
        UDDIHelper.b = UDDIHelper.l[18];
        UDDIHelper.c = UDDIHelper.l[38];
        UDDIHelper.PROP_INQUIRY_URLS = UDDIHelper.l[0];
        UDDIHelper.a = Logger.getLogger(UDDIHelper.class.getName());
        UDDIClientTLSConfig.addDefaultAdapter((UDDIClientTLSConfig.TLSConfigAdapter)new t());
    }

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

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x51);
        }
        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 -> 56;
                    case 1 -> 97;
                    case 2 -> 104;
                    case 3 -> 64;
                    case 4 -> 27;
                    case 5 -> 26;
                    default -> 81;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }

    public static class EndpointNotDefinedException
    extends Exception {
        static final long serialVersionUID = -529717974652330173L;

        public EndpointNotDefinedException(String string) {
            super(string);
        }
    }
}

