Thanks for the links, i used the second one since it seemed to be most similar to the code i'm already using, and it seems to be working, gets through the loops without crashing, but it isn't finding the signature and just returns null. I'm probably just calling it in some stupid way, heres what im trying to do:
Using this signature for changing a players team:
Code:
char sigString[] = "\x83\xEC\x10\x56\x57\x8B\x7C\x24\x1C\x57\x8B\xF1\xE8\x7F\xE8\xF9\xFF\x83\xC4\x04\x85\xC0\x0F\x84\xEA\x00\x00\x00\x83\xFF\x03\x74\x09\x83\xFF\x02\x0F\x85\xDC\x00\x00\x00\x8B\xCE\xE8\xAF\x22\xE1\xFF\x3B\xF8\x0F\x84\xDC\x00\x00\x00\x57\x8B\xCE\xC6\x86\x14\x0E";
char mask[] = "xxxxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxx????xxxxxxxxxxxxx??";
Since the loop in this code doesnt use a separate mask i go through the sig replacing the appropriate bytes with the 'wildcard':
Code:
for (int i=0; i<64; i++) {
if (mask[i] == '?'){
sigString[i] = (char)0x2A;
}
}
Then i call the function in CSigMngr to return the pointer to the function i want:
Code:
void * theAddress = g_SigMngr.ResolveSig( (void *)g_SMAPI->serverFactory(false), sigString, 64);
And thats as far as i get, the return value is null. Have spent some time debugging and it definitely is getting to the loop and is searching through memory, just doesnt find anything of use. The few choice prints ive thrown into the loop tell me that it never finds more than 3 characters which match the signature. Please help to put me out of my misery
__________________
If your a sucker for stupid viral trends, paste this into your sig!