Can the liver still repair itself after drinking and smoking moderately for almost 10 years?

Yes. The liver constantly repairs itself. It's the only organ in our body where you can remove over 60 % of the organ and it will regenerate to a near normal size after 3-6 months. In order to be able to do this, the architecture of the liver needs to be preserved. For this reason a cirrhrotic liver is unable to regenerate normally.
Yes. Tobacco does not directly affect the liver. Excessive alcohol use can damage the liver and cause cirrhosis. Liver damage can be reversed by abstaining from alcohol. Cirrhosis is not reversed by abstaining, but further damage can be avoided. Even moderate alcohol use can damage the liver in patients with pre-existing liver disease, such as chronic viral hepatitis or cirrhosis from other causes.