Cant boot Inspiron M5040 to its factory restore option

I have a Dell Inspiron M5040 that is having issues booting. When it gets to the logon screen it throws up a dialog titled LogonUI.exe -Bad Image and references file RpcRtRemote.dll as bad or not for this version of Windows. If I click OK it throws up another dialog titled USERENV.dll - Bad Image with basically the same info as the first dialog but referencing a different file. At this point the machine sits at a black screen and the machine is unusable.

I have managed to gain access to the Task Manager after the first dialog and then gotten explorer.exe to run but the system is very buggy in this state. I have managed to run chkdsk /F /R and the results showed no issues. I was then able to run sfc after booting off of a retail Windows 7 DVD and selecting Repair my computer and then selecting the Command prompt. sfc said there were problems but it could not repair them.

So, I tried to start the machine and hit F8 to drop me into the Advanced Boot Options menu and then selected the Repair my computer option to take me to the option to reinstall the machine back to factory state but I get an error instead saying it can't load due to a missing device or something of that nature.

I know the DELLUTILITY and Restore partitions are still on the drive and I can gain access to see the files in these partitions by booting from a LiveCD (Ubuntu) so I was wondering if EasyRE would be able to fix the MBR, BootSector or the BCD so that I can boot the machine up and have access to the factory install option.

In short I am asking if EasyRE can put the drive boot options back to the way it was from factory so I can boot to the Repair my computer option and then have access to do a factory reinstall.

Any and all comments greatly appreciated.