This poses an interesting and complex legal question. During the period when you developed the program as a hobby, it was your property, even if you did allow friends at work to use it. Subsequent development, where you've been working on revisions as part of your job, make that part of the whole work a "work for hire", which is the property of the company. It is not required that you get a pay raise, or have an explicit contract stating that the work you're doing for the company is software development.
The tricky part is the mixing of property interests. You retain copyright in the original code, but you've implicitly granted permission to use that code as a basis for further versions that were part of your job. So you can't prevent the company from using the current program, because the company holds copyright to the stuff they paid you to do. You might be able to yourself sell the current program, and you could certainly sell the hobby version. There is minor risk in selling the hobby version that the company would (incorrectly) maintain that you implicitly assigned your copyright in the original program to them, and you could duke it out in court and win since copyright transfer has to be in writing. It's highly unlikely that they would go to court to stop you selling your original program, but management could be misinformed and think that they can do that and could threaten you accordingly. Your lawyer would set them straight on that point. The problem is the current version.
17 USC 106 says that the owner of copyright has the various rights (owner of the right, not creator of the work). 17 USC 201(b) says that
In the case of a work made for hire, the employer or other person for
whom the work was prepared is considered the author for purposes of
this title, and, unless the parties have expressly agreed otherwise in
a written instrument signed by them, owns all of the rights comprised
in the copyright.
17 USC 201(a) says
Copyright in a work protected under this title vests initially in the
author or authors of the work. The authors of a joint work are
coowners of copyright in the work.
You are obviously the author and rights-owner of the basic code, and the company is the "author" and rights-holder of the added code. So this is a joint work, the you (and the company) are co-owners of the whole final product (you own disjoint portions). 17 USC 201(d)(2) says
The owner of any particular exclusive right is entitled, to the extent
of that right, to all of the protection and remedies accorded to the
copyright owner by this title.
which means you can sell your part, or license its use. Either owner can register and enforce copyright in a joint work, and the owners have an equal interest in profits from selling the work. If the company could not possibly have an interest in trying to distribute the revised program elsewhere, then there may not be any point in trying to sort out this joint ownership. However, as a co-owner of the work, either one can grant a non-exclusive license to use the work. It's enough of a mess to warrant a visit to an attorney.