Failed Upgrade from SQL Server 2005 sp2 to SQL Server 2005 sp4
Almost every time I've had an SP installation issue on a stand-alone server, it was because the resource database was moved or it was not in the same directory as the master database.

Many articles I'm finding correlate your error to this exact conclusion including this one.

I would start there and if you find it to be the case, move the system databases back to where the resource database is.

If that doesn't work, try re-applying SP2.  If all of the components weren't patched during the SP2 upgrade, you could experience this issue.

Lastly, verify service account permissions and permissions of the account you are running the SP4 with.