OldSchoolHack

Register / Login English

Unendlich Itmes - Mal wieder Altitude

icon Thread: Unendlich Itmes - Mal wieder Altitude

Join Date: Nov 2011

Posts: 65

mhm...kann immer noch nichts finden (?)
CPP Code:
  1. #include "windows.h"
  2. #include "stdio.h";
  3.  
  4. void InjMessage(LPCWSTR Text, LPCWSTR Header)
  5. {
  6. MessageBox(NULL, Text, Header, MB_OK);
  7. }
  8.  
  9. bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
  10. {
  11. for(;*szMask;++szMask,++pData,++bMask)
  12. {
  13. if(*szMask=='x' && *pData!=*bMask )
  14. {
  15. return false;
  16. }
  17. }
  18. return (*szMask) == NULL;
  19. }
  20.  
  21. DWORD FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask,char * szMask)
  22. {
  23. for(DWORD i=0; i < dwLen; i++)
  24. {
  25. if(bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask))
  26. {
  27. return (DWORD)(dwAddress+i);
  28. }
  29. }
  30. return 0;
  31. }
  32.  
  33. DWORD WINAPI StartSearching()
  34. {
  35. HMODULE StartAdresse;
  36. int Size;
  37. DWORD Adress;
  38.  
  39. StartAdresse = GetModuleHandle(NULL);
  40. Size = 999999;
  41. Adress = FindPattern((DWORD) StartAdresse, (DWORD) Size, (PBYTE) "\x8B\xCE\x90\x90\x90\xE8\x00\x00\x00\x00\x8B\x4C\x24\x00\x8B\xB1\x00\x00\x00\x00\x83\xFE\x00\x0F\x84\x00\x00\x00\x00\x8B\xB1", "xxxxxx????xxx?xx????xxxxx????xx");
  42. Adress += 21;
  43.  
  44. WCHAR cResult[10];
  45. swprintf_s(cResult, 10, L"%X", Adress);
  46. InjMessage(cResult,L"Adresse");
  47.  
  48. return 0;
  49. }
  50.  
  51. bool WINAPI DllMain(HINSTANCE hInst, DWORD reason,LPVOID reserved)
  52. {
  53. if(reason==DLL_PROCESS_ATTACH)
  54. {
  55. CreateThread(0, 0, (LPTHREAD_START_ROUTINE) StartSearching, 0, 0, 0);
  56. }
  57. return true;
  58. }