You might want to examine it closely with a magnifying glass to check for any infestation of insects or mites, but otherwise, the problems it has are probably cultural/environmental, partially from being mistreated in the ways you describe.
It's possible the brown edges are due to sitting behind a window with that many hours of sunlight - through glass, that ...
Obvious solution: eat one leaf. Does it taste like basil or like anything interesting at all? No? Then it's a weed.
There's the Edibility Test for doing this in the wilderness much more carefully. But in civilization worst that can happen is bad stomach. Bad come to worst visit the GP. If it's some sort of "fake basil" it's probably just grass.