When dealing with isolated systems we are dealing with the microcanonical ensemble. In that case, we suppose that each individual microstate has the same probability.
So if $\Omega(E)$ is the number of states of energy $E$, since each has the same probability, we must have
$$P(E) = p \Omega(E),$$
where $p$ is the individual probability. Then we have
$$\frac{1}{p} = \sum_{E}\Omega(E)$$
the total number of microstates.
Now, suppose the system is composed of two parts $A$ and $B$ separated by a totally isolating wall.
In that case, consider the process on which the wall becomes diathermal. Thus energy exchange is allowed, until equilibrium is reached.
I'd like to understand how could one find the probability $P(E)dE$ that the energy of $A$ lies between $E$ and $E+dE$ after the process.
I mean, $A$ and $B$ are not isolated. In that case, the microcanonical ensemble techniques don't work for them, just for the composite system. But the energy of the composite system doesn't change.
So what should be done in a situation like this? How this probability can be found?