Malfunction of electronic stability control while in 4x4 driving in heavy snow. Almost hit a light pole, could have caused significant harm. Unknown. No. No precursors. Hit a pot hole while on the on ramp unloading the suspension and the truck started to yaw clockwise. Applied throttle to have front end pull truck straight. ESC applied brakes and chopped power inducing a significant yaw rate counterclockwise driving the rear of the truck into the hard snow bank perpendicular to vehicle travel. Another excessive clockwise yaw occurred at this time. NO throttle control and brakes unresponsive. 1. Had the driver been allowed to retain throttle control upon initial yaw this was easily recoverable. 2. Anti-lock brakes, needed to be disabled so the truck could slide across the snow and not into the ditch when the second clockwise yaw started. 3. This caused minor body damage to the vehicle.