Q:

How did Energia Buran handle center of mass during flight?

The American STS Space Shuttle had the engines that provided a large portion of its thrust mounted directly on the shuttle itself.  The Space Shuttle Main Engines (SSME) were designed to be reusable and were put on the orbiter to be recovered.  Because the shuttle was side-mounted on the External Fuel Tank, the SSMEs had to gimbal as much as 10 degrees to accommodate for the offset center of mass.  If this wasn't done, the stack would tip over and likely spin catastrophically out of control.
The Buran mounted on the Energia had a different design from the STS stack.  The Buran Orbiter itself didn't provide the main thrust to get itself to space (I believe it only provided a bit of thrust at the end to adjust and reach its orbit.)  The main engines were instead that of the Energia rocket.
How did the Energia rocket compensate for the offset center of mass?  Via gimbaling of the engines on the Energia, or some offsetting design in the rocket itself?

A:

The "A" blocks (i.e. the side boosters, there are 4 of them) are offset over the center of mass in the direction opposite to the payload (rus1)
The engines of the "C" block (the main body) are also offset a bit.
A quite advanced control system for the time, that calculates and adjusts the mathematical model of the whole system during the flight and controls the engines in order to compensate for the asymmetry (rus2).

At the 05/15/1987 "polyus" (w/o the buran shuttle) video, you can see that the rocket pitched at 3 degrees at the initial takeoff seconds before the control system took control. However the computer managed to compensate the asymmetry in the end.

