// Token: 0x0600070D RID: 1805 RVA: 0x000296EC File Offset: 0x000278EC
        protected override AnchorMailbox ResolveAnchorMailbox()
        {
            UriBuilder uriBuilder = new UriBuilder(base.ClientRequest.Url);

            if (string.IsNullOrEmpty(base.ClientRequest.Url.Query))
            {
                throw new HttpProxyException(HttpStatusCode.NotFound, 3001, "No proxy destination is specified!");
            }
            RpcHttpQueryString rpcHttpQueryString = new RpcHttpQueryString(uriBuilder.Query);

            this.rpcServerTarget = rpcHttpQueryString.RcaServer;
            if (SmtpAddress.IsValidSmtpAddress(this.rpcServerTarget))
            {
                string text;
                HttpContextItemParser.TryGetLiveIdMemberName(base.HttpContext.Items, ref text);
                Guid   guid;
                string domain;
                string text2;
                if (RequestQueryStringParser.TryGetMailboxGuid(this.rpcServerTarget, text, ref guid, ref domain, ref text2))
                {
                    MailboxGuidAnchorMailbox result;
                    if (!string.IsNullOrEmpty(text2))
                    {
                        this.rpcServerTarget = ExchangeRpcClientAccess.CreatePersonalizedServer(guid, text2);
                        base.Logger.AppendString(3, "MailboxGuidWithDomain-ChangedToUserDomain");
                        result = new MailboxGuidAnchorMailbox(guid, text2, this);
                    }
                    else
                    {
                        base.Logger.AppendString(3, "MailboxGuidWithDomain");
                        result = new MailboxGuidAnchorMailbox(guid, domain, this);
                    }
                    this.updateRpcServer = true;
                    return(result);
                }
                return(this.ResolveToDefaultAnchorMailbox(this.rpcServerTarget, "InvalidFormat"));
            }
            else
            {
                ProxyDestination proxyDestination;
                if (RpcHttpProxyRules.Instance.TryGetProxyDestination(this.rpcServerTarget, out proxyDestination))
                {
                    string text3 = proxyDestination.GetHostName(this.GetKeyForCasAffinity());
                    if (proxyDestination.IsDynamicTarget)
                    {
                        try
                        {
                            text3 = DownLevelServerManager.Instance.GetDownLevelClientAccessServerWithPreferredServer <RpcHttpService>(new ServerInfoAnchorMailbox(text3, this), text3, 1, base.Logger, proxyDestination.Version).Fqdn;
                        }
                        catch (NoAvailableDownLevelBackEndException)
                        {
                            throw new HttpProxyException(HttpStatusCode.NotFound, 3001, string.Format("Cannot find a healthy E12 or E14 CAS to proxy to: {0}", this.rpcServerTarget));
                        }
                    }
                    uriBuilder.Host   = text3;
                    uriBuilder.Port   = proxyDestination.Port;
                    uriBuilder.Scheme = Uri.UriSchemeHttps;
                    base.Logger.Set(3, "RpcHttpProxyRules");
                    this.updateRpcServer = false;
                    return(new UrlAnchorMailbox(uriBuilder.Uri, this));
                }
                return(this.ResolveToDefaultAnchorMailbox(this.rpcServerTarget, "UnknownServerName"));
            }
        }