In Computational Complexity -- A Modern Approach, by Arora and Barak, they have the following claim (Example 3.6).
Let EXPCOM be the following language $$ \{ \langle M, x, 1^n\rangle \mid M \text{ outputs 1 on $x$ within $2^n$ steps} \} $$ Then $\mathbf{P}^{\mathrm{EXPCOM}} = \dots = \mathbf{EXP}$. [...]
Clearly, an oracle to EXPCOM allows one to perform an exponential-time computation at the cost of one call, and so $\mathbf{EXP} \subseteq \mathbf{P}^{\mathrm{EXPCOM}}$. [...]
I believe their reasoning is as follows:
Suppose we have a language $L \in \mathbf{EXP}$.
Thus there is a TM $M$ that decides it in time $2^{n^c}$.
We want to create a poly-time oracle-TM $T^{\mathrm{EXPCOM}}$ that decides $L$.
$T$ works as follows on input a string $x \in \{ 0, 1 \}^{*}$. It queries its EXPCOM oracle on input $\langle M, x, 1^{n^c} \rangle $, and outputs the same answer as the oracle.
Clearly $T$ runs in polynomial time, and it decides the same language as $M$. QED.
Here is my confusion. For $T$ to call its EXPCOM oracle, it needs to know which $M$ that decides $L$ (in exponential time). However, 2. only promises the existence of a machine $M$; it doesn't actually tell you how to find it! (this problem also applies to the running time $2^{n^c}$ of $M$).
So clearly I'm misunderstanding something, but what? Is it my understanding of the language EXPCOM? Is it my description of $T$? Or have I misunderstood oracle-TMs altogether? (Or maybe all three?)