a)
I jump at the offer !

Customs officers are entitled to give you a fine; most of the time, they seize the counterfeit item(s).
b)
It is a counterfeit handbag : I will not take it.

Counterfeiting is a plague, which rages in every field : effectless medicines, dangerous spare parts for cars, etc…
c)
I buy the whole stock : I will certainly find friends ready to buy them 40 € each.

You risk 2 years of prison plus a 150 000 € fine.
a)
New
b)
Non-obvious
c)
Susceptible of industrial applications

These three conditions are required : the invention is
- new when it is not part of the state of the art;
- inventive when the solution is not obvious to the man skilled in the art ;
- susceptible of industrial applications if it can be made or used in any kind of industry, including agriculture.
a)
By filing a patent application

Computer software can be protected as a patent in very exceptional cases, i.e. when it is required for the functioning of a patentable invention.
b)
By relying on the copyright

No filing is required in France. The protection by a copyright lasts 25 years as from the date of creation of the computer software.
c)
By giving a call to Bill Gates

Rumor has it that Bill Gates is always looking for new brains!