/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.ftp.FtpCommand
 *  com.l7tech.common.mime.ContentTypeHeader
 *  com.l7tech.common.mime.NoSuchPartException
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.message.FtpResponseKnob
 *  com.l7tech.message.Message
 *  com.l7tech.message.MimeKnob
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.policy.assertion.AssertionStatus
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.ResourceUtils
 *  org.apache.ftpserver.ftplet.DataConnection
 *  org.apache.ftpserver.ftplet.DefaultFtpReply
 *  org.apache.ftpserver.ftplet.FileSystemView
 *  org.apache.ftpserver.ftplet.FtpException
 *  org.apache.ftpserver.ftplet.FtpRequest
 *  org.apache.ftpserver.impl.FtpIoSession
 *  org.apache.ftpserver.impl.FtpServerContext
 */
package com.l7tech.server.transport.ftp;

import com.l7tech.common.ftp.FtpCommand;
import com.l7tech.common.mime.ContentTypeHeader;
import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.message.FtpResponseKnob;
import com.l7tech.message.Message;
import com.l7tech.message.MimeKnob;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.server.MessageProcessor;
import com.l7tech.server.StashManagerFactory;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.transport.ftp.AbstractFtpRequestProcessor;
import com.l7tech.server.util.EventChannel;
import com.l7tech.server.util.SoapFaultManager;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.ResourceUtils;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.ExecutorService;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.ftpserver.ftplet.DataConnection;
import org.apache.ftpserver.ftplet.DefaultFtpReply;
import org.apache.ftpserver.ftplet.FileSystemView;
import org.apache.ftpserver.ftplet.FtpException;
import org.apache.ftpserver.ftplet.FtpRequest;
import org.apache.ftpserver.impl.FtpIoSession;
import org.apache.ftpserver.impl.FtpServerContext;

