Can anyone tell me what the D3D Device Pointer is of this D3D Test Environment, I've found a few but they don't work. And I need someone who knows for sure that it's the pointer, so I can verify I was correct.
Thanks in advance
Edit: Realized after I posted how scummy this looks, you don't have to run the file... Just want the d3d device pointer.
~lilneo
Last edited by Obama; 10-25-2010 at 12:09 AM.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Then scan it T.T, it's just the d3d9 test environment Void posted a while back.
~lilneo
This works for all DirectX 9 devices - I've posted it before.
[php]
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for( ; *szMask; ++szMask, ++pData, ++bMask)
if(*szMask == 'x' && *pData != *bMask)
return false;
return (*szMask) == NULL;
}
DWORD FindPattern(DWORD dValor,DWORD dLer,BYTE *bMaskara,char * szMaskara)
{
for (DWORD i=0; i < dLer; i++)
if (bCompare((PBYTE)(dValor + i), bMaskara, szMaskara))
return (DWORD)(dValor + i);
return false;
}
DWORD dwDXDevice = FindPattern((DWORD)GetModuleHandle("d3d9.dll"), 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86", "xx????xx????xx");
[/php]
The virtual table functions can be found by adding 2 to the device pointer (ie, (dwDXDevice + 2))
Not sure who made the bCompare and FindPattern functions, but credits to them.
--
How are you trying to hook it - that may be your problem.
Its on the environment itself. The address is right there where u run the environment. You don't even need to search for it if you don't want to.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
The way I do it is set a breakpoint on IDirect3D::CreateDevice and check the stack window in olly for the device, since one of the parameters is the device itself.
I am using Void's hooking code, https://www.mpgh.net/forum/31-c-c/125...3ddevice9.html
It said Device... I didn't think it meant the pointer?
But how do you find IDirect3D::CreateDevice? Or are you using the command line? Like
Okay, so I tried the hook with the "d3ddev" given inside the app, and it just crashes too.Code:bp IDrect3D::CreateDevice
~lilneo
Last edited by lilneo; 10-25-2010 at 08:54 AM.
Okay so the pointer was posted with the initial post of this environment, failme. It was also the pointer in Void's hooking code. The pointer is 0x40CE08, is anyone able to tell me how I could get to this pointer?
Also, when I use the code Void posted, to hook the test environment. It says Hooked, then crashes.
~lilneo
Last edited by lilneo; 10-28-2010 at 12:14 AM.