Advertisement
Guest User

Untitled

a guest
May 6th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int is_correct(uint32_t seed) {
  5. uint8_t hexkey[] = "\xA4\x3D\xF6\xF3\x74";
  6. for (uint32_t i = 0, x = seed; i < 5; ++i) {
  7. x = (214013 * x + 2531011) & 0xFFFFFF;
  8. printf("%X\n", x);
  9. if (hexkey[i] != (x >> 16)) return 0;
  10. }
  11. return 1;
  12. }
  13.  
  14. int main(int argc, char *argv[])
  15. {
  16. is_correct(0x12766B);
  17. return 0;
  18.  
  19. for (uint32_t seed = 0; seed < (1 << 24); seed++)
  20. if (is_correct(seed))
  21. printf("Seed: %03X\n", seed);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement