hello everyone, im new here. i just picked up a 91 celica st (4afe) for cheap a few days ago and am trying to figure out what i am looking at here

. i think it may be leftover aftermarket audio wiring since this thing came without any radio or anything. anyone know what any of this is -
there's a weird switch installed next to the shift nob:
some of those wires seem to run to this thing,
while the rest go out into the engine bay, where a single black wire was connected to the yellow wire in this picture (this is located in the very top left of the engine bay if standing in front of the car):
the remaining wires continue down the left side of the bay and lead to a single white wire connecting to something near the bottom of the left side:
also, there is an unrelated wire that comes from the right side of the engine and is connected under a screw (is this just a ground?):
okay that's all for the wiring part. now for the engine, which i fear might be in bad shape.
i have a high pitch whining/ringing/whistling sound above ~3000 rpm that only happens when the car is warm.
i also have a ticking sound (almost like cards against bike spokes) that may be coming from this thing. it is a compression tester that is hooked up to a short tube on the top left side of the engine. it seems to be leaking slowly. what's it even doing there?
and that's it for now.. sorry for the lengthy post, just trying to be thorough.
any help is appreciated