gbhv icon indicating copy to clipboard operation
gbhv copied to clipboard

Wrong loop logic when using LDE

Open CySHell opened this issue 4 years ago • 3 comments

Inside ept.c, when counting the number of instruction bytes at the start of the hooked function, the instruction pointer is not incremented - this results in counting the length of the same instruction over and over again.

SizeOfHookedInstructions += LDE(TargetFunction, 64))

should be changed to something like:

SizeOfHookedInstructions += LDE(TargetFunction + SizeOfHookedInstructions, 64))

CySHell avatar Feb 22 '21 08:02 CySHell

Hey there, great find! Looks like it was overlooked but generally didn't have any issues because only one instruction's space was necessary for the example.

Could you submit a pull request so I can merge it into the main branch?

Thanks!

Gbps avatar Feb 22 '21 15:02 Gbps

Sure, please give me authorization to create a pull request.

CySHell avatar Feb 23 '21 09:02 CySHell

Sorry, I know this was from awhile ago, but anyone should be able to open a pull request and I can review it.

Gbps avatar May 04 '21 21:05 Gbps