for (int i = 0; i <= MessageLen - 2; i++) // -2 characters from message length for null terminator...
The null terminator is only one byte. This would be better written as...
for (int i = 0; i < MessageLen - 1; i++) // -1 characters from message length for null terminator...
So you expected to see at least 1600 bytes used by this code? But you think you are safe because the compiler only reports 977 in use? I'm sorry to say that this is a "local variable" and must fit into the 7215 available. And you don't get to use all of that because you have other local variables, such as Message[], which could fill up all your available memory on its own, since you never check its size is reasonable.
It would be really helpful to see the declaration of BitMask[][] right now. And what is the contents of Msg? You are treating it like it's binary but I suspect you have characters there. So you're only able to access a couple of bytes within BitMask.