Guest User

Untitled

a guest
May 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. void DecryptARCode(std::vector<std::string> vCodes)
  2. {
  3. // The almighty buildseeds() function!! without this, the crypto routines are useless
  4. buildseeds();
  5.  
  6. u32 uCodes[1200];
  7. std::string code;
  8. char temp[128];
  9. int i,ret;
  10.  
  11. for (std::vector<std::string>::const_iterator iter = vCodes.begin(); iter != vCodes.end(); ++iter)
  12. {
  13. //NEED to make this operate on the vector itself instead of copying+changeing
  14. code = *iter;
  15. for (int i = 0; i < code.size(); i++)
  16. {
  17. if (isalnum(code[i]))
  18. code[i] = toupper(code[i]);
  19. }
  20.  
  21. PanicAlert("Encrypted AR Code\n%s", code.c_str());
  22. }
  23.  
  24. total++;
  25. if ((ret=alphatobin(uCodes, vCodes, vCodes.size())))
  26. {
  27. PanicAlert("Code Decryption Error\nParity Check Failed\n\nCode #%d, Line %d", total, ret);
  28. batchdecrypt(uCodes, vCodes.size()<<1);
  29. }
  30. else if (!batchdecrypt(uCodes, vCodes.size()<<1))
  31. {
  32. PanicAlert("Code Decryption Error\nCRC Check Failed\n\nCode #%d", total);
  33. }
  34.  
  35. for (i = 0; i < (vCodes.size()<<1); i+=2)
  36. {
  37. sprintf(temp, "%08X %08X\r\n", uCodes[i], uCodes[i+1]);
  38. //strcat(textout,temp.c_str());
  39. PanicAlert("YAY\n%s", temp);
  40. }
  41. }
Add Comment
Please, Sign In to add comment