Raised This Month: $51 Target: $400
 12% 

GetDllMemInfo() Failed


Post New Thread Reply   
 
Thread Tools Display Modes
mikey_trw
Junior Member
Join Date: Jul 2005
Old 05-22-2008 , 09:50   Re: GetDllMemInfo() Failed
Reply With Quote #11

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!
mikey_trw is offline
Send a message via MSN to mikey_trw
BAILOPAN
Join Date: Jan 2004
Old 05-22-2008 , 19:39   Re: GetDllMemInfo() Failed
Reply With Quote #12

Read the code -- 0x2A is not '?'
__________________
egg
BAILOPAN is offline
mikey_trw
Junior Member
Join Date: Jul 2005
Old 05-23-2008 , 07:36   Re: GetDllMemInfo() Failed
Reply With Quote #13

The code in the link you gave me has a slightly modified loop to find the signature in memory, instead of looking for a '?' in the mask, it looks for a '0x2A' in the signature:

Code:
for (size_t i=0; i<sig.memSize; i+=sizeof(unsigned long *))
{
	found = true;
	for (j=0; j<sig.siglen; j++)
	{
		if ( (pattern[j] != (char)0x2A) &&
			 (pattern[j] != paddr[j]) )
		{
			found = false;
			break;
		}
	}
	if (found)
	{
		sig.offset = (void *)paddr;
		break;
	}
	//we're always gonna be on a four byte boundary
	paddr += sizeof(unsigned long *);
}
__________________
If your a sucker for stupid viral trends, paste this into your sig!
mikey_trw is offline
Send a message via MSN to mikey_trw
mikey_trw
Junior Member
Join Date: Jul 2005
Old 05-26-2008 , 20:17   Re: GetDllMemInfo() Failed
Reply With Quote #14

Is there something you think needs changing? I still don't see it.

Sorry for the evil double posting, just kind of stuck at a bit of a roadblock here.
__________________
If your a sucker for stupid viral trends, paste this into your sig!
mikey_trw is offline
Send a message via MSN to mikey_trw
Fredd
Veteran Member
Join Date: Jul 2007
Old 07-21-2008 , 20:22   Re: GetDllMemInfo() Failed
Reply With Quote #15

mikey_trw@: have you ever got this working?
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode