Solved mbi.regionSize vs si.pageSize

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
Soooo when you call GetSystemInfo() and get the SYSTEM_INFORMATION structure it has a pageSize variable.
When you get the MEMORY_BASIC_INFORMATION structure using VirtualQuery() it has a regionSize variable.

Now it appears to me that these 2 variable will always be the same, i.e. memory regions will always be the same size as the pageSize.

I wrote my original codenz that incorporates both, just to be safe but I think it's probably a waste of time/code

What do you think?
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
si.PageSize is simply that, the number of bytes each page takes up

mbi.RegionSize however is described as "The size of the region beginning at the base address in which all pages have identical attributes, in bytes.", so, should the next 3 pages have the exact same attributes, then it should be that all 3 pages will be included in region size.

This is normally the same as calling VirtualProtect(Ex) on any part of a page will mark the entire page, but there are chances it won't be the same
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
ahhh my reading skills failed me, thanks for explaining. Just to see it for myslef I ran a test and very often the regionsize encompassed multiple pages
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
Also of note, when I run my external pattern scan reading 1 page at a time it takes 399 milliseconds. When I read 1 region at a time, it takes 5 milliseconds! Scanning 1 region at a time is 100 times faster than scanning 1 page at a time! All the overhead of virtualprotect and readprocessmemory really adds up!
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods