Q:

Are there any tools to extract basic blocks and CFG (Control Flow Graph) from executable files

I'm working on source code control flow obfuscation in native code such as C/C++.  I'm researching on some techniques which do it and resulting spaghetti code. 
But we want to evaluate compiled file and compare the original one with equivalent obfuscated one.  is there any tools to help us? 
there is some tools such as Underestand that extracts CFG from source code but we want extract CFG from .exe file. 
Thank you. 

A:

You can write a plugin for IDA Pro or Pin to analyze your program statically or dynamically respectively, to create a CFG.