Yes, it can be done.
However, when people work together they try to make it easy, not hard to de compile and debug. I recall some 'tricks' that are used to make code more dense and it also makes it harder to debug. One is to use instructions that are not documented in the standard literature.This is done at the machine code level, or by an assembly make for that kind for trickery.
Another is to enter a procedure at a point that should be wrong. Some modes do not allow that, but older CPU designs did allow that kind of foolishness.
An other is to use some instructions that will change the flags in the accumulator. This will confuse anybody wanting to understand the logic.
More extreme is encrypted code that unlocks itself just before it is used and then goes back to the way it was. I I knew how that is done I could not tell you because they would kill me when they found out who I am.
Another is to have a special custom CPU that is made for super secret aplications.
It looks like a normal CPU but...
Wait... Somebody is pounding on the door - be back in a jiff.
s