package p138.p329.p346.p347;

import com.hierynomus.protocol.commons.buffer.Buffer;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import p138.p329.p346.C6237;
import p138.p329.p346.EnumC6222;
import p138.p329.p346.EnumC6233;
import p138.p329.p351.p352.p353.AbstractC6294;
import p138.p329.p361.C6332;

/* JADX INFO: renamed from: ދ.ށ.ބ.ޑ.ވ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C6253 extends C6237 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public Set<EnumC6222> f17472;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public UUID f17473;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public boolean f17474;

    public C6253(Set<EnumC6222> set, UUID uuid, boolean z) {
        super(36, EnumC6222.UNKNOWN, EnumC6233.SMB2_NEGOTIATE, 0L, 0L);
        this.f17472 = set;
        this.f17473 = uuid;
        this.f17474 = z;
    }

    @Override // p138.p329.p346.C6237
    /* JADX INFO: renamed from: ހ */
    public void mo9509(C6332 c6332) {
        c6332.f2169.mo9532((Buffer) c6332, this.f17437);
        c6332.f2169.mo9532((Buffer) c6332, this.f17472.size());
        c6332.f2169.mo9532((Buffer) c6332, this.f17474 ? 2 : 1);
        c6332.m9555(2);
        if (EnumC6222.m9497(this.f17472)) {
            throw new UnsupportedOperationException("SMB 3.x support is not yet implemented");
        }
        c6332.m1463(C6332.f17676);
        UUID uuid = this.f17473;
        long leastSignificantBits = uuid.getLeastSignificantBits();
        long mostSignificantBits = uuid.getMostSignificantBits();
        c6332.f2169.mo9533(c6332, mostSignificantBits >>> 32);
        c6332.f2169.mo9532((Buffer) c6332, (int) ((mostSignificantBits >>> 16) & 65535));
        c6332.f2169.mo9532((Buffer) c6332, (int) (mostSignificantBits & 65535));
        AbstractC6294.f17634.mo9529(c6332, leastSignificantBits);
        if (this.f17472.contains(EnumC6222.SMB_3_1_1)) {
            throw new UnsupportedOperationException("SMB 3.x support is not yet implemented");
        }
        c6332.m1463(C6332.f17676);
        c6332.m1463(C6332.f17676);
        Iterator<EnumC6222> it = this.f17472.iterator();
        while (it.hasNext()) {
            c6332.f2169.mo9532((Buffer) c6332, it.next().f17367);
        }
        int size = ((this.f17472.size() * 2) + 34) % 8;
        if (size > 0) {
            c6332.m9555(8 - size);
        }
        if (this.f17472.contains(EnumC6222.SMB_3_1_1)) {
            throw new UnsupportedOperationException("SMB 3.x support is not yet implemented");
        }
    }
}
