Advertisement
Guest User

Untitled

a guest
Apr 30th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.31 KB | None | 0 0
  1. void main()
  2. {
  3. 00401000  push        ebx  
  4. 00401001  push        esi  
  5. 00401002  push        edi  
  6.     CThing a(10);
  7. 00401003  mov         esi,0Ah
  8.  
  9.     a.Process((rand() % 2) == 1); // Using rand() to force compiler to support both true and false
  10. 00401008  call        dword ptr [__imp__rand (40209Ch)]
  11. 0040100E  and         eax,80000001h
  12. 00401013  jns         main+1Ah (40101Ah)
  13. 00401015  dec         eax  
  14. 00401016  or          eax,0FFFFFFFEh
  15. 00401019  inc         eax  
  16. 0040101A  mov         edi,dword ptr [__imp__printf (4020A4h)]
  17. 00401020  cmp         eax,1
  18. 00401023  push        0Ah  
  19. 00401025  push        offset string "%d\n" (4020F4h)
  20. 0040102A  sete        bl  
  21. 0040102D  call        edi  
  22. 0040102F  add         esp,8
  23. 00401032  test        bl,bl
  24. 00401034  je          main+3Bh (40103Bh)
  25. 00401036  mov         esi,0Bh
  26.     a.Process<true>();
  27. 0040103B  push        esi  
  28. 0040103C  push        offset string "%d\n" (4020F4h)
  29. 00401041  call        edi  
  30. 00401043  add         esi,1
  31.     printf("%d\n", a.GetVar());
  32. 00401046  push        esi  
  33. 00401047  push        offset string "%d\n" (4020F4h)
  34. 0040104C  call        edi  
  35. 0040104E  add         esp,10h
  36. 00401051  pop         edi  
  37. 00401052  pop         esi  
  38. }
  39. 00401053  xor         eax,eax
  40. 00401055  pop         ebx  
  41. 00401056  ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement