Repository navigation
Conversation
…he walk cannot settle repframecopy's argument_block takes the call's calleeargs window (what the callee's reached returns pop, or the caller removes after the call) as the pop releasing the block when neither a stated extrapop nor the purge walk gives one. A __thiscall method ending in ret 0x20 that calls a helper the walk cannot read kept the copy as a loop and printed with no arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When repframecopy expands a block on the call's calleeargs window alone, it states that pop on the call, and states that the earlier call whose pushes the block reuses pops only its return address. The solver otherwise guessed that call popped its pushes and placed the block's reads 12 bytes too high, in the caller's parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A by-value struct that MSVC copies with
rep movsdover an earlier call's deferred pushes is dropped from the__thiscallcall it feeds:With this change:
Fix
repframecopy'sargument_blockfalls back to the call'scalleeargswindow as the pop that releases the block when there is no stated pop and the purge walk cannot settle the callee. The window is what the callee's reached returns pop (ret 0x20) or what the caller removes right after the call.Tests
tests/stages/kuna-repframecopy.xmlgainsREPFRAMECOPY #14on the new clean-room fixturebyvalreuse_pe_i386.exe.byvalcopies a 32-byte struct into a block that reuses a__cdeclcall's 12 bytes of pushes, then calls a__thiscallmethod ending inret 0x20that hands its argument's address to a helper called through a pointer.REPFRAMECOPY #14fails onmain.python -m scripts.prepr.aritydiffagainstmain:push 8; push esi; mov ecx,edi; call f(ret 8), which printed with onlythis. Some of these also take the/GScookie, which [AUTOMATED] Keep the MSVC frame cookie out of a call's stack arguments #1594 removes.decompile-alltime is unchanged.Fixes #1597
🤖 Generated with Claude Code