Skip to content

Commit

Permalink
Extended offset accepted range of _EPROCESS from 0x400 to 0x600.
Browse files Browse the repository at this point in the history
UniqueProcessIdOffset is currently at 0x448 on the latest Windows update.
  • Loading branch information
Ou7law007 authored Apr 24, 2022
1 parent 06a6e45 commit 4091c6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MemoryController.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,13 @@ static MemoryController Mc_InitContext( CapcomContext** CpCtxReuse = 0, KernelCo
uint64_t Pid = k_PsGetProcessId( Controller.CurrentEProcess );

uint32_t PidOffset = *( uint32_t* ) ( ( PUCHAR ) k_PsGetProcessId + 3 );
if ( PidOffset < 0x400 && *( uint64_t* ) ( Controller.CurrentEProcess + PidOffset ) == Pid )
if ( PidOffset < 0x600 && *( uint64_t* ) ( Controller.CurrentEProcess + PidOffset ) == Pid )
{
Controller.UniqueProcessIdOffset = PidOffset;
Controller.ActiveProcessLinksOffset = Controller.UniqueProcessIdOffset + 0x8;
}

for ( int i = 0; i < 0x400; i += 0x8 )
for ( int i = 0; i < 0x600; i += 0x8 )
{
uint64_t* Ptr = (uint64_t*)(Controller.CurrentEProcess + i);
if ( !Controller.UniqueProcessIdOffset && Ptr[ 0 ] & 0xFFFFFFFF == Pid && ( Ptr[ 1 ] > 0xffff800000000000 ) && ( Ptr[ 2 ] > 0xffff800000000000 ) && ( ( Ptr[ 1 ] & 0xF ) == ( Ptr[ 2 ] & 0xF ) ) )
Expand Down

0 comments on commit 4091c6b

Please sign in to comment.