MT Manager v2.15.3版本的 MD5 值为:27f0d62ac7123fbbaefff319fdab9f13

以下内容为反编译后的 C8541.java 源代码,内容仅作参考


package l;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;

public final class C8541 implements InterfaceC0962, AutoCloseable {

    public static final int f24897 = 0;

    public static final AtomicInteger f24898 = new AtomicInteger(1);

    public InterfaceC6406 f24899;

    public InterfaceC13030 f24900;

    public int f24901;

    public C14827 f24902;

    public final C13593 f24903;

    public int f24904;

    public int f24905;

    public final int m20274() {
        return this.f24901;
    }

    public final int m20277() {
        return this.f24904;
    }

    @Override
    public final void close() {
        C14827 c14827 = this.f24902;
        this.f24905 = 0;
        try {
            this.f24899.close();
        } finally {
            c14827.close();
        }
    }

    public final String toString() {
        return this.f24903.toString();
    }

    public final int m20275(byte[] bArr, int i, int i2, byte[] bArr2) {
        InterfaceC6406 interfaceC6406 = this.f24899;
        if (interfaceC6406.mo6463()) {
            throw new IOException("DCERPC pipe is no longer open");
        }
        int mo6455 = interfaceC6406.mo6455(i, bArr, i2, bArr2, this.f24901);
        short m28743 = C13517.m28743(8, bArr2);
        if (m28743 > this.f24901) {
            throw new IOException(C6800.m16392("Unexpected fragment length: ", m28743));
        }
        while (mo6455 < m28743) {
            int mo6460 = interfaceC6406.mo6460(mo6455, m28743 - mo6455, bArr2);
            if (mo6460 == 0) {
                throw new IOException("Unexpected EOF");
            }
            mo6455 += mo6460;
        }
        return mo6455;
    }

    public final void m20276(AbstractC2646 abstractC2646) {
        C2972 c2972;
        C11067 mo7488;
        if (this.f24905 == 0) {
            synchronized (this) {
                try {
                    try {
                        this.f24905 = 1;
                        m20276(new C6014(this.f24903, this));
                    } catch (IOException e) {
                        this.f24905 = 0;
                        throw e;
                    }
                } finally {
                }
            }
        }
        byte[] m18687 = this.f24900.mo697().m18687();
        byte[] m186872 = this.f24900.mo697().m18687();
        try {
            C2972 c29722 = new C2972(m186872, 0);
            abstractC2646.f9776 = 3;
            abstractC2646.f9775 = f24898.incrementAndGet();
            abstractC2646.mo1664(c29722);
            int m20275 = m20275(m186872, m20272(abstractC2646, m186872, c29722), abstractC2646.f9779, m18687);
            if (m20275 != 0) {
                C2972 c29723 = new C2972(m18687, 0);
                c29723.f10581 = 0;
                c29723.f10583 = c29723;
                c29723.f10584 = 8;
                c29723.f10583.f10581 = c29723.m8294();
                c29723.f10584 = 0;
                abstractC2646.m7490(c29723);
            }
            if (m20275 != 0 && (abstractC2646.f9776 & 2) != 2) {
                c2972 = new C2972(m20273(abstractC2646, m18687), 0);
                abstractC2646.mo1663(c2972);
                this.f24900.mo697().m18686(m18687);
                this.f24900.mo697().m18686(m186872);
                mo7488 = abstractC2646.mo7488();
                if (mo7488 == null) {
                    throw mo7488;
                }
                return;
            }
            c2972 = new C2972(m18687, 0);
            abstractC2646.mo1663(c2972);
            this.f24900.mo697().m18686(m18687);
            this.f24900.mo697().m18686(m186872);
            mo7488 = abstractC2646.mo7488();
            if (mo7488 == null) {
            }
        } catch (Throwable th) {
            this.f24900.mo697().m18686(m18687);
            this.f24900.mo697().m18686(m186872);
            throw th;
        }
    }

    public C8541(String str, InterfaceC13030 interfaceC13030) {
        char[] charArray = str.toCharArray();
        int i = 0;
        char c = 0;
        int i2 = 0;
        String str2 = null;
        C13593 c13593 = null;
        String str3 = null;
        do {
            char c2 = charArray[i];
            if (c != 0) {
                if (c != 1) {
                    if (c != 2) {
                        if (c != 5) {
                            i = charArray.length;
                        } else if (c2 == '=') {
                            str2 = str.substring(i2, i).trim();
                            i2 = i + 1;
                        } else if (c2 == ',' || c2 == ']') {
                            String trim = str.substring(i2, i).trim();
                            int i3 = i + 1;
                            str2 = str2 == null ? "endpoint" : str2;
                            if (c13593 != null) {
                                c13593.m28830(trim, str2);
                            }
                            str2 = null;
                            i2 = i3;
                        }
                    }
                    if (c2 == '[') {
                        String trim2 = str.substring(i2, i).trim();
                        if (trim2.length() == 0) {
                            int indexOf = str.indexOf(91, i + 1);
                            int indexOf2 = str.indexOf(93, i);
                            if (indexOf < 0 || indexOf2 < 0 || indexOf2 != indexOf - 1) {
                                trim2 = "127.0.0.1";
                            } else {
                                trim2 = str.substring(i, indexOf2 + 1);
                                i = indexOf;
                            }
                        }
                        c13593 = new C13593(str3, trim2);
                        i2 = i + 1;
                        c = 5;
                    }
                } else {
                    if (c2 != '\\') {
                        c = 2;
                        if (c2 == '[') {
                        }
                    }
                    i2 = i + 1;
                }
            } else if (c2 == ':') {
                String substring = str.substring(i2, i);
                i2 = i + 1;
                str3 = substring;
                c = 1;
            }
            i++;
        } while (i < charArray.length);
        if (c13593 != null && c13593.m28829() != null) {
            this.f24904 = 4280;
            this.f24901 = 4280;
            this.f24905 = 0;
            this.f24900 = interfaceC13030;
            this.f24903 = c13593;
            String str4 = "smb://" + c13593.m28831() + "/IPC$/" + c13593.m28829().substring(6);
            String str5 = (String) c13593.m28828("server");
            String concat = str5 != null ? "&server=".concat(str5) : "";
            String str6 = (String) c13593.m28828("address");
            concat = str6 != null ? C13902.m29425(concat, "&address=", str6) : concat;
            C14827 c14827 = new C14827(concat.length() > 0 ? C13084.m27921(concat, 1, C1105.m3554(str4, "?")) : str4, interfaceC13030);
            this.f24902 = c14827;
            InterfaceC6406 m30978 = c14827.m30978();
            m30978.mo6465();
            this.f24899 = m30978;
            return;
        }
        throw new IOException("Invalid binding URL: ".concat(str));
    }

    private int m20272(AbstractC2646 abstractC2646, byte[] bArr, C2972 c2972) {
        int i = c2972.f10583.f10581 - 24;
        int i2 = 0;
        while (i2 < i) {
            int i3 = i - i2;
            int i4 = i3 + 24;
            int i5 = this.f24904;
            if (i4 > i5) {
                abstractC2646.f9776 &= -3;
                i3 = i5 - 24;
            } else {
                abstractC2646.f9776 |= 2;
                abstractC2646.f9778 = i3;
            }
            abstractC2646.f9779 = i3 + 24;
            if (i2 > 0) {
                abstractC2646.f9776 &= -2;
            }
            if ((abstractC2646.f9776 & 3) != 3) {
                c2972.f10582 = i2;
                c2972.f10584 = i2;
                c2972.f10581 = 0;
                c2972.f10583 = c2972;
                abstractC2646.m7487(c2972);
                c2972.m8292(abstractC2646.f9778);
                c2972.m8293(0);
                c2972.m8293(abstractC2646.mo7485());
            }
            if ((abstractC2646.f9776 & 2) == 2) {
                return i2;
            }
            int i6 = abstractC2646.f9779;
            InterfaceC6406 interfaceC6406 = this.f24899;
            if (interfaceC6406.mo6463()) {
                throw new IOException("DCERPC pipe is no longer open");
            }
            interfaceC6406.mo6457(i2, i6, bArr);
            i2 += i3;
        }
        throw new IOException();
    }

    private byte[] m20273(AbstractC2646 abstractC2646, byte[] bArr) {
        int i = abstractC2646.f9777 == 2 ? abstractC2646.f9779 : 24;
        int i2 = this.f24901;
        byte[] bArr2 = new byte[i2];
        C2972 c2972 = new C2972(bArr2, 0);
        while ((abstractC2646.f9776 & 2) != 2) {
            if (i2 < this.f24901) {
                throw new IllegalArgumentException("buffer too small");
            }
            InterfaceC6406 interfaceC6406 = this.f24899;
            int mo6460 = interfaceC6406.mo6460(0, i2, bArr2);
            if (bArr2[0] != 5 || bArr2[1] != 0) {
                throw new IOException("Unexpected DCERPC PDU header");
            }
            short m28743 = C13517.m28743(8, bArr2);
            if (m28743 <= this.f24901) {
                while (mo6460 < m28743) {
                    int mo64602 = interfaceC6406.mo6460(mo6460, m28743 - mo6460, bArr2);
                    if (mo64602 == 0) {
                        throw new IOException("Unexpected EOF");
                    }
                    mo6460 += mo64602;
                }
                c2972.f10581 = 0;
                c2972.f10583 = c2972;
                c2972.f10584 = 8;
                c2972.f10583.f10581 = c2972.m8294();
                c2972.f10584 = c2972.f10582;
                c2972.f10581 = 0;
                c2972.f10583 = c2972;
                abstractC2646.m7490(c2972);
                int i3 = abstractC2646.f9779 - 24;
                int i4 = i + i3;
                if (i4 > bArr.length) {
                    byte[] bArr3 = new byte[i4];
                    System.arraycopy(bArr, 0, bArr3, 0, i);
                    bArr = bArr3;
                }
                System.arraycopy(bArr2, 24, bArr, i, i3);
                i = i4;
            } else {
                throw new IOException(C6800.m16392("Unexpected fragment length: ", m28743));
            }
        }
        return bArr;
    }
}