memcmp multiple BYTEs, data type used?
Im trying to memcmp multiple BYTE's from ASM Instructions but my scanner
keeps coming up with nothing. The returning value from my function
indicates that the BYTEs are not being found.
Called with
const BYTE Pattern[] = {0x33,0xC0,0xF2,0xAE};
DWORD Address = FindPattern(Pattern,sizeof(Pattern));
Function(Shortend)
DWORD FindPattern(const BYTE* Pattern,SIZE_T PatternSize)
{
...
for(int i = 0;i < (ModuleSize - PatternSize);i++)
{
if(memcmp((void*)(ModuleBase + i),Pattern,PatternSize) == 0)
return ModuleBase + i;
}
return 0;
}
No comments:
Post a Comment