avast does not do reverse engineering to reach the code of course.
But avast scans the final code and can “see” what it does.