Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1.  
  2. /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
  3.  
  4. undefined8 FUN_00100680(void)
  5.  
  6. {
  7. long lVar1;
  8. int prev_char;
  9. int value;
  10. long counter;
  11. long in_FS_OFFSET;
  12. char input [136];
  13. char *curr_position;
  14. long offset;
  15.  
  16. lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  17. __printf_chk(1,"Flag: ");
  18. __isoc99_scanf();
  19. /* if first char is 'H' */
  20. if ((int)input[0] == _h) {
  21. if (999 < DAT_00301024) {
  22. LAB_00100718:
  23. puts("Congratz! :D");
  24. goto LAB_0010073c;
  25. }
  26. /* second char of input is used as comparison */
  27. prev_char = (int)input[1];
  28. if (DAT_00301024 == prev_char - (int)input[0]) {
  29. counter = 2;
  30. do {
  31. /* 0, 8, 12, 16, ...
  32. Only used as terminating condition */
  33. offset = counter * 4;
  34. if (999 < *(int *)(&h + offset)) goto LAB_00100718;
  35. curr_position = input + counter;
  36. /* (init: 2), 3, 4, ... */
  37. counter = counter + 1;
  38. /* (input[0+2] - input[1]), (input[0+3]-input[2]), (input[0+4]-input[3]), ...
  39.  
  40. */
  41. value = (int)*curr_position - prev_char;
  42. prev_char = (int)*curr_position;
  43. } while (value == *(int *)(&h + offset));
  44. }
  45. }
  46. puts("Wrong flag.... :(");
  47. LAB_0010073c:
  48. if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
  49. return 0;
  50. }
  51. /* WARNING: Subroutine does not return */
  52. __stack_chk_fail();
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement