MT Manager v2.15.3版本的 MD5 值为:34ea5286e529d87838c6cae0a2220d93

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


package l;

import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

public final class RunnableC11716 implements Runnable, InterfaceC13446 {

    public static final InterfaceC3862 f34556 = C2178.m6404(RunnableC11716.class);

    public DatagramPacket f34557;

    public int f34558;

    public DatagramPacket f34559;

    public InetAddress f34560;

    public int f34561;

    public C0771 f34562;

    public HashMap f34563;

    public final Object f34564;

    public Thread f34565;

    public final HashSet f34566;

    public int f34567;

    public byte[] f34568;

    public final HashMap f34569;

    public InterfaceC14288 f34570;

    public DatagramSocket f34571;

    public InetAddress f34572;

    public C0771 f34573;

    public byte[] f34574;

    public C9190 f34575;

    public ArrayList f34576;

    public int f34577;

    public C14242 f34578;

    private void m25031(C14242 c14242) {
        synchronized (this.f34566) {
            this.f34566.remove(c14242);
            this.f34566.notifyAll();
        }
    }

    @Override
    public final void run() {
        while (this.f34565 == Thread.currentThread()) {
            try {
                try {
                    try {
                        this.f34557.setLength(((C12136) this.f34570.mo21758()).m25981());
                        this.f34571.setSoTimeout(this.f34577);
                        this.f34571.receive(this.f34557);
                        InterfaceC3862 interfaceC3862 = f34556;
                        interfaceC3862.mo10307("NetBIOS: new data read from socket");
                        AbstractC15084 abstractC15084 = (AbstractC15084) this.f34563.get(new Integer(AbstractC15084.m31388(0, this.f34568)));
                        if (abstractC15084 != null && !abstractC15084.f45289) {
                            synchronized (abstractC15084) {
                                abstractC15084.m31390(this.f34568);
                                abstractC15084.f45289 = true;
                                if (interfaceC3862.mo10309()) {
                                    interfaceC3862.mo10307(abstractC15084.toString());
                                    interfaceC3862.mo10307(C10248.m22748(this.f34568, 0, this.f34557.getLength()));
                                }
                                abstractC15084.notify();
                            }
                        }
                    } catch (SocketTimeoutException e) {
                        f34556.mo10282("Socket timeout", e);
                    }
                } catch (Exception e2) {
                    f34556.mo10298("Uncaught exception in NameServiceClient", (Throwable) e2);
                }
            } finally {
                m25051();
            }
        }
    }

    public final void m25032() {
        int i = this.f34561 + 1;
        InterfaceC14288 interfaceC14288 = this.f34570;
        this.f34561 = i < ((C12136) interfaceC14288.mo21758()).m25966().length ? this.f34561 + 1 : 0;
        if (((C12136) interfaceC14288.mo21758()).m25966().length == 0) {
            return;
        }
        InetAddress inetAddress = ((C12136) interfaceC14288.mo21758()).m25966()[this.f34561];
    }

    public final C14242 m25037() {
        C0771 c0771 = this.f34562;
        if (c0771 != null) {
            return c0771.f2971;
        }
        return null;
    }

