Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Array-Of-Byte Scan

Array-Of-Byte Scan

Posts 1–8 of 8 · Page 1 of 1
master131
[MPGH]master131
Array-Of-Byte Scan
I've been playing with WinAPI today and I was wondering if there is a way to search for an array of bytes in a process' memory. I've tried coding my own one but it didn't work (kept returning the starting address I specified).

Anyone got ideas? btw, these are not assembly bytes.

#1 · 15y ago
Void
Void
If ya' add me on MSN I can prolly help o:

davidm_44@hotmail.com

PS: opcodes are still part of memory and you see them in the hex-viewer, you just don't see the instructions.
#2 · 15y ago
freedompeace
freedompeace
Umm,
byte[] yourbytearray;

for (i = 0 ; i < maxaddress - length; i++)
if ((byte[]*)(i) == yourbytearray)
// match?
#3 · 15y ago
master131
[MPGH]master131
ugh, I tried and failed hardcore despite your help. It's alot easier in VB.
#4 · 15y ago
♪~ ᕕ(ᐛ)ᕗ
♪~ ᕕ(ᐛ)ᕗ
It's BYTE YourByteArray[<MaxLen>]...
And Just to make it easy make it viod*
Code:
BYTE B[] = {0x80, 0x8, 0xA4};
for(int i = 0; i < MaxAddie - Len; i++)
{
      if((void*)(i) == (void*)((BYTE*)B) //Result
}
#5 · 15y ago
master131
[MPGH]master131
Maybe I should've added that I'm not injecting a DLL to do this. I'm doing it externally via a Win32 C++ app.
#6 · 15y ago
Hell_Demon
Hell_Demon
ReadProcessMemory into an array then use this:

Code:
//credits to Dominik & Patrick

bool bDataCompare( const unsigned char* pData, const unsigned char* bMask, const char* szMask );
unsigned long dwFindPattern( unsigned char *bMask,char * szMask, unsigned long dw_Address = dwStartAddress, unsigned long dw_Len = dwLen );

bool bDataCompare(const unsigned char* pData, const unsigned char* bMask, const char* szMask)
{
    for(;*szMask;++szMask,++pData,++bMask)
        if(*szMask=='x' && *pData!=*bMask )
            return false;
    return (*szMask) == 0;
}

unsigned long dwFindPattern( unsigned char *bMask,char * szMask, unsigned long dw_Address = 0x00401000, unsigned long dw_Len = 0x00861FFF )
{
    for(unsigned long i=0; i < dw_Len; i++)
		if( bDataCompare( (unsigned char*)( dw_Address+i ),bMask,szMask) )
            return (unsigned long)(dw_Address+i);
    return 0;
}
Substract the array start address off the address it returns, then add the start address of where you started reading and you'll have the offset in the games memory.

Code usage:
Code:
char lolwat[512] = {0,};
ReadProcMemory(0x1337, lolwat, 512);//i know this one is wrong, but you get the picture >.>
unsigned long foundAddy = dwFindPattern( "\x15\x20\x30\x40\x90","x?x?x", &lolwat, 512 );

foundAddy -= &lolwat;
foundAddy += 0x1337;
#7 · 15y ago
master131
[MPGH]master131
Alrighties all fixed. :3
#8 · 15y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

None