You can download the missing d3dx9_31.dll file from the link provided below:

http://www.d3dx9.net/download-missing-d3dx9_31-dll/

After downloading the missing d3dx9_31.dll file, restore this...