This appears to be criminal infringement. I'm going to try to point to the places in the law that make this illegal, step by step.
17 U.S. Code § 106 - Exclusive rights in copyrighted works says:
Subject to sections 107 through 122, the owner of copyright under this title has the exclusive rights to do and to authorize any of the following:
(2) to prepare derivative works based upon the copyrighted work;
The definition of a derivative work is here:
A “derivative work” is a work based upon one or more preexisting works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which a work may be recast, transformed, or adapted. A work consisting of editorial revisions, annotations, elaborations, or other modifications which, as a whole, represent an original work of authorship, is a “derivative work”.
This seems to apply to what you're doing - you're modifying the original work to create a new one.
According to 17 U.S. Code § 501:
Anyone who violates any of the exclusive rights of the copyright owner as provided by sections 106 through 122... is an infringer of the copyright
Since you don't have permission to create a derivative work (and don't seem to qualify for an exception like fair use), you're infringing the owner's exclusive right to do this. You are therefore officially infringing.
Not all infringement is criminal - but it appears yours is. 17 U.S. Code § 506 - Criminal offenses says:
In general.—Any person who willfully infringes a copyright shall be punished as provided under section 2319 of title 18, if the infringement was committed—
(A) for purposes of commercial advantage or private financial gain;
You say you're selling it, so almost certainly it's for private financial gain, and I can't describe your infringement as anything but willful. So you appear to qualify for criminal charges, if the federal government felt like prosecuting you.
If you look at 18 U.S. Code § 2319, you can see the penalty is as follows:
Any person who commits an offense under section 506(a)(1)(A) of title 17—
(1) shall be imprisoned not more than 5 years, or fined in the amount set forth in this title, or both, if the offense consists of the reproduction or distribution, including by electronic means, during any 180-day period, of at least 10 copies..., of 1 or more copyrighted works, which have a total retail value of more than $2,500;
(2) shall be imprisoned not more than 10 years, or fined in the amount set forth in this title, or both, if the offense is a felony and is a second or subsequent offense under subsection (a); and
(3) shall be imprisoned not more than 1 year, or fined in the amount set forth in this title, or both, in any other case
So, on a first offense, it's up to 5 years in federal prison assuming you're doing at least 10 copies and $2500 worth of infringing software per 180 days, and up to 1 year in federal prison if you're doing less business than that.