GetAddress.h Module Address Offset Retreiver

Posts 1–14 of 14 · Page 1 of 1
GetAddress.h Module Address Offset Retreiver
Okay so for all the people that know more than me, try not to kill me. I am simply posting this for other users because I had a lot of trouble getting it to work myself.

Now, in DLL injection there is direct pointer writing, where you can write the value of an address directly. Now have you ever used cheat engine to find a value, and it has the address "client.dll+12345" or something like that, and you are thinking what the hell? Well this is a basic header file + function that can be used to retrieve that address.

Code:
//GetAddress.h Made by lilneo
DWORD GetAddress(DWORD addie, LPCSTR module)
{
	if(GetModuleHandle(module)!=NULL)
	{
		DWORD addie1=(DWORD)GetModuleHandle(module);
		DWORD addie2=addie;
		DWORD address = addie1+addie2;
		return address;
	}
	else
	return NULL;
}
I made it super simple, all you have to do is say we want a pointer to our address engine.dll+23456

Code:
DWORD* OurAddress = (DWORD*)GetAddress(0x53456,"engine.dll");
and viola, when you change *OurAddress it will write directly to whatever address specified.

Note: I know this is a SUPER simple method, but when I first attempted it I had more trouble than I hoped.

~lilneo
Shouldn't you also just add the counterpart of that, "GetOffset"? Just for the heck of it. /
사랑 해요. .
Quote Originally Posted by Kallisti View Post
사랑 해요. .
Tits or gtfo.
~lilneo
Why you wrote else?
Isn't it useless?
No, it will return just the offset if I don't write else (if the module is not found). Since I wrote else, it returns null that way.
~lilneo
Quote Originally Posted by lilneo View Post
No, it will return just the offset if I don't write else (if the module is not found). Since I wrote else, it returns null that way.
~lilneo
nah, the else is useless, get rid of it and it will still work
Quote Originally Posted by qwerty01 View Post
nah, the else is useless, get rid of it and it will still work
Actually, now that I look at it a bit, I suppose the else is kinda useless. The return NULL is good though just to be safe.
~lilneo
C++ Snippets vault?

Just a thought
/
Quote Originally Posted by NextGen1 View Post
C++ Snippets vault?

Just a thought
/
Whatever anyone wants to do with it, I had trouble so I figured I'd share for anyone else who might have trouble
~lilneo
i meant when you post small snippet it should be in the vault. no need for a whole thread
cmp x, 0
je xx
code that executes if the module handle wasnt 0
xx:
code that executes if 0

jmp would always go past the code between the if's so it doesn't matter
Quote Originally Posted by Hell_Demon View Post
cmp x, 0
je xx
code that executes if the module handle wasnt 0
xx:
code that executes if 0

jmp would always go past the code between the if's so it doesn't matter
HD knows assembly. ;D
Quote Originally Posted by Void View Post
HD knows assembly. ;D
I don't, just able to read it and write extremely basic noob stuff ;D
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us