Advertisement
Guest User

me3dbg.dll

a guest
May 26th, 2014
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.81 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include "stdio.h"
  3. #include <time.h>
  4. #include <io.h>
  5. #include <fcntl.h>
  6. #include <iostream>
  7.  
  8. int ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, ADDRESS5, ADDRESS6, ADDRESS7, ADDRESS8, ADDRESS9, ADDRESS10;
  9. unsigned char pattern[] = {0x56, 0x8B, 0x74, 0x24, 0x0C, 0x85, 0xF6, 0x75, 0x04, 0x33, 0xC0, 0x5E, 0xC3};
  10. unsigned char pattern2[] = {0x53, 0x55, 0x8B, 0x6C, 0x24, 0x10, 0x56, 0x8B, 0x74, 0x24, 0x18, 0x57};
  11. unsigned char pattern3[] = {0xCC, 0xCC, 0x8B, 0x17, 0x56, 0x50, 0x51, 0x52};
  12. unsigned char pattern4[] = {0x83, 0xEC, 0x2C, 0x8B, 0x51, 0x04, 0x31, 0x16, 0x8B, 0x51, 0x08, 0x31, 0x56, 0x04};
  13. unsigned char pattern5[] = {0x83, 0xEC, 0x10, 0x8B, 0x4C, 0x24, 0x20, 0x8B, 0x54, 0x24, 0x1C, 0x56, 0x8B, 0x74, 0x24, 0x18};
  14. unsigned char pattern6[] = {0x8B, 0x54, 0x24, 0x0C, 0x8B, 0x44, 0x24, 0x10, 0x56, 0x57, 0x85, 0xD2, 0x74, 0x12, 0x85, 0xC0};
  15. unsigned char pattern7[] = {0x8B, 0x54, 0x24, 0x04, 0x83, 0xEC, 0x08, 0x53, 0x55, 0x8B, 0x6C, 0x24, 0x1C, 0x56, 0x57, 0x33};
  16. unsigned char pattern8[] = {0x8B, 0x54, 0x24, 0x04, 0x53, 0x8B, 0x5C, 0x24, 0x0C, 0x56, 0x33, 0xC9, 0x33, 0xF6, 0x83, 0xFA};
  17. unsigned char pattern9[] = {0x51, 0x80, 0x7C, 0x24, 0x10, 0x01, 0x53, 0x55, 0x56, 0x8B, 0x74, 0x24, 0x18, 0x57, 0xC7, 0x44};
  18. unsigned char pattern10[] = {0x8B, 0x4C, 0x24, 0x04, 0x56, 0x8B, 0x71, 0x04, 0x8D, 0x81, 0x09, 0x06, 0x00, 0x00, 0x50, 0x8B};
  19.  
  20.  
  21. static const signed char _LobbyBase64_strDecode[] =
  22. {
  23. 62, // +
  24. -1, -1, -1, // ,-.
  25. 63, // /
  26. 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // 0-9
  27. -1, -1, -1, -1, -1, -1, -1, // :;<=>?@
  28. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, // A-
  29. 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // -Z
  30. -1, -1, -1, -1, -1, -1, // [\]^_`
  31. 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // a-
  32. 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 // -z
  33. };
  34. struct CryptRSARandomT
  35. {
  36. int u0;
  37. int u1;
  38. };
  39. struct CryptRSAT
  40. {
  41. int iKeyModSize; //!< size of public key modulus
  42. int iKeyExpSize; //!< size of public key exponent
  43. char EncryptBlock[1024];
  44. char KeyModData[256+1]; //!< public key modulus
  45. char KeyExpData[256+1]; //!< public key exponent
  46. CryptRSARandomT Random;
  47. };
  48.  
  49. typedef int (__cdecl * FUNC_PSSLS) (void *Dst, void *Src, size_t Size);
  50. typedef int (__cdecl * FUNC_PHTTPS)(const char *buf, unsigned int a2, int a3);
  51. typedef int (__cdecl * FUNC_CAESEnc)(int Size, char *buf);
  52. typedef signed int (__cdecl *FUNC_EAP)(int a1, unsigned int a2, int a3, int a4);
  53. typedef int (__cdecl * FUNC_PHTTPP)(int a1, int a2, const char *Src, signed int Size, int a5);
  54. typedef int (__cdecl * FUNC_LOBDE)(int len, const char* in, char* out);
  55. typedef void (__cdecl * FUNC_LOBEN)(int iInputLen, const char *pInput, char *pOutput);
  56. typedef signed int (__cdecl * FUNC_F4E4)(int a1, int a2, char a3);
  57. typedef void (__cdecl * FUNC_CRYP)(CryptRSAT * a1);
  58.  
  59. FUNC_PSSLS oProtoSSLSend = NULL;
  60. FUNC_PHTTPS oProtoHTTPSend = NULL;
  61. FUNC_CAESEnc oCryptAesEncrypt = NULL;
  62. FUNC_EAP oEA__StdC__Vsnprintf = NULL;
  63. FUNC_PHTTPP oProtoHttpPost = NULL;
  64. FUNC_LOBDE oLobbyBase64Decode = NULL;
  65. FUNC_LOBEN oLobbyBase64Encode = NULL;
  66. FUNC_F4E4 osub_F4E470 = NULL;
  67. FUNC_CRYP oCryptRSAEncrypt = NULL;
  68.  
  69. static void PrintHexDump(char* Src, int Length)
  70. {
  71. FILE* Log = NULL;
  72. fopen_s ( &Log, "BLAZE.txt", "a+" );
  73. int x = 0;
  74. char* buf = new char[17];
  75. for(int i = 0; i < 17; i++)
  76. buf[i]=(char)0;
  77. for(int i=0;i<Length;i++)
  78. {
  79. if(x++ >= 15)
  80. {
  81. if((unsigned char)Src[i]>=0x20)
  82. buf[x-1]=Src[i];
  83. else
  84. buf[x-1]=(char)0x2E;
  85. //printf("%02X %s\n" , (unsigned char)Src[i], buf);
  86. fprintf (Log, "%02X %s\n" , (unsigned char)Src[i], buf);
  87. x = 0;
  88. for(int i = 0; i < 17; i++)
  89. buf[i]=(char)0;
  90. }
  91. else
  92. {
  93. //printf("%02X " , (unsigned char)Src[i]);
  94. fprintf (Log, "%02X " , (unsigned char)Src[i]);
  95. if((unsigned char)Src[i]>=0x20)
  96. buf[x-1]=Src[i];
  97. else
  98. buf[x-1]=(char)0x2E;
  99. }
  100. }
  101. if(x!=0)
  102. {
  103. for(int i=0;i<16-x;i++)
  104. {
  105. //printf(" ");
  106. fprintf (Log, " ");
  107. }
  108. //printf(" %s\n", buf);
  109. fprintf (Log, " %s\n", buf);
  110. }
  111. fprintf (Log, "\n");
  112. fclose ( Log );
  113. }
  114. static void PrintHexDumpConsole(char* Src, int Length)
  115. {
  116. int x = 0;
  117. char* buf = new char[17];
  118. for(int i = 0; i < 17; i++)
  119. buf[i]=(char)0;
  120. for(int i=0;i<Length;i++)
  121. {
  122. if(x++ >= 15)
  123. {
  124. if((unsigned char)Src[i]>=0x20)
  125. buf[x-1]=Src[i];
  126. else
  127. buf[x-1]=(char)0x2E;
  128. printf("%02X %s\n" , (unsigned char)Src[i], buf);
  129. x = 0;
  130. for(int i = 0; i < 17; i++)
  131. buf[i]=(char)0;
  132. }
  133. else
  134. {
  135. printf("%02X " , (unsigned char)Src[i]);
  136. if((unsigned char)Src[i]>=0x20)
  137. buf[x-1]=Src[i];
  138. else
  139. buf[x-1]=(char)0x2E;
  140. }
  141. }
  142. if(x!=0)
  143. {
  144. for(int i=0;i<16-x;i++)
  145. {
  146. printf(" ");
  147. }
  148. printf(" %s\n", buf);
  149.  
  150. }
  151. }
  152.  
  153. int __cdecl blaze_vsnzprintf(char *pBuffer, unsigned int uLength, const char *pFormat, ...)
  154. {
  155. va_list args;
  156. va_start (args, pFormat);
  157. int result;
  158. if ( uLength )
  159. {
  160. result = vsnprintf(pBuffer, uLength, pFormat, args);
  161. if ( result >= (signed int)uLength || result < 0 )
  162. result = 0;
  163. pBuffer[result] = 0;
  164. }
  165. else
  166. {
  167. result = 0;
  168. }
  169. if(result)
  170. {
  171. printf("vsnzprintf : %s\n", pBuffer);
  172. FILE* Log = NULL;
  173. fopen_s ( &Log, "BLAZE.txt", "a+" );
  174. fprintf (Log, "vsnzprintf : %s\n", pBuffer);
  175. fclose ( Log );
  176. }
  177. return result;
  178. }
  179. int __cdecl ProtoSSLSend(void *Dst, void *Src, size_t Size)
  180. {
  181. printf("ProtoSSLSend : %i Bytes\n", (int)Size);
  182. FILE* Log = NULL;
  183. fopen_s ( &Log, "BLAZE.txt", "a+" );
  184. fprintf (Log, "ProtoSSLSend : %i Bytes\n", (int)Size);
  185. fclose ( Log );
  186. PrintHexDump((char*)Src, (int)Size);
  187. return oProtoSSLSend(Dst, Src, Size);
  188. }
  189. int __cdecl ProtoHTTPSend(const char *Src, unsigned int a2, int Size)
  190. {
  191. printf("ProtoHTTPSend : %i Bytes\n", (int)Size);
  192. FILE* Log = NULL;
  193. fopen_s ( &Log, "BLAZE.txt", "a+" );
  194. fprintf (Log, "ProtoHTTPSend : %i Bytes\n", (int)Size);
  195. fclose ( Log );
  196. PrintHexDump((char*)Src, (int)Size);
  197. return oProtoHTTPSend(Src, a2, Size);
  198. }
  199. int __cdecl CryptAESEncrypt(int Size, char *buf)
  200. {
  201. FILE* Log = NULL;
  202. fopen_s ( &Log, "BLAZE.txt", "a+" );
  203. fprintf (Log, "CryptAESEncrypt : %i Bytes\n", (int)Size);
  204. fclose ( Log );
  205. printf("CryptAESEncrypt : %i Bytes\n", (int)Size);
  206. PrintHexDump((char*)buf, (int)Size);
  207. return oCryptAesEncrypt(Size, buf);
  208. }
  209. signed int __cdecl EA__StdC__Vsnprintf(int a1, unsigned int a2, int a3, int a4)
  210. {
  211. int buf = a1;
  212. signed int result = oEA__StdC__Vsnprintf(a1, a2, a3, a4);
  213. //printf("EA::StdC::Vsnprintf : %i Bytes\n", result);
  214. /*FILE* Log = NULL;
  215. fopen_s ( &Log, "BLAZE.txt", "a+" );
  216. fprintf (Log, "EA::StdC::Vsnprintf : %s\n", buf);
  217. fclose ( Log );*/
  218. return result;
  219. }
  220. int __cdecl ProtoHttpPost(int a1, int a2, const char *Src, signed int Size, int a5)
  221. {
  222. printf("ProtoHttpPost : %s -- %s\n", (char*)a2, Src);
  223. FILE* Log = NULL;
  224. fopen_s ( &Log, "BLAZE.txt", "a+" );
  225. fprintf (Log, "ProtoHttpPost : %s\n\n", Src);
  226. fclose ( Log );
  227. return oProtoHttpPost(a1, a2, Src, Size, a5);
  228. }
  229. int __cdecl LobbyBase64Decode(int iInputLen, const char* pInput, char* pOutput)
  230. {
  231. char ci[4];
  232. char co0, co1, co2, co3;
  233. int iInputCnt, iInputOff, iOutputOff;
  234. const signed char *decode = _LobbyBase64_strDecode;
  235.  
  236. for (iInputOff = 0, iOutputOff = 0; iInputOff < iInputLen; )
  237. {
  238. for (iInputCnt = 0; (iInputCnt < 4) && (iInputOff < iInputLen) && (pInput[iInputOff] != '\0'); iInputOff += 1)
  239. {
  240. if ((pInput[iInputOff] == ' ') || (pInput[iInputOff] == '\t') || (pInput[iInputOff] == '\r') || (pInput[iInputOff] == '\n'))
  241. {
  242. continue;
  243. }
  244. else if ((pInput[iInputOff] < '+') || (pInput[iInputOff] > 'z'))
  245. {
  246. printf("LobbyBase64Decode : Exit 1\n");
  247. return(0);
  248. }
  249. else
  250. {
  251. ci[iInputCnt++] = pInput[iInputOff];
  252. }
  253. }
  254. if (iInputCnt == 0)
  255. {
  256. break;
  257. }
  258. if (iInputCnt < 4)
  259. {
  260. printf("LobbyBase64Decode : Exit 2\n");
  261. return(0);
  262. }
  263. co0 = decode[(int)ci[0]-'+'];
  264. co1 = decode[(int)ci[1]-'+'];
  265. co2 = decode[(int)ci[2]-'+'];
  266. co3 = decode[(int)ci[3]-'+'];
  267.  
  268. if ((co0 >= 0) && (co1 >= 0))
  269. {
  270. if ((co2 >= 0) && (co3 >= 0))
  271. {
  272. if (pOutput != NULL)
  273. {
  274. pOutput[iOutputOff+0] = (co0<<2)|((co1>>4)&0x3);
  275. pOutput[iOutputOff+1] = (co1&0x3f)<<4|((co2>>2)&0x3F);
  276. pOutput[iOutputOff+2] = ((co2&0x3)<<6)|co3;
  277. }
  278. iOutputOff += 3;
  279. }
  280. else if ((co2 >= 0) && (ci[3] == '='))
  281. {
  282. if (pOutput != NULL)
  283. {
  284. pOutput[iOutputOff+0] = (co0<<2)|((co1>>4)&0x3);
  285. pOutput[iOutputOff+1] = (co1&0x3f)<<4|((co2>>2)&0x3F);
  286. }
  287. iOutputOff += 2;
  288. iInputOff = iInputLen;
  289. }
  290. else if ((ci[2] == '=') && (ci[3] == '='))
  291. {
  292. if (pOutput != NULL)
  293. {
  294. pOutput[iOutputOff+0] = (co0<<2)|((co1>>4)&0x3);
  295. }
  296. iOutputOff += 1;
  297. iInputOff = iInputLen;
  298. }
  299. else
  300. {
  301. printf("LobbyBase64Decode : Exit 3\n");
  302. return(0);
  303. }
  304. }
  305. else
  306. {
  307. printf("LobbyBase64Decode : Exit 4\n");
  308. return(0);
  309. }
  310. }
  311. if (pOutput == NULL)
  312. {
  313. printf("LobbyBase64Decode : Exit 5\n");
  314. return((iInputOff == iInputLen) ? iOutputOff : 0);
  315. }
  316. else
  317. {
  318. //printf("LobbyBase64Decode : %i Bytes (Exit6)\n", iOutputOff);
  319. FILE* Log = NULL;
  320. fopen_s ( &Log, "BLAZE.txt", "a+" );
  321. fprintf (Log, "LobbyBase64Decode : %i Bytes (Exit6)\n\n", iOutputOff);
  322. fclose ( Log );
  323. PrintHexDump(pOutput, iOutputOff);
  324. return(iInputOff == iInputLen);
  325. }
  326. }
  327. void __cdecl LobbyBase64Encode(int iInputLen, char *pInput, char *pOutput)
  328. {
  329. printf("LobbyBase64Encode: %i Bytes\n", iInputLen);
  330. FILE* Log = NULL;
  331. fopen_s ( &Log, "BLAZE.txt", "a+" );
  332. fprintf (Log, "LobbyBase64Encode : %i Bytes\n\n", iInputLen);
  333. fclose ( Log );
  334. PrintHexDump(pInput, iInputLen);
  335. return oLobbyBase64Encode(iInputLen, pInput, pOutput);
  336. }
  337. signed int __cdecl CertCheck(int a1, int a2, char a3)
  338. {
  339. printf("CertCheck used, will return 0!\n\n");
  340. FILE* Log = NULL;
  341. fopen_s ( &Log, "BLAZE.txt", "a+" );
  342. fprintf (Log, "CertCheck used, will return 0!\n\n");
  343. fclose ( Log );
  344. return 0;
  345. }
  346. void __cdecl CryptRSAEncrypt (CryptRSAT * a1)
  347. {
  348. oCryptRSAEncrypt(a1);
  349. printf("CryptRSAEncrypt used!\nKeyModData:\n");
  350. PrintHexDumpConsole((char*) a1->KeyModData, 128);
  351. printf("KeyExpData:\n");
  352. PrintHexDumpConsole((char*) a1->KeyExpData, 128);
  353. printf("Block:\n");
  354. PrintHexDumpConsole((char*) a1->EncryptBlock, 128);
  355. FILE* Log = NULL;
  356. fopen_s ( &Log, "BLAZE.txt", "a+" );
  357. fprintf(Log, "CryptRSAEncrypt used!\nKeyModData:\n");
  358. fclose ( Log );
  359. PrintHexDump((char*) a1->KeyModData, 128);
  360. fopen_s ( &Log, "BLAZE.txt", "a+" );
  361. fprintf(Log, "KeyExpData:\n");
  362. fclose ( Log );
  363. PrintHexDump((char*) a1->KeyExpData, 128);
  364. fopen_s ( &Log, "BLAZE.txt", "a+" );
  365. fprintf(Log, "Block:\n");
  366. fclose ( Log );
  367. PrintHexDump((char*) a1->EncryptBlock, 128);
  368. return;
  369. }
  370.  
  371. static void OpenConsole()
  372. {
  373. int outHandle, errHandle, inHandle;
  374. FILE *outFile, *errFile, *inFile;
  375. AllocConsole();
  376. CONSOLE_SCREEN_BUFFER_INFO coninfo;
  377. GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
  378. coninfo.dwSize.Y = 9999;
  379. SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
  380.  
  381. outHandle = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
  382. errHandle = _open_osfhandle((long)GetStdHandle(STD_ERROR_HANDLE),_O_TEXT);
  383. inHandle = _open_osfhandle((long)GetStdHandle(STD_INPUT_HANDLE),_O_TEXT );
  384.  
  385. outFile = _fdopen(outHandle, "w" );
  386. errFile = _fdopen(errHandle, "w");
  387. inFile = _fdopen(inHandle, "r");
  388.  
  389. *stdout = *outFile;
  390. *stderr = *errFile;
  391. *stdin = *inFile;
  392.  
  393. setvbuf( stdout, NULL, _IONBF, 0 );
  394. setvbuf( stderr, NULL, _IONBF, 0 );
  395. setvbuf( stdin, NULL, _IONBF, 0 );
  396.  
  397. std::ios::sync_with_stdio();
  398.  
  399. }
  400.  
  401. static void FindAddress()
  402. {
  403. ADDRESS1 = 0;
  404. printf("Searching address 1... [blaze_vsnzprintf]\n");
  405. unsigned char * p = (unsigned char*)(0x401000);
  406. for(int i = 0; i < 0xE00000; i ++)
  407. {
  408. if(p[0] == pattern[0] && p[1] == pattern[1])
  409. {
  410. bool Found = true;
  411. for(int j = 0; j < 13; j++)
  412. if(p[j] != pattern[j])
  413. Found = false;
  414. if(Found)
  415. {
  416. ADDRESS1 = (int)(p);
  417. printf("Found Address @0x:%p\n", ADDRESS1);
  418. break;
  419. }
  420. }
  421. p++;
  422. }
  423. }
  424. static void FindAddress2()
  425. {
  426. ADDRESS2 = 0;
  427. printf("Searching address 2...[ProtoSSLSend]\n");
  428. unsigned char * p = (unsigned char*)(0x401000);
  429. for(int i = 0; i < 0xE00000; i ++)
  430. {
  431. if(p[0] == pattern2[0] && p[1] == pattern2[1])
  432. {
  433. bool Found = true;
  434. for(int j = 0; j < 12; j++)
  435. if(p[j] != pattern2[j])
  436. Found = false;
  437. if(Found)
  438. {
  439. ADDRESS2 = (int)(p);
  440. printf("Found Address @0x:%p\n", ADDRESS2);
  441. break;
  442. }
  443. }
  444. p++;
  445. }
  446. }
  447. static void FindAddress3()
  448. {
  449. ADDRESS3 = 0;
  450. printf("Searching address 3...[ProtoHTTPSend]\n");
  451. unsigned char * p = (unsigned char*)(0x401000);
  452. for(int i = 0; i < 0xE00000; i ++)
  453. {
  454. if(p[0] == pattern3[0] && p[1] == pattern3[1])
  455. {
  456. bool Found = true;
  457. for(int j = 0; j < 8; j++)
  458. if(p[j] != pattern3[j])
  459. Found = false;
  460. if(Found)
  461. {
  462. ADDRESS3 = (int)(p);
  463. printf("Found Address @0x:%p\n", ADDRESS3);
  464. break;
  465. }
  466. }
  467. p++;
  468. }
  469. }
  470. static void FindAddress4()
  471. {
  472. ADDRESS4 = 0;
  473. printf("Searching address 4...[CryptAESEncrypt]\n");
  474. unsigned char * p = (unsigned char*)(0x401000);
  475. for(int i = 0; i < 0xE00000; i ++)
  476. {
  477. if(p[0] == pattern4[0] && p[1] == pattern4[1])
  478. {
  479. bool Found = true;
  480. for(int j = 0; j < 14; j++)
  481. if(p[j] != pattern4[j])
  482. Found = false;
  483. if(Found)
  484. {
  485. ADDRESS4 = (int)(p);
  486. printf("Found Address @0x:%p\n", ADDRESS4);
  487. break;
  488. }
  489. }
  490. p++;
  491. }
  492. }
  493. static void FindAddress5()
  494. {
  495. ADDRESS5 = 0;
  496. printf("Searching address 5...[EA::StdC::Vsnprintf]\n");
  497. unsigned char * p = (unsigned char*)(0x401000);
  498. for(int i = 0; i < 0xE00000; i ++)
  499. {
  500. if(p[0] == pattern5[0] && p[1] == pattern5[1])
  501. {
  502. bool Found = true;
  503. for(int j = 0; j < 16; j++)
  504. if(p[j] != pattern5[j])
  505. Found = false;
  506. if(Found)
  507. {
  508. ADDRESS5 = (int)(p);
  509. printf("Found Address @0x:%p\n", ADDRESS5);
  510. break;
  511. }
  512. }
  513. p++;
  514. }
  515. }
  516. static void FindAddress6()
  517. {
  518. ADDRESS6 = 0;
  519. printf("Searching address 6...[ProtoHttpPost]\n");
  520. unsigned char * p = (unsigned char*)(0x401000);
  521. for(int i = 0; i < 0xE00000; i ++)
  522. {
  523. if(p[0] == pattern6[0] && p[1] == pattern6[1])
  524. {
  525. bool Found = true;
  526. for(int j = 0; j < 16; j++)
  527. if(p[j] != pattern6[j])
  528. Found = false;
  529. if(Found)
  530. {
  531. ADDRESS6 = (int)(p);
  532. printf("Found Address @0x:%p\n", ADDRESS6);
  533. break;
  534. }
  535. }
  536. p++;
  537. }
  538. }
  539. static void FindAddress7()
  540. {
  541. ADDRESS7 = 0;
  542. printf("Searching address 7...[LobbyBase64Decode]\n");
  543. unsigned char * p = (unsigned char*)(0x401000);
  544. for(int i = 0; i < 0xE00000; i ++)
  545. {
  546. if(p[0] == pattern7[0] && p[1] == pattern7[1])
  547. {
  548. bool Found = true;
  549. for(int j = 0; j < 16; j++)
  550. if(p[j] != pattern7[j])
  551. Found = false;
  552. if(Found)
  553. {
  554. ADDRESS7 = (int)(p);
  555. printf("Found Address @0x:%p\n", ADDRESS7);
  556. break;
  557. }
  558. }
  559. p++;
  560. }
  561. }
  562. static void FindAddress8()
  563. {
  564. ADDRESS8 = 0;
  565. printf("Searching address 8...[LobbyBase64Encode]\n");
  566. unsigned char * p = (unsigned char*)(0x401000);
  567. for(int i = 0; i < 0xE00000; i ++)
  568. {
  569. if(p[0] == pattern8[0] && p[1] == pattern8[1])
  570. {
  571. bool Found = true;
  572. for(int j = 0; j < 16; j++)
  573. if(p[j] != pattern8[j])
  574. Found = false;
  575. if(Found)
  576. {
  577. ADDRESS8 = (int)(p);
  578. printf("Found Address @0x:%p\n", ADDRESS8);
  579. break;
  580. }
  581. }
  582. p++;
  583. }
  584. }
  585. static void FindAddress9()
  586. {
  587. ADDRESS9 = 0;
  588. printf("Searching address 9...[CertCheck]\n");
  589. unsigned char * p = (unsigned char*)(0x401000);
  590. for(int i = 0; i < 0xE00000; i ++)
  591. {
  592. if(p[0] == pattern9[0] && p[1] == pattern9[1])
  593. {
  594. bool Found = true;
  595. for(int j = 0; j < 16; j++)
  596. if(p[j] != pattern9[j])
  597. Found = false;
  598. if(Found)
  599. {
  600. ADDRESS9 = (int)(p);
  601. printf("Found Address @0x:%p\n", ADDRESS9);
  602. break;
  603. }
  604. }
  605. p++;
  606. }
  607. }
  608. static void FindAddress10()
  609. {
  610. ADDRESS10 = 0;
  611. printf("Searching address 10...[CryptRSAEncrypt]\n");
  612. unsigned char * p = (unsigned char*)(0x401000);
  613. for(int i = 0; i < 0xE00000; i ++)
  614. {
  615. if(p[0] == pattern10[0] && p[1] == pattern10[1])
  616. {
  617. bool Found = true;
  618. for(int j = 0; j < 16; j++)
  619. if(p[j] != pattern10[j])
  620. Found = false;
  621. if(Found)
  622. {
  623. ADDRESS10 = (int)(p);
  624. printf("Found Address @0x:%p\n", ADDRESS10);
  625. break;
  626. }
  627. }
  628. p++;
  629. }
  630. }
  631.  
  632.  
  633. BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
  634. {
  635. switch (dwReason)
  636. {
  637. case DLL_PROCESS_ATTACH:
  638. OpenConsole();
  639. printf("ME3 Debugger by Warranty Voider\n\nIm in!^^...\n");
  640. FILE* Log = NULL;
  641. fopen_s ( &Log, "BLAZE.txt", "w" );
  642. fprintf (Log, "ME3 Debugger by Warranty Voider\n\n");
  643. fclose ( Log );
  644. printf("searching addresses...\n");
  645. FindAddress();
  646. //FindAddress2();
  647. FindAddress3();
  648. FindAddress4();
  649. FindAddress5();
  650. FindAddress6();
  651. FindAddress7();
  652. FindAddress8();
  653. FindAddress9();
  654. FindAddress10();
  655. printf("detouring function...\n");
  656. if(ADDRESS1)
  657. DetourFunction((PBYTE)ADDRESS1, (PBYTE)blaze_vsnzprintf);
  658. else
  659. printf("ADDRESS 1 NOT FOUND!\n");
  660. if(ADDRESS2)
  661. {
  662. oProtoSSLSend = (FUNC_PSSLS)DetourFunction((PBYTE)ADDRESS2, (PBYTE)ProtoSSLSend);
  663. }
  664. else
  665. printf("ADDRESS 2 NOT FOUND!\n");
  666. if(ADDRESS3)
  667. {
  668. oProtoHTTPSend = (FUNC_PHTTPS)DetourFunction((PBYTE)ADDRESS3, (PBYTE)ProtoHTTPSend);
  669. }
  670. else
  671. printf("ADDRESS 3 NOT FOUND!\n");
  672. if(ADDRESS4)
  673. {
  674. oCryptAesEncrypt = (FUNC_CAESEnc)DetourFunction((PBYTE)ADDRESS4, (PBYTE)CryptAESEncrypt);
  675. }
  676. else
  677. printf("ADDRESS 4 NOT FOUND!\n");
  678. if(ADDRESS5)
  679. {
  680. oEA__StdC__Vsnprintf = (FUNC_EAP)DetourFunction((PBYTE)ADDRESS5, (PBYTE)EA__StdC__Vsnprintf);
  681. }
  682. else
  683. printf("ADDRESS 5 NOT FOUND!\n");
  684. if(ADDRESS6)
  685. {
  686. oProtoHttpPost = (FUNC_PHTTPP)DetourFunction((PBYTE)ADDRESS6, (PBYTE)ProtoHttpPost);
  687. }
  688. else
  689. printf("ADDRESS 6 NOT FOUND!\n");
  690. if(ADDRESS7)
  691. {
  692. oLobbyBase64Decode = (FUNC_LOBDE)DetourFunction((PBYTE)ADDRESS7, (PBYTE)LobbyBase64Decode);
  693. }
  694. else
  695. printf("ADDRESS 7 NOT FOUND!\n");
  696. if(ADDRESS8)
  697. {
  698. oLobbyBase64Encode = (FUNC_LOBEN)DetourFunction((PBYTE)ADDRESS8, (PBYTE)LobbyBase64Encode);
  699. }
  700. else
  701. printf("ADDRESS 8 NOT FOUND!\n");
  702. if(ADDRESS9)
  703. {
  704. osub_F4E470 = (FUNC_F4E4)DetourFunction((PBYTE)ADDRESS9, (PBYTE)CertCheck);
  705. }
  706. else
  707. printf("ADDRESS 9 NOT FOUND!\n");
  708. if(ADDRESS10)
  709. {
  710. oCryptRSAEncrypt = (FUNC_CRYP)DetourFunction((PBYTE)ADDRESS10, (PBYTE)CryptRSAEncrypt);
  711. }
  712. else
  713. printf("ADDRESS 10 NOT FOUND!\n");
  714. break;
  715. }
  716. return TRUE;
  717. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement