You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

simple_tests.h 680B

6 jaren geleden
6 jaren geleden
6 jaren geleden
6 jaren geleden
12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. extern "C" {
  3. /**
  4. * A small function, that always returns 0
  5. */
  6. uint64_t _small(void);
  7. /**
  8. * This function checks if the parameter is even or odd, and then
  9. * always returns 0.
  10. *
  11. * The check is done with a branch, so the hooking engine has to take that
  12. * into account.
  13. *
  14. * @param Number to be checked
  15. */
  16. uint64_t _branch(uint64_t);
  17. /**
  18. * Replicates the MSVCRT rand().
  19. *
  20. * This function is used to check whether the hooking engine correctly fixes
  21. * rip relative addressing.
  22. *
  23. * @internal:
  24. * static seed = 1;
  25. * return( ((seed = seed * 214013L
  26. * + 2531011L) >> 16) & 0x7fff );
  27. */
  28. uint64_t _rip_relative(void);
  29. };