thanks
BOOL bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for (;*szMask; ++szMask, ++pData, ++bMask)
{
if (*szMask == 'x' && *pData != *bMask)
return 0;
}
return (*szMask) == NULL;
}
DWORD PointerFindPattern(DWORD dwStartAddress, DWORD dwSize, BYTE *bMask, char * szMask, int codeOffset, BOOL extract)
{
for (DWORD i = 0; i < dwSize; i++)
{
if (bCompare((BYTE*)(dwStartAddress + i), bMask, szMask))
{
if (extract)
return *(DWORD*)(dwStartAddress + i + codeOffset);
else
return (DWORD)(dwStartAddress + i + codeOffset);
}
}
return NULL;
}
static DWORD hDrawIndexPrimtive = NULL;
DWORD hD3D = NULL;
DWORD hCriticalSection = NULL;
do
{
hD3D = (DWORD)GetModuleHandle(XorStr("d3d9.dll"));
Sleep(100);
} while (!hD3D);
MEMORY_BASIC_INFORMATION D3D9Info;
VirtualQuery((void*)(hD3D + 0x1000), &D3D9Info, sizeof(D3D9Info));
if (!hDrawIndexPrimtive)
hDrawIndexPrimtive = PointerFindPattern((DWORD)D3D9Info.BaseAddress, D3D9Info.RegionSize, (PBYTE)"\x8B\x45\x00\xE9\x00\x00\x00\x00\x33\xDB\xE9\x00\x00\x00\x00\x53\xFF\x15\x00\x00\x00\x00\xE9\x00\x00\x00\x00", "xx?x????xxx????xxx????x????", 22, false); // Win10
if (!hDrawIndexPrimtive)
{
myprintf(XorStr("FATAL: hDrawIndexPrimtive failed, send your d3d9.dll from Windows\\SysWOW64 or Windows\\System32 folder to [Only registered and activated users can see links. Click Here To Register...] (I'll fix the bot for your version).\n"));
return EXIT_FAILURE;
}
Understandable, one more outdated/not working tutorial...Quote:
"LINK.EXE" is not an internal or external command, executable program, or batch file.