In the normal setting $n=pq$ is public knowledge and $\varphi(n)$ *is hidden*, for a start. I will assume $$ed\equiv 1 \pmod {\varphi(n)}\quad(1).$$ Since $$\varphi{(n)} = (p - 1)(q - 1) = pq - p - q + 1 = (n + 1) - (p + q)$$ Also, $n = pq$ and some manipulation gives $$n = p \left ( n + 1 - \varphi{(n)} - p \right ) = -p^2 + (n + 1 - \varphi{(n)})p$$ and then $$p^2 - (n + 1 - \varphi{(n)})p + n = 0$$ which can be solved by the quadratic formula for $p.$ In conclusion, knowledge of $\varphi{(n)}$ allows one to factor $n$ in constant time. But we don’t know $n$ and we only know $ed-1=k\varphi(n)$ for some positive integer $k$ from (1). We can look for small divisors of $ed-1,$ since $k$ may have small divisors in an attempt to find $\varphi(n).$ This may give us a few small divisors but it may not be enough to determine $\varphi(n).$ However [see comments] this actually leaves only a few possibilities for $k$ and thus for we can quickly determine $\varphi(n)$.