Advertisement
t_a_w

reversed asm

Mar 16th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.00 KB | None | 0 0
  1.     asm("pushq", rbp);
  2.     asm("movq", rbp, rsp);
  3.     *(rbp + -36) = edi;
  4.     *(rbp + -40) = esi;
  5.     eax = *(rbp + -36);
  6.     eax = eax ^ *(rbp + -40);
  7.     zf = eax == 0;
  8.     nf = eax < 0;
  9.     cf = 0;
  10.     of = 0;
  11.     *(rbp + -4) = eax;
  12.     eax = *(rbp + -4);
  13.     tmp1 = eax;
  14.     eax = eax + 98;
  15.     zf = eax == 0;
  16.     nf = eax < 0;
  17.     cf = tmp1 >> 31 && 98 >> 31 || !(eax >> 31) && (tmp1 >> 31 || 98 >> 31);
  18.     of = tmp1 < 0 && 98 < 0 && eax >= 0 || tmp1 >= 0 && 98 >= 0 && eax < 0;
  19.     *(rbp + -8) = eax;
  20.     eax = *(rbp + -8);
  21.     eax = ~eax;
  22.     edx = eax;
  23.     eax = *(rbp + -40);
  24.     tmp2 = eax;
  25.     eax = eax + edx;
  26.     zf = eax == 0;
  27.     nf = eax < 0;
  28.     cf = tmp2 >> 31 && edx >> 31 || !(eax >> 31) && (tmp2 >> 31 || edx >> 31);
  29.     of = tmp2 < 0 && edx < 0 && eax >= 0 || tmp2 >= 0 && edx >= 0 && eax < 0;
  30.     *(rbp + -0xc) = eax;
  31.     eax = *(rbp + -0xc);
  32.     eax = eax ^ *(rbp + -36);
  33.     zf = eax == 0;
  34.     nf = eax < 0;
  35.     cf = 0;
  36.     of = 0;
  37.     *(rbp + -16) = eax;
  38.     eax = *(rbp + -40);
  39.     tmp3 = (signed long int) eax * (signed long int) *(rbp + -4);
  40.     eax = eax * *(rbp + -4);
  41.     cf = tmp3 != (signed long int) eax;
  42.     of = tmp3 != (signed long int) eax;
  43.     if(eax < 0)
  44.         edx = -1;
  45.     else
  46.         edx = 0;
  47.     tmp4 = (signed long int) eax & (signed long int) edx << 32;
  48.     tmp5 = *(rbp + -8);
  49.     eax = (signed int) (tmp4 / (signed long int) tmp5);
  50.     edx = (signed int) (tmp4 % (signed long int) tmp5);
  51.     edx = eax;
  52.     eax = *(rbp + -36);
  53.     ecx = rdx + rax;
  54.     edx = *(rbp + -0xc);
  55.     eax = *(rbp + -16);
  56.     tmp6 = eax;
  57.     eax = eax + edx;
  58.     zf = eax == 0;
  59.     nf = eax < 0;
  60.     cf = tmp6 >> 31 && edx >> 31 || !(eax >> 31) && (tmp6 >> 31 || edx >> 31);
  61.     of = tmp6 < 0 && edx < 0 && eax >= 0 || tmp6 >= 0 && edx >= 0 && eax < 0;
  62.     eax = eax ^ ecx;
  63.     zf = eax == 0;
  64.     nf = eax < 0;
  65.     cf = 0;
  66.     of = 0;
  67.     *(rbp + -20) = eax;
  68.     tmp7 = *(rbp + -20) - -814;
  69.     zf = tmp7 == 0;
  70.     nf = tmp7 < 0;
  71.     cf = !(*(rbp + -20) >> 31) && -814 >> 31 || !(tmp7 >> 31) && (!(*(rbp + -20) >> 31) || -814 >> 31);
  72.     of = *(rbp + -20) >= 0 && -814 < 0 && tmp7 >= 0 || *(rbp + -20) < 0 && -814 >= 0 && tmp7 < 0;
  73.     al = zf;
  74.     asm("popq", rbp);
  75.     return;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement