Skip to content

Instantly share code, notes, and snippets.

@TheGreatSageEqualToHeaven
Created July 6, 2026 01:45
Show Gist options
  • Select an option

  • Save TheGreatSageEqualToHeaven/109871581b037be39bcf86af6cf8afee to your computer and use it in GitHub Desktop.

Select an option

Save TheGreatSageEqualToHeaven/109871581b037be39bcf86af6cf8afee to your computer and use it in GitHub Desktop.
Portal Patch
  1. Download and open HxD.
  2. Open the original engine.dll in HxD.
  3. Go to Search -> Replace -> Hex-values.
  4. Search for 8B F1 E8 40 CD 05 00 8B 7D 10 83 F8 02 0F 94 C3.
  5. Replace with 31 C0 E9 2D 01 00 00 90 90 90 90 90 90 90 90 90.
  6. Use File -> Save as... and save it as engine.dll.

Reference: patching sub_1013BF40 result to successfully return always fixes the constant "No Steam logon\n" error. Meant for Portal Reloaded.

Python usage: python3 patch.py engine.dll

from pathlib import Path
import sys
old=bytes.fromhex("8B F1 E8 40 CD 05 00 8B 7D 10 83 F8 02 0F 94 C3")
new=bytes.fromhex("31 C0 E9 2D 01 00 00 90 90 90 90 90 90 90 90 90")
d=Path(sys.argv[1]).read_bytes()
Path("engine.dll").write_bytes(d.replace(old,new,1))
@XT3RM1N8R

Copy link
Copy Markdown

OMG thank you!

I thought I should say something because this seems like too much work and kind of shady at first but it's legit!

@AppalachianMounta1n

Copy link
Copy Markdown

Just to note, as of 8/29/2026 8B F1 E8 40 CD 05 00 8B 7D 10 83 F8 02 0F 94 C3 is not found within the original engine.dll file

@dikiyshakal15

Copy link
Copy Markdown

Just to note, as of 8/29/2026 8B F1 E8 40 CD 05 00 8B 7D 10 83 F8 02 0F 94 C3 is not found within the original engine.dll file

Perhaps you forgot to switch the search mode to hex values.

@AppalachianMounta1n

Copy link
Copy Markdown

It was in hex mode and still didn't find it.

@dikiyshakal15

dikiyshakal15 commented Sep 16, 2026 •

Copy link
Copy Markdown

It was in hex mode and still didn't find it.

Can you share your engine.dll file?
I'm not sure, but this fix was created for the portal reloaded modification, not for portal and portal 2.
And also try to run verifying integrity of files in steam client

@AppalachianMounta1n

Copy link
Copy Markdown

It's worth noting my friend and I did end up finding a solution and beating it but I believe it was a firewall rule and making certain files read-only. I don't have a way to share the file but I just checked it again and there's nothing matching that hex.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment