Einstein did not write E=mc2 in the 1905 paper. He concluded that if a body gives off energy L as radiation, its mass diminishes by L/c2. The familiar rest-energy form is the same claim in modern notation.
In a frame where the system moves, the same algebra relates relativistic energy and relativistic mass. The seed entry treats the rest-energy statement.