I am attempting to implement an anti-analysis technique where some key functions are encrypted and only decrypted before usage and then encrypted again. So my implementation involves having an array which will hold the function addresses and length which the external crypter will use to identify and encrypt said functions.
My problem is the compiler keeps using the values in the array as constants instead of accessing the which makes the crypter unable to located the functions and so on, I've tried several compiler options but none does what I am looking for. I am looking for the way to make it so the function array to have a single copy and not be inlined because currently.
Edit: Compiler is VS2019 Edit 2: Clarifying the problem