Skip to content

Conversation

@SubstituteR
Copy link

This resolves error 0x800700C1 in signtool if the PE was previously signed.

Currently only implemented for Variant 3.1 x64

Steps to reproduce:

Use Steamless to remove SteamStub from Oblivion Remastered
Attempt to sign the output binary with signtool
Receive error 0x800700C1
{C1E80824-AF87-4280-86F8-41D01CACFD1B}

This resolves error 0x800700C1 in signtool if the PE was previously signed.
@Aerocatia
Copy link

Aerocatia commented May 28, 2025

Since this is not merged, I will say you can also remove the cert with signtool first before unpacking it (signtool remove /s <exe>)
This makes sure you get a valid exe.

As you probably already know, the current version does not fix the cert offset after removing the .bind section causing it to be out of bounds. Removing it first is also probably cleaner since you don't end up with stale cert data left in the exe.

@GHFear
Copy link

GHFear commented Sep 27, 2025

This resolves error 0x800700C1 in signtool if the PE was previously signed.

Currently only implemented for Variant 3.1 x64

Steps to reproduce:

Use Steamless to remove SteamStub from Oblivion Remastered Attempt to sign the output binary with signtool Receive error 0x800700C1 {C1E80824-AF87-4280-86F8-41D01CACFD1B}

So this change just zeros the size and address from the Security Directory?
And then you can sign the exe again?

@SubstituteR
Copy link
Author

This resolves error 0x800700C1 in signtool if the PE was previously signed.
Currently only implemented for Variant 3.1 x64
Steps to reproduce:
Use Steamless to remove SteamStub from Oblivion Remastered Attempt to sign the output binary with signtool Receive error 0x800700C1 {C1E80824-AF87-4280-86F8-41D01CACFD1B}

So this change just zeros the size and address from the Security Directory? And then you can sign the exe again?

In my limited experience testing, yes.

From what I could find when trying to re-sign Oblivion, is that the Security Directory was being added, but pointing past the end of the binary, which is why SignTool wouldn't work with the executable.

@GHFear
Copy link

GHFear commented Oct 1, 2025

This resolves error 0x800700C1 in signtool if the PE was previously signed.
Currently only implemented for Variant 3.1 x64
Steps to reproduce:
Use Steamless to remove SteamStub from Oblivion Remastered Attempt to sign the output binary with signtool Receive error 0x800700C1 {C1E80824-AF87-4280-86F8-41D01CACFD1B}

So this change just zeros the size and address from the Security Directory? And then you can sign the exe again?

In my limited experience testing, yes.

From what I could find when trying to re-sign Oblivion, is that the Security Directory was being added, but pointing past the end of the binary, which is why SignTool wouldn't work with the executable.

I built a C++ web assembly application that you can use to unpack steamstub drm v3.
Added your signing fix to it: https://illusorytestbranch.netlify.app/
It's just in the early testing phase, but it seems to work well for most SteamStub v3 exes.
Thanks for figuring this out for signed exes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants