Novel Techniques in Recovering Embedding and Enforcing Policies for Control-Flow Integrity