public class ExtendedCommandsFtpRequestProcessor
extends AbstractFtpRequestProcessor {
    private static final Logger k;
    private static final String[] m;

    public ExtendedCommandsFtpRequestProcessor(MessageProcessor messageProcessor, SoapFaultManager soapFaultManager, StashManagerFactory stashManagerFactory, EventChannel eventChannel, ExecutorService executorService, ContentTypeHeader contentTypeHeader, Goid goid, SsgConnector ssgConnector, long l2) {
        super(messageProcessor, soapFaultManager, stashManagerFactory, eventChannel, executorService, contentTypeHeader, goid, ssgConnector, l2, k);
    }

    /*
     * Exception decompiling
     */
    @Override
    public void process(FtpIoSession var1_1, FtpServerContext var2_2, FtpRequest var3_3, FtpCommand var4_4) throws FtpException {
        /*
         * 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 [5[TRYBLOCK]], but top level block is 6[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");
    }

    /*
     * Exception decompiling
     */
    private void a(FtpIoSession var1_1, FtpServerContext var2_2, FtpRequest var3_3, FtpCommand var4_4) throws FtpException {
        /*
         * 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 [10[TRYBLOCK]], but top level block is 34[SIMPLE_IF_TAKEN]
         *     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.
     * Loose catch block
     */
    private void b(FtpIoSession ftpIoSession, FtpServerContext ftpServerContext, FtpRequest ftpRequest, FtpCommand ftpCommand) throws FtpException {
        DataConnection dataConnection;
        Message message;
        InputStream inputStream;
        PolicyEnforcementContext policyEnforcementContext;
        block30: {
            FtpResponseKnob ftpResponseKnob;
            block29: {
                block28: {
                    block27: {
                        Message message2;
                        try {
                            if (!this.validateConnectionFactoryState(ftpIoSession)) {
                                this.reply503BadSequence(ftpIoSession);
                                return;
                            }
                        }
                        catch (IOException iOException) {
                            throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                        }
                        try {
                            message2 = this.createRequestMessage(ftpIoSession, ftpRequest, ftpCommand, new ByteArrayInputStream(new byte[0]));
                        }
                        catch (IOException iOException) {
                            this.handleCreateRequestMessageFailure(ftpIoSession, ftpCommand, iOException);
                            return;
                        }
                        policyEnforcementContext = this.createPolicyEnforcementContext(message2);
                        inputStream = null;
                        try {
                            AssertionStatus assertionStatus;
                            block26: {
                                assertionStatus = this.submitRequestMessage(policyEnforcementContext);
                                if (assertionStatus != AssertionStatus.NONE) break block26;
                                try {
                                    block31: {
                                        if (!k.isLoggable(Level.FINE)) break block27;
                                        break block31;
                                        catch (IOException iOException) {
                                            throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                                        }
                                    }
                                    k.log(Level.FINE, m[16] + String.valueOf(ftpCommand) + m[12]);
                                    break block27;
                                }
                                catch (IOException iOException) {
                                    throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                                }
                            }
                            this.handleMessageProcessingFailure(ftpIoSession, ftpCommand, assertionStatus);
                        }
                        catch (Throwable throwable) {
                            this.resetStateAndCloseConnection(ftpIoSession);
                            ResourceUtils.closeQuietly(inputStream);
                            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                            throw throwable;
                        }
                        this.resetStateAndCloseConnection(ftpIoSession);
                        ResourceUtils.closeQuietly(inputStream);
                        ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                        return;
                    }
                    message = policyEnforcementContext.getResponse();
                    try {
                        if (message.getKnob(MimeKnob.class) != null && message.isInitialized()) break block28;
                    }
                    catch (IOException iOException) {
                        throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                    }
                    String[] stringArray = m;
                    k.log(Level.WARNING, stringArray[22]);
                    this.reply550ProcessingError(ftpIoSession, ftpCommand);
                    this.resetStateAndCloseConnection(ftpIoSession);
                    ResourceUtils.closeQuietly(inputStream);
                    ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                    return;
                }
                ftpResponseKnob = (FtpResponseKnob)message.getKnob(FtpResponseKnob.class);
                if (null != ftpResponseKnob) break block29;
                String[] stringArray = m;
                k.log(Level.WARNING, stringArray[3]);
                this.reply550ProcessingError(ftpIoSession, ftpCommand);
                this.resetStateAndCloseConnection(ftpIoSession);
                ResourceUtils.closeQuietly(inputStream);
                ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                return;
            }
            if (150 == ftpResponseKnob.getReplyCode()) break block30;
            String[] stringArray = m;
            k.log(Level.WARNING, stringArray[18] + ftpResponseKnob.getReplyCode());
            ftpIoSession.write((Object)new DefaultFtpReply(ftpResponseKnob.getReplyCode(), ftpResponseKnob.getReplyText()));
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        try {
            String[] stringArray = m;
            k.log(Level.INFO, stringArray[21]);
            inputStream = message.getMimeKnob().getEntireMessageBodyAsInputStream(true);
        }
        catch (NoSuchPartException | IOException throwable) {
            k.log(Level.WARNING, m[5] + ExceptionUtils.getMessage((Throwable)throwable), ExceptionUtils.getDebugException((Throwable)throwable));
            this.reply550ProcessingError(ftpIoSession, ftpCommand);
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        this.reply150FileStatusOk(ftpIoSession, ftpServerContext, ftpRequest);
        try {
            dataConnection = ftpIoSession.getDataConnection().openConnection();
        }
        catch (Exception exception) {
            this.handleOpenConnectionFailure(ftpIoSession, ftpServerContext, ftpRequest, exception);
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        try {
            this.transferDataToClient(ftpIoSession.getFtpletSession(), dataConnection, inputStream);
        }
        catch (Exception exception) {
            this.handleDataTransferFailure(ftpIoSession, ftpServerContext, ftpRequest, exception);
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        this.reply226ClosingConnection(ftpIoSession, ftpServerContext, ftpRequest);
        this.resetStateAndCloseConnection(ftpIoSession);
        ResourceUtils.closeQuietly((Closeable)inputStream);
        ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    private void c(FtpIoSession ftpIoSession, FtpServerContext ftpServerContext, FtpRequest ftpRequest, FtpCommand ftpCommand) throws FtpException {
        Message message;
        InputStream inputStream;
        PolicyEnforcementContext policyEnforcementContext;
        DataConnection dataConnection;
        block29: {
            FtpResponseKnob ftpResponseKnob;
            block28: {
                block27: {
                    block26: {
                        Message message2;
                        try {
                            ftpIoSession.resetState();
                            if (!this.validateConnectionFactoryState(ftpIoSession)) {
                                this.reply503BadSequence(ftpIoSession);
                                return;
                            }
                        }
                        catch (Exception exception) {
                            throw ExtendedCommandsFtpRequestProcessor.b(exception);
                        }
                        this.reply150FileStatusOk(ftpIoSession, ftpServerContext, ftpRequest);
                        try {
                            dataConnection = ftpIoSession.getDataConnection().openConnection();
                        }
                        catch (Exception exception) {
                            this.handleOpenConnectionFailure(ftpIoSession, ftpServerContext, ftpRequest, exception);
                            return;
                        }
                        try {
                            message2 = this.createRequestMessage(ftpIoSession, ftpRequest, ftpCommand, new ByteArrayInputStream(new byte[0]));
                        }
                        catch (IOException iOException) {
                            this.handleCreateRequestMessageFailure(ftpIoSession, ftpCommand, iOException);
                            return;
                        }
                        policyEnforcementContext = this.createPolicyEnforcementContext(message2);
                        inputStream = null;
                        try {
                            AssertionStatus assertionStatus;
                            block25: {
                                assertionStatus = this.submitRequestMessage(policyEnforcementContext);
                                if (assertionStatus != AssertionStatus.NONE) break block25;
                                try {
                                    block30: {
                                        if (!k.isLoggable(Level.FINE)) break block26;
                                        break block30;
                                        catch (Exception exception) {
                                            throw ExtendedCommandsFtpRequestProcessor.b(exception);
                                        }
                                    }
                                    k.log(Level.FINE, m[16] + String.valueOf(ftpCommand) + m[12]);
                                    break block26;
                                }
                                catch (Exception exception) {
                                    throw ExtendedCommandsFtpRequestProcessor.b(exception);
                                }
                            }
                            this.handleMessageProcessingFailure(ftpIoSession, ftpCommand, assertionStatus);
                        }
                        catch (Throwable throwable) {
                            this.resetStateAndCloseConnection(ftpIoSession);
                            ResourceUtils.closeQuietly(inputStream);
                            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                            throw throwable;
                        }
                        this.resetStateAndCloseConnection(ftpIoSession);
                        ResourceUtils.closeQuietly(inputStream);
                        ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                        return;
                    }
                    message = policyEnforcementContext.getResponse();
                    try {
                        if (message.getKnob(MimeKnob.class) != null && message.isInitialized()) break block27;
                    }
                    catch (Exception exception) {
                        throw ExtendedCommandsFtpRequestProcessor.b(exception);
                    }
                    String[] stringArray = m;
                    k.log(Level.WARNING, stringArray[2]);
                    this.reply550ProcessingError(ftpIoSession, ftpCommand);
                    this.resetStateAndCloseConnection(ftpIoSession);
                    ResourceUtils.closeQuietly(inputStream);
                    ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                    return;
                }
                ftpResponseKnob = (FtpResponseKnob)message.getKnob(FtpResponseKnob.class);
                if (null != ftpResponseKnob) break block28;
                String[] stringArray = m;
                k.log(Level.WARNING, stringArray[3]);
                this.reply550ProcessingError(ftpIoSession, ftpCommand);
                this.resetStateAndCloseConnection(ftpIoSession);
                ResourceUtils.closeQuietly((Closeable)inputStream);
                ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
                return;
            }
            if (226 == ftpResponseKnob.getReplyCode()) break block29;
            String[] stringArray = m;
            k.log(Level.WARNING, stringArray[18] + ftpResponseKnob.getReplyCode());
            ftpIoSession.write((Object)new DefaultFtpReply(ftpResponseKnob.getReplyCode(), ftpResponseKnob.getReplyText()));
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        try {
            inputStream = message.getMimeKnob().getEntireMessageBodyAsInputStream();
        }
        catch (NoSuchPartException | IOException throwable) {
            k.log(Level.WARNING, m[9] + ExceptionUtils.getMessage((Throwable)throwable), ExceptionUtils.getDebugException((Throwable)throwable));
            this.reply550ProcessingError(ftpIoSession, ftpCommand);
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        try {
            this.transferDataToClient(ftpIoSession.getFtpletSession(), dataConnection, inputStream);
        }
        catch (Exception exception) {
            this.handleDataTransferFailure(ftpIoSession, ftpServerContext, ftpRequest, exception);
            this.resetStateAndCloseConnection(ftpIoSession);
            ResourceUtils.closeQuietly((Closeable)inputStream);
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
            return;
        }
        this.reply226ClosingConnection(ftpIoSession, ftpServerContext, ftpRequest);
        this.resetStateAndCloseConnection(ftpIoSession);
        ResourceUtils.closeQuietly((Closeable)inputStream);
        ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    private void a(FtpIoSession ftpIoSession, FtpRequest ftpRequest, FtpCommand ftpCommand) throws FtpException {
        Message message;
        ftpIoSession.resetState();
        try {
            message = this.createRequestMessage(ftpIoSession, ftpRequest, ftpCommand, new ByteArrayInputStream(new byte[0]));
        }
        catch (IOException iOException) {
            this.handleCreateRequestMessageFailure(ftpIoSession, ftpCommand, iOException);
            return;
        }
        PolicyEnforcementContext policyEnforcementContext = this.createPolicyEnforcementContext(message);
        try {
            FtpResponseKnob ftpResponseKnob;
            block22: {
                block20: {
                    FileSystemView fileSystemView;
                    block21: {
                        Message message2;
                        block19: {
                            AssertionStatus assertionStatus;
                            block18: {
                                assertionStatus = this.submitRequestMessage(policyEnforcementContext);
                                if (assertionStatus != AssertionStatus.NONE) break block18;
                                try {
                                    block24: {
                                        if (!k.isLoggable(Level.FINE)) break block19;
                                        break block24;
                                        catch (IOException iOException) {
                                            throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                                        }
                                    }
                                    k.log(Level.FINE, m[16] + String.valueOf(ftpCommand) + m[12]);
                                    break block19;
                                }
                                catch (IOException iOException) {
                                    throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                                }
                            }
                            this.handleMessageProcessingFailure(ftpIoSession, ftpCommand, assertionStatus);
                            return;
                        }
                        if (!(message2 = policyEnforcementContext.getResponse()).isInitialized()) {
                            String[] stringArray = m;
                            k.log(Level.WARNING, stringArray[2]);
                            this.reply550ProcessingError(ftpIoSession, ftpCommand);
                            return;
                        }
                        ftpResponseKnob = (FtpResponseKnob)message2.getKnob(FtpResponseKnob.class);
                        if (null == ftpResponseKnob) {
                            String[] stringArray = m;
                            k.log(Level.WARNING, stringArray[3]);
                            this.reply550ProcessingError(ftpIoSession, ftpCommand);
                            return;
                        }
                        try {
                            if (ftpResponseKnob.getReplyCode() < 200 || ftpResponseKnob.getReplyCode() >= 300) break block20;
                        }
                        catch (IOException iOException) {
                            throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                        }
                        fileSystemView = ftpIoSession.getFileSystemView();
                        try {
                            if (FtpCommand.CDUP != ftpCommand) break block21;
                            fileSystemView.changeWorkingDirectory(m[15]);
                            break block22;
                        }
                        catch (IOException iOException) {
                            throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                        }
                    }
                    fileSystemView.changeWorkingDirectory(ftpRequest.getArgument());
                    break block22;
                }
                k.log(Level.WARNING, m[6] + ftpResponseKnob.getReplyCode());
            }
            ftpIoSession.write((Object)new DefaultFtpReply(ftpResponseKnob.getReplyCode(), ftpResponseKnob.getReplyText()));
        }
        finally {
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     */
    private void b(FtpIoSession ftpIoSession, FtpRequest ftpRequest, FtpCommand ftpCommand) throws FtpException {
        Message message;
        ftpIoSession.resetState();
        try {
            message = this.createRequestMessage(ftpIoSession, ftpRequest, ftpCommand, new ByteArrayInputStream(new byte[0]));
        }
        catch (IOException iOException) {
            this.handleCreateRequestMessageFailure(ftpIoSession, ftpCommand, iOException);
            return;
        }
        PolicyEnforcementContext policyEnforcementContext = this.createPolicyEnforcementContext(message);
        try {
            Message message2;
            block15: {
                AssertionStatus assertionStatus;
                block14: {
                    assertionStatus = this.submitRequestMessage(policyEnforcementContext);
                    if (assertionStatus != AssertionStatus.NONE) break block14;
                    try {
                        block17: {
                            if (!k.isLoggable(Level.FINE)) break block15;
                            break block17;
                            catch (IOException iOException) {
                                throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                            }
                        }
                        k.log(Level.FINE, m[7] + String.valueOf(ftpCommand) + m[11]);
                        break block15;
                    }
                    catch (IOException iOException) {
                        throw ExtendedCommandsFtpRequestProcessor.b(iOException);
                    }
                }
                this.handleMessageProcessingFailure(ftpIoSession, ftpCommand, assertionStatus);
                return;
            }
            if (!(message2 = policyEnforcementContext.getResponse()).isInitialized()) {
                String[] stringArray = m;
                k.log(Level.WARNING, stringArray[0]);
                this.reply550ProcessingError(ftpIoSession, ftpCommand);
                return;
            }
            FtpResponseKnob ftpResponseKnob = (FtpResponseKnob)message2.getKnob(FtpResponseKnob.class);
            if (null == ftpResponseKnob) {
                k.log(Level.WARNING, m[14]);
                this.reply550ProcessingError(ftpIoSession, ftpCommand);
                return;
            }
            ftpIoSession.write((Object)new DefaultFtpReply(ftpResponseKnob.getReplyCode(), ftpResponseKnob.getReplyText()));
        }
        finally {
            ResourceUtils.closeQuietly((Closeable)policyEnforcementContext);
        }
    }

    @Override
    protected ContentTypeHeader getDefaultMessageContentType() {
        return ContentTypeHeader.OCTET_STREAM_DEFAULT;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[23];
                var3_1 = 0;
                var2_2 = "\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Ves\\p>Ua i_?>Ip iBv$OeliVz4\u0019\u001dG| cCq>CgtiCq#\u0006axcIz4C`.9\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Ves\\p>Ua i_?>Ip iBv$OeliVz4;\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Btp~z#VknsIT>If wMlpHkt Jp%H`\u0006\u0004_te \u000b\u001e\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u00067\u0014OvecXp\"_$noX?3NengI{j\u0006qneTo5Eped\fm5Vhy Op4C$reXj\"Had:\f\u0004\u0016rT  w\u0006jot\fl%VtorXz4\u0006bor\fk8Ow aOk9Ij.\u001e\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006+\u0005HaxpI|$C` cCr JatiCqpTaplU?3I`e ^z$SvneH%p\u001dpKassMx5\u0006troOz#Umng\f|?KtleXz4\u001dpKassMx5\u0006troOz#Umng\f|?KtleXz4%\u0016GmleH?$I$trMq#@ar H~$G$frCrpEhieBkj\u0006;\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Btp~z#VknsIT>If wMlpHkt Jp%H`\u0002~\b\u0004\u0016rT )\u0000Tkce_l9Hc '\u000bd`[#' [v$N$arKj=Cjt \u000b8+\u0017y''\u0002+\u0005HaxpI|$C` cCr JatiCqpTaplU?3I`e ^z$SvneH%p\u0018r\u0006gomA~>B$noX?#Stpo^k5B*\f\u0002IqtiBxpIb \"";
                var4_3 = "\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Ves\\p>Ua i_?>Ip iBv$OeliVz4\u0019\u001dG| cCq>CgtiCq#\u0006axcIz4C`.9\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Ves\\p>Ua i_?>Ip iBv$OeliVz4;\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Btp~z#VknsIT>If wMlpHkt Jp%H`\u0006\u0004_te \u000b\u001e\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u00067\u0014OvecXp\"_$noX?3NengI{j\u0006qneTo5Eped\fm5Vhy Op4C$reXj\"Had:\f\u0004\u0016rT  w\u0006jot\fl%VtorXz4\u0006bor\fk8Ow aOk9Ij.\u001e\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006+\u0005HaxpI|$C` cCr JatiCqpTaplU?3I`e ^z$SvneH%p\u001dpKassMx5\u0006troOz#Umng\f|?KtleXz4\u001dpKassMx5\u0006troOz#Umng\f|?KtleXz4%\u0016GmleH?$I$trMq#@ar H~$G$frCrpEhieBkj\u0006;\u0015Tvor\fo\"Iges_v>A$FT|?\"Cuue_kj\u0006Btp~z#VknsIT>If wMlpHkt Jp%H`\u0002~\b\u0004\u0016rT )\u0000Tkce_l9Hc '\u000bd`[#' [v$N$arKj=Cjt \u000b8+\u0017y''\u0002+\u0005HaxpI|$C` cCr JatiCqpTaplU?3I`e ^z$SvneH%p\u0018r\u0006gomA~>B$noX?#Stpo^k5B*\f\u0002IqtiBxpIb \"".length();
                var1_4 = 57;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = ExtendedCommandsFtpRequestProcessor.b(v0, ExtendedCommandsFtpRequestProcessor.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "~*\u0019\u001d\u0000+\u0011\u0019=\b\u001a\u0019*\u0018J*M\u0004\f6\u0005X(\bI\u0000+\u0006L;M\u001a\u001d7\u0013X\"A|=\u001f\u0006\u001be\u0006K \u000e\f\u001a6\u001fW(M/=\u0015VK*\u001c\u001c\f6\u0002\u0003o?\f\u001a5\u0019W<\bI$ \u0005J.\n\fI,\u0005\u0019!\u0002\u001dI,\u0018P;\u0004\b\u0005,\f\\+";
                    var4_3 = "~*\u0019\u001d\u0000+\u0011\u0019=\b\u001a\u0019*\u0018J*M\u0004\f6\u0005X(\bI\u0000+\u0006L;M\u001a\u001d7\u0013X\"A|=\u001f\u0006\u001be\u0006K \u000e\f\u001a6\u001fW(M/=\u0015VK*\u001c\u001c\f6\u0002\u0003o?\f\u001a5\u0019W<\bI$ \u0005J.\n\fI,\u0005\u0019!\u0002\u001dI,\u0018P;\u0004\b\u0005,\f\\+".length();
                    var1_4 = 37;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 89;
                        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++] = ExtendedCommandsFtpRequestProcessor.b(v0, ExtendedCommandsFtpRequestProcessor.b(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;
            }
        }
        ExtendedCommandsFtpRequestProcessor.m = var5;
        ExtendedCommandsFtpRequestProcessor.k = Logger.getLogger(ExtendedCommandsFtpRequestProcessor.class.getName());
    }

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

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x2F);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(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 -> 96;
                    case 1 -> 22;
                    case 2 -> 52;
                    case 3 -> 48;
                    case 4 -> 48;
                    case 5 -> 28;
                    default -> 47;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