    public final void m25041(AbstractC15084 abstractC15084, AbstractC15084 abstractC150842, int i) {
        RunnableC11716 runnableC11716;
        Integer num;
        int length = ((C12136) this.f34570.mo21758()).m25966().length;
        if (length == 0) {
            length = 1;
        }
        synchronized (abstractC150842) {
            Integer num2 = null;
            while (true) {
                int i2 = length - 1;
                if (length <= 0) {
                    break;
                }
                try {
                    synchronized (this.f34564) {
                        try {
                            int i3 = this.f34567 + 1;
                            this.f34567 = i3;
                            if ((i3 & 65535) == 0) {
                                this.f34567 = 1;
                            }
                            int i4 = this.f34567;
                            abstractC15084.f45297 = i4;
                            num = new Integer(i4);
                            try {
                                this.f34559.setAddress(abstractC15084.f45298);
                                this.f34559.setLength(abstractC15084.m31391(this.f34574));
                                abstractC150842.f45289 = false;
                                this.f34563.put(num, abstractC150842);
                                m25038(i + 1000);
                                this.f34571.send(this.f34559);
                                InterfaceC3862 interfaceC3862 = f34556;
                                if (interfaceC3862.mo10309()) {
                                    interfaceC3862.mo10307(abstractC15084.toString());
                                    interfaceC3862.mo10307(C10248.m22748(this.f34574, 0, this.f34559.getLength()));
                                }
                                try {
                                    long currentTimeMillis = System.currentTimeMillis();
                                    while (i > 0) {
                                        long j = i;
                                        abstractC150842.wait(j);
                                        if (!abstractC150842.f45289 || abstractC15084.f45292 != abstractC150842.f45295) {
                                            abstractC150842.f45289 = false;
                                            i = (int) (j - (System.currentTimeMillis() - currentTimeMillis));
                                        } else {
                                            this.f34563.remove(num);
                                            return;
                                        }
                                    }
                                    this.f34563.remove(num);
                                    synchronized (this.f34564) {
                                        if (!m25043(abstractC15084.f45298)) {
                                            break;
                                        }
                                        if (abstractC15084.f45298 == m25048()) {
                                            m25032();
                                        }
                                        abstractC15084.f45298 = m25048();
                                    }
                                } catch (InterruptedException unused) {
                                    runnableC11716 = this;
                                    num2 = num;
                                    throw new InterruptedIOException();
                                } catch (Throwable th) {
                                    th = th;
                                    runnableC11716 = this;
                                    runnableC11716.f34563.remove(num);
                                    throw th;
                                }
                            } catch (Throwable th2) {
                                th = th2;
                                runnableC11716 = this;
                                num2 = num;
                                while (true) {
                                    try {
                                        try {
                                            try {
                                                break;
                                            } catch (InterruptedException unused2) {
                                                throw new InterruptedIOException();
                                            }
                                        } catch (Throwable th3) {
                                            th = th3;
                                            num = num2;
                                            runnableC11716.f34563.remove(num);
                                            throw th;
                                        }
                                    } catch (Throwable th4) {
                                        th = th4;
                                    }
                                }
                                throw th;
                            }
                        } catch (Throwable th5) {
                            th = th5;
                            runnableC11716 = this;
                        }
                    }
                } catch (InterruptedException unused3) {
                    runnableC11716 = this;
                } catch (Throwable th6) {
                    th = th6;
                    runnableC11716 = this;
                    num = num2;
                    runnableC11716.f34563.remove(num);
                    throw th;
                }
                length = i2;
                num2 = num;
            }
        }
    }

    public final void m25042(C0771[] c0771Arr) {
        if (((C12136) this.f34570.mo21758()).m25965() == 0) {
            return;
        }
        long currentTimeMillis = ((C12136) this.f34570.mo21758()).m25965() != -1 ? System.currentTimeMillis() + (((C12136) this.f34570.mo21758()).m25965() * 1000) : -1L;
        synchronized (this.f34569) {
            for (int i = 0; i < c0771Arr.length; i++) {
                C10874 c10874 = (C10874) this.f34569.get(c0771Arr[i].f2971);
                if (c10874 == null) {
                    C0771 c0771 = c0771Arr[i];
                    this.f34569.put(c0771.f2971, new C10874(c0771, currentTimeMillis));
                } else {
                    c10874.f31109 = c0771Arr[i];
                    c10874.f31110 = currentTimeMillis;
                }
            }
        }
    }

    public final InetAddress m25048() {
        InterfaceC14288 interfaceC14288 = this.f34570;
        if (((C12136) interfaceC14288.mo21758()).m25966().length == 0) {
            return null;
        }
        return ((C12136) interfaceC14288.mo21758()).m25966()[this.f34561];
    }

    public final C0771 m25049(C14242 c14242) {
        C0771 c0771;
        if (((C12136) this.f34570.mo21758()).m25965() == 0) {
            return null;
        }
        synchronized (this.f34569) {
            C10874 c10874 = (C10874) this.f34569.get(c14242);
            if (c10874 != null && c10874.f31110 < System.currentTimeMillis() && c10874.f31110 >= 0) {
                c10874 = null;
            }
            c0771 = c10874 != null ? c10874.f31109 : null;
        }
        return c0771;
    }

    public final void m25051() {
        synchronized (this.f34564) {
            DatagramSocket datagramSocket = this.f34571;
            if (datagramSocket != null) {
                datagramSocket.close();
                this.f34571 = null;
            }
            this.f34565 = null;
            this.f34563.clear();
        }
    }

    public final void m25038(int i) {
        this.f34577 = 0;
        InterfaceC14288 interfaceC14288 = this.f34570;
        if (((C12136) interfaceC14288.mo21758()).m25957() != 0) {
            this.f34577 = Math.max(((C12136) interfaceC14288.mo21758()).m25957(), i);
        }
        if (this.f34571 == null) {
            this.f34571 = new DatagramSocket(this.f34558, this.f34560);
            Thread thread = new Thread(this, "JCIFS-NameServiceClient");
            this.f34565 = thread;
            thread.setDaemon(true);
            this.f34565.start();
        }
    }

    public final boolean m25043(InetAddress inetAddress) {
        int i = 0;
        while (inetAddress != null) {
            InterfaceC14288 interfaceC14288 = this.f34570;
            if (i >= ((C12136) interfaceC14288.mo21758()).m25966().length) {
                break;
            }
            if (inetAddress.hashCode() == ((C12136) interfaceC14288.mo21758()).m25966()[i].hashCode()) {
                return true;
            }
            i++;
        }
        return false;
    }

