.mix file:
JassFinder.zip
How to use:
- Just extract it on your war3 folder and start the war3, it will generate instantly an file named Functions.txt on your war3 folder
List generated with it:
http://www.garenamaster.com/war3jass/24b.txt
http://www.garenamaster.com/war3jass/24c.txt
http://www.garenamaster.com/war3jass/24d.txt
http://www.garenamaster.com/war3jass/24e.txt
http://www.garenamaster.com/war3jass/25b.txt
http://www.garenamaster.com/war3jass/26a.txt
Thanks to YourName and n00b32 that give me the base to do it...
Just an tip to developers:
I did an class based on it that populate an list with the offset and jass name, with that you can just do an function like CJass->find("CreateUnit") to return the offset of this jass, its really simple and usefull to make hacks to work with every war3 version with no much code ^^
DLL Source (Originally generated with Visual Studio 2010):
Code:// dllmain.cpp : Defines the entry point for the DLL application.#include "stdafx.h" #include <Strsafe.h> #include <direct.h> bool bDataCompare(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 dwFindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) { for(DWORD i=0; i < dwLen; i++) { if(bDataCompare((BYTE*)(dwAddress+i ),bMask,szMask)) { return (DWORD)(dwAddress+i); } } return 0; } //--------------------------------------------------------------------------- BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { FILE *pFile; char path[MAX_PATH]; sprintf(path, "%s\\Functions.txt", getcwd(NULL,MAX_PATH)); DeleteFileA(path); pFile = fopen (path,"a"); int factor; int interval = 5; DWORD g_dwGameBase = (DWORD) GetModuleHandle("game.dll"); DWORD list1 = dwFindPattern(g_dwGameBase,0xA6BFFF,(BYTE*)"\xB0\x00\xFF\xFF\x68\x00\x00\x00\x00\xBA\x00\x00\x00\x00\xB9\x00\x00\x00\x00\xE8\x00\x00\x00\x00", "x?xxx????x????x????x????"); DWORD list2 = dwFindPattern(g_dwGameBase,0xA6BFFF,(BYTE*)"\xCC\xE8\x00\x00\x00\x00\x68\x00\x00\x00\x00\xBA\x00\x00\x00\x00\xB9\x00\x00\x00\x00", "xx????x????x????x????") + 2; if (list1 == 0 || list2 == 0) { MessageBox(NULL, "war3 version not supported??", "", 0); } DWORD searchBase[2] = {list1, list2}; for (int i = 0; i < 2; i++) { factor = 0; while(1) { BYTE SIGNTEST = *(BYTE*)(searchBase[i]-1+(1*interval) + factor); if (SIGNTEST != 0x68) // if params is different from PUSH, then the list is finished { break; } //DWORD ignore = *(DWORD*)(searchBase[i] + (0*interval) + factor); DWORD params = *(DWORD*)(searchBase[i] + (1*interval) + factor); DWORD name = *(DWORD*)(searchBase[i] + (2*interval) + factor); DWORD address = *(DWORD*)(searchBase[i] + (3*interval) + factor); char text[MAX_PATH]; sprintf(text, "\"%s\" located at 0x%X with parameters \"%s\"\n", &(*(char**)name), address, &(*(char**)params) ); fputs(text, pFile); factor = factor + 0x14; // go to next block } } fclose(pFile); break; } case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }


LinkBack URL
About LinkBacks
Reply With Quote




