A two-component model of impulsive microwave burst emission consistent with soft and hard X-rays