    public RunnableC11716(InterfaceC14288 interfaceC14288) {
        InetAddress byName;
        interfaceC14288.mo21758().getClass();
        interfaceC14288.mo21758().getClass();
        this.f34564 = new Object();
        this.f34561 = 0;
        HashMap hashMap = new HashMap();
        this.f34569 = hashMap;
        this.f34566 = new HashSet();
        this.f34563 = new HashMap();
        this.f34567 = 0;
        this.f34576 = new ArrayList();
        this.f34575 = new C9190();
        this.f34558 = 0;
        this.f34560 = null;
        this.f34570 = interfaceC14288;
        InetAddress m25961 = ((C12136) interfaceC14288.mo21758()).m25961();
        this.f34572 = m25961;
        byte[] bArr = new byte[((C12136) interfaceC14288.mo21758()).m25971()];
        this.f34574 = bArr;
        byte[] bArr2 = new byte[((C12136) interfaceC14288.mo21758()).m25981()];
        this.f34568 = bArr2;
        this.f34559 = new DatagramPacket(bArr, ((C12136) interfaceC14288.mo21758()).m25971(), m25961, InterfaceC9912.f28727);
        this.f34557 = new DatagramPacket(bArr2, ((C12136) interfaceC14288.mo21758()).m25981());
        this.f34576 = ((C12136) interfaceC14288.mo21758()).m25960();
        C14242 c14242 = new C14242(interfaceC14288.mo21758(), "0.0.0.0", 0, null);
        this.f34578 = c14242;
        C0771 c0771 = new C0771(c14242, 0);
        this.f34573 = c0771;
        hashMap.put(c14242, new C10874(c0771, -1L));
        interfaceC14288.mo21758().getClass();
        try {
            try {
                byName = InetAddress.getLocalHost();
            } catch (UnknownHostException unused) {
                byName = InetAddress.getByName("127.0.0.1");
            }
            interfaceC14288.mo21758().getClass();
            byte[] address = byName.getAddress();
            String str = "JCIFS" + (address[2] & 255) + "_" + (address[3] & 255) + "_" + C10248.m22747((int) (Math.random() * 255.0d), 2);
            InterfaceC6710 mo21758 = interfaceC14288.mo21758();
            interfaceC14288.mo21758().getClass();
            C14242 c142422 = new C14242(mo21758, str, 0, null);
            C0771 c07712 = new C0771(c142422, byName.hashCode(), 0);
            this.f34562 = c07712;
            m25040(c142422, c07712, -1L);
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
    }

    public final C0771 m25034(C14242 c14242) {
        C0771 c0771;
        C0771 c07712 = null;
        InetAddress inetAddress = c14242.f42863 == 29 ? this.f34572 : null;
        c14242.f42865 = inetAddress != null ? inetAddress.hashCode() : 0;
        C0771 m25049 = m25049(c14242);
        if (m25049 == null) {
            synchronized (this.f34566) {
                if (!this.f34566.contains(c14242)) {
                    this.f34566.add(c14242);
                } else {
                    while (this.f34566.contains(c14242)) {
                        try {
                            this.f34566.wait();
                        } catch (InterruptedException e) {
                            f34556.mo10282("Interrupted", e);
                        }
                    }
                    c07712 = m25049(c14242);
                    if (c07712 == null) {
                        synchronized (this.f34566) {
                            this.f34566.add(c14242);
                        }
                    }
                }
            }
            try {
                if (c07712 == null) {
                    try {
                        c0771 = m25035(c14242, inetAddress);
                    } catch (UnknownHostException unused) {
                        c0771 = this.f34573;
                    }
                    m25049 = c0771;
                    m25039(c14242, m25049);
                    m25031(c14242);
                } else {
                    m25049 = c07712;
                }
            } catch (Throwable th) {
                m25039(c14242, c07712);
                m25031(c14242);
                throw th;
            }
        }
        if (m25049 != this.f34573) {
            return m25049;
        }
        throw new UnknownHostException(c14242.toString());
    }

    public final void m25039(C14242 c14242, C0771 c0771) {
        InterfaceC14288 interfaceC14288 = this.f34570;
        if (((C12136) interfaceC14288.mo21758()).m25965() == 0) {
            return;
        }
        m25040(c14242, c0771, ((C12136) interfaceC14288.mo21758()).m25965() != -1 ? System.currentTimeMillis() + (((C12136) interfaceC14288.mo21758()).m25965() * 1000) : -1L);
    }

    public final void m25040(C14242 c14242, C0771 c0771, long j) {
        if (((C12136) this.f34570.mo21758()).m25965() == 0) {
            return;
        }
        synchronized (this.f34569) {
            C10874 c10874 = (C10874) this.f34569.get(c14242);
            if (c10874 == null) {
                this.f34569.put(c14242, new C10874(c0771, j));
            } else {
                c10874.f31109 = c0771;
                c10874.f31110 = j;
            }
        }
    }

    public final C0771 m25035(C14242 c14242, InetAddress inetAddress) {
        InterfaceC14288 interfaceC14288 = this.f34570;
        C5822 c5822 = new C5822(interfaceC14288.mo21758(), c14242);
        C12558 c12558 = new C12558(interfaceC14288.mo21758());
        InterfaceC3862 interfaceC3862 = f34556;
        if (inetAddress == null) {
            Iterator it = this.f34576.iterator();
            while (it.hasNext()) {
                EnumC1658 enumC1658 = (EnumC1658) it.next();
                try {
                    int ordinal = enumC1658.ordinal();
                    if (ordinal == 0 || ordinal == 1) {
                        EnumC1658 enumC16582 = EnumC1658.f5274;
                        if (enumC1658 != enumC16582 || c14242.f42861 == "\u0001\u0002__MSBROWSE__\u0002" || c14242.f42863 == 29) {
                            c5822.f45298 = this.f34572;
                            c5822.f45296 = true;
                        } else {
                            c5822.f45298 = m25048();
                            c5822.f45296 = false;
                        }
                        int m25954 = ((C12136) interfaceC14288.mo21758()).m25954();
                        while (true) {
                            int i = m25954 - 1;
                            if (m25954 > 0) {
                                try {
                                    m25041(c5822, c12558, ((C12136) interfaceC14288.mo21758()).m25976());
                                    if (c12558.f45289 && c12558.f45307 == 0) {
                                        c12558.f45288[0].f2971.f42865 = c5822.f45298.hashCode();
                                        return c12558.f45288[0];
                                    }
                                    if (enumC1658 == enumC16582) {
                                        break;
                                    }
                                    m25954 = i;
                                } catch (IOException e) {
                                    interfaceC3862.mo10296("Failed to send nameservice request for " + c14242.f42861, (Exception) e);
                                    throw new UnknownHostException(c14242.f42861);
                                }
                            }
                        }
                    } else if (ordinal == 3) {
                        this.f34575.m20942(interfaceC14288);
                    }
                } catch (IOException e2) {
                    interfaceC3862.mo10288("Failed to lookup name", (Exception) e2);
                }
            }
            throw new UnknownHostException(c14242.f42861);
        }
        c5822.f45298 = inetAddress;
        c5822.f45296 = inetAddress.equals(this.f34572) || inetAddress.getAddress()[3] == -1;
        int m259542 = ((C12136) interfaceC14288.mo21758()).m25954();
        do {
            try {
                m25041(c5822, c12558, ((C12136) interfaceC14288.mo21758()).m25976());
                if (!c12558.f45289 || c12558.f45307 != 0) {
                    m259542--;
                    if (m259542 <= 0) {
                        break;
                    }
                } else {
                    C0771[] c0771Arr = c12558.f45288;
                    int length = c0771Arr.length - 1;
                    c0771Arr[length].f2971.f42865 = inetAddress.hashCode();
                    return c12558.f45288[length];
                }
            } catch (InterruptedIOException e3) {
                if (interfaceC3862.mo10309()) {
                    interfaceC3862.mo10282("Timeout waiting for response " + c14242.f42861, e3);
                }
                throw new UnknownHostException(c14242.f42861);
            } catch (IOException e4) {
                interfaceC3862.mo10296("Failed to send nameservice request for " + c14242.f42861, (Exception) e4);
                throw new UnknownHostException(c14242.f42861);
            }
        } while (c5822.f45296);
        throw new UnknownHostException(c14242.f42861);
    }

    public final C0771[] m25045(InterfaceC5026 interfaceC5026) {
        InterfaceC14288 interfaceC14288 = this.f34570;
        C13400 c13400 = new C13400(interfaceC14288.mo21758(), (C0771) interfaceC5026.mo2464(C0771.class));
        InterfaceC6710 mo21758 = interfaceC14288.mo21758();
        int i = 0;
        C14242 c14242 = new C14242(interfaceC14288.mo21758(), "*\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", 0, null);
        AbstractC15084 abstractC15084 = new AbstractC15084(mo21758);
        abstractC15084.f45287 = c14242;
        abstractC15084.f45292 = 33;
        abstractC15084.f45305 = false;
        abstractC15084.f45296 = false;
        abstractC15084.f45298 = interfaceC5026.mo2461();
        int m25954 = ((C12136) interfaceC14288.mo21758()).m25954();
        while (true) {
            int i2 = m25954 - 1;
            if (m25954 > 0) {
                try {
                    m25041(abstractC15084, c13400, ((C12136) interfaceC14288.mo21758()).m25976());
                    if (c13400.f45289 && c13400.f45307 == 0) {
                        int hashCode = abstractC15084.f45298.hashCode();
                        while (true) {
                            C0771[] c0771Arr = c13400.f39119;
                            if (i >= c0771Arr.length) {
                                return c0771Arr;
                            }
                            c0771Arr[i].f2971.f42865 = hashCode;
                            i++;
                        }
                    } else {
                        m25954 = i2;
                    }
                } catch (IOException e) {
                    f34556.mo10296("Failed to send node status request for " + interfaceC5026, (Exception) e);
                    throw new UnknownHostException(interfaceC5026.toString());
                }
            } else {
                throw new UnknownHostException(interfaceC5026.mo2467());
            }
        }
    }

    public final C0771 m25033(int i, String str) {
        if (str == null || str.length() == 0) {
            return this.f34562;
        }
        C14242 c14242 = new C14242(this.f34570.mo21758(), str, i, null);
        if (!Character.isDigit(str.charAt(0))) {
            return m25034(c14242);
        }
        char[] charArray = str.toCharArray();
        int i2 = 0;
        int i3 = 0;
        int i4 = 0;
        while (i2 < charArray.length) {
            char c = charArray[i2];
            if (c < '0' || c > '9') {
                return m25034(c14242);
            }
            int i5 = 0;
            while (c != '.') {
                if (c < '0' || c > '9') {
                    return m25034(c14242);
                }
                i5 = ((i5 * 10) + c) - 48;
                i2++;
                if (i2 >= charArray.length) {
                    break;
                }
                c = charArray[i2];
            }
            if (i5 > 255) {
                return m25034(c14242);
            }
            i4 = (i4 << 8) + i5;
            i3++;
            i2++;
        }
        if (i3 != 4 || str.endsWith(".")) {
            return m25034(c14242);
        }
        return new C0771(this.f34578, i4);
    }

    public final C0771[] m25044(String str, int i, String str2, InetAddress inetAddress) {
        InterfaceC14288 interfaceC14288 = this.f34570;
        C14242 c14242 = new C14242(interfaceC14288.mo21758(), str, i, str2);
        InterfaceC3862 interfaceC3862 = f34556;
        InterfaceC6710 mo21758 = interfaceC14288.mo21758();
        C5822 c5822 = new C5822(mo21758, c14242);
        C12558 c12558 = new C12558(mo21758);
        if (inetAddress == null) {
            inetAddress = m25048();
        }
        c5822.f45298 = inetAddress;
        int i2 = 1;
        boolean z = inetAddress == null || inetAddress.equals(this.f34572) || inetAddress.getAddress()[3] == -1;
        c5822.f45296 = z;
        if (z) {
            if (c5822.f45298 == null) {
                c5822.f45298 = this.f34572;
            }
            i2 = ((C12136) mo21758).m25954();
        }
        do {
            try {
                m25041(c5822, c12558, ((C12136) mo21758).m25976());
                if (!c12558.f45289 || c12558.f45307 != 0) {
                    i2--;
                    if (i2 <= 0) {
                        break;
                    }
                } else {
                    return c12558.f45288;
                }
            } catch (InterruptedIOException e) {
                if (interfaceC3862.mo10309()) {
                    interfaceC3862.mo10282("Failed to send nameservice request for " + c14242.f42861, e);
                }
                throw new UnknownHostException(c14242.f42861);
            } catch (IOException e2) {
                interfaceC3862.mo10296("Failed to send nameservice request for " + c14242.f42861, (Exception) e2);
                throw new UnknownHostException(c14242.f42861);
            }
        } while (c5822.f45296);
        throw new UnknownHostException(c14242.f42861);
    }

    public final InterfaceC5026[] m25050(String str) {
        String str2;
        C0771 m25033 = m25033(0, str);
        try {
            C0771[] m25045 = m25045(m25033);
            m25042(m25045);
            return m25045;
        } catch (UnknownHostException unused) {
            StringBuilder sb = new StringBuilder("no name with type 0x");
            sb.append(C10248.m22747(m25033.f2971.f42863, 2));
            String str3 = m25033.f2971.f42864;
            if (str3 == null || str3.isEmpty()) {
                str2 = " with no scope";
            } else {
                str2 = " with scope " + m25033.f2971.f42864;
            }
            sb.append(str2);
            sb.append(" for host ");
            sb.append(m25033.mo2466());
            throw new UnknownHostException(sb.toString());
        }
    }

    public final InterfaceC5026[] m25047(String str, InetAddress inetAddress) {
        ?? obj = new Object();
        obj.f29087 = 2;
        C6664 c6664 = new C6664(obj, str, m25043(inetAddress) ? 27 : 29, inetAddress, this.f34570);
        C6664 c66642 = new C6664(obj, str, 32, inetAddress, this.f34570);
        c6664.setDaemon(true);
        c66642.setDaemon(true);
        try {
            synchronized (obj) {
                c6664.start();
                c66642.start();
                while (obj.f29087 > 0 && c6664.m15856() == null && c66642.m15856() == null) {
                    obj.wait();
                }
            }
            try {
                c6664.interrupt();
            } catch (SecurityException unused) {
            }
            try {
                c6664.join();
            } catch (InterruptedException unused2) {
            }
            try {
                c66642.interrupt();
            } catch (SecurityException unused3) {
            }
            try {
                c66642.join();
            } catch (InterruptedException unused4) {
            }
            if (c6664.m15856() != null) {
                return c6664.m15856();
            }
            if (c66642.m15856() != null) {
                return c66642.m15856();
            }
            throw c6664.m15857();
        } catch (InterruptedException unused5) {
            throw new UnknownHostException(str);
        }
    }

    public final C1612 m25036(String str) {
        return m25046(str, false)[0];
    }

    public final C1612[] m25046(String str, boolean z) {
        int ordinal;
        InterfaceC5026[] m25044;
        if (str == null || str.length() == 0) {
            throw new UnknownHostException();
        }
        if (C1612.m4738(str)) {
            return new C1612[]{new C1612(m25033(0, str))};
        }
        InterfaceC3862 interfaceC3862 = f34556;
        if (interfaceC3862.mo10309()) {
            interfaceC3862.mo10307("Resolver order is " + ((C12136) this.f34570.mo21758()).m25960());
        }
        Iterator it = ((C12136) this.f34570.mo21758()).m25960().iterator();
        while (it.hasNext()) {
            EnumC1658 enumC1658 = (EnumC1658) it.next();
            try {
                ordinal = enumC1658.ordinal();
            } catch (IOException e) {
                InterfaceC3862 interfaceC38622 = f34556;
                interfaceC38622.mo10297("Resolving {} via {} failed:", str, enumC1658);
                interfaceC38622.mo10282("Exception is", e);
            }
            if (ordinal != 0) {
                if (ordinal != 1) {
                    if (ordinal == 2) {
                        for (int i = 0; i < str.length(); i++) {
                            if (!Character.isDigit(str.charAt(i))) {
                                InetAddress[] allByName = InetAddress.getAllByName(str);
                                C1612[] c1612Arr = new C1612[allByName.length];
                                for (int i2 = 0; i2 < allByName.length; i2++) {
                                    c1612Arr[i2] = new C1612(allByName[i2]);
                                }
                                InterfaceC3862 interfaceC38623 = f34556;
                                if (interfaceC38623.mo10301()) {
                                    interfaceC38623.mo10289("Resolved '{}' to {} using DNS", str, Arrays.toString(c1612Arr));
                                }
                                return c1612Arr;
                            }
                        }
                        throw new UnknownHostException(str);
                    }
                    if (ordinal == 3) {
                        C9190 c9190 = this.f34575;
                        InterfaceC14288 interfaceC14288 = this.f34570;
                        synchronized (c9190) {
                            new C14242(interfaceC14288.mo21758(), str, 32, null);
                            c9190.m20942(interfaceC14288);
                        }
                    } else {
                        throw new UnknownHostException(str);
                    }
                } else if (str.length() <= 15) {
                    if (z) {
                        m25044 = m25047(str, ((C12136) this.f34570.mo21758()).m25961());
                    } else {
                        m25044 = m25044(str, 32, null, ((C12136) this.f34570.mo21758()).m25961());
                    }
                }
            } else if (!str.equals("\u0001\u0002__MSBROWSE__\u0002") && str.length() <= 15) {
                if (z) {
                    m25044 = m25047(str, m25048());
                } else {
                    m25044 = m25044(str, 32, null, m25048());
                }
            }
            if (m25044 != null) {
                InterfaceC3862 interfaceC38624 = f34556;
                if (interfaceC38624.mo10301()) {
                    interfaceC38624.mo10299("Resolved '{}' to addrs {} via {}", str, Arrays.toString(m25044), enumC1658);
                }
                C1612[] c1612Arr2 = new C1612[m25044.length];
                for (int i3 = 0; i3 < m25044.length; i3++) {
                    c1612Arr2[i3] = new C1612(m25044[i3]);
                }
                return c1612Arr2;
            }
        }
        throw new UnknownHostException(str);
    }
}