#include "rondoudouPatch.h" #include #include int h(int a) { cipher(__builtin_return_address(0)); if (a > 0) { int ret = h(a - 1); decipher(); return ret; } decipher(); return 5; } char *ebp; char *esp; int main() { struct timespec start, end; clock_gettime(CLOCK_MONOTONIC, &start); rondoudou_patch_init(); cipher(__builtin_return_address(0)); for (int i = 0; i < 1000; ++i) { h(25); } decipher(); clock_gettime(CLOCK_MONOTONIC, &end); unsigned long ns = (end.tv_sec - start.tv_sec) * 1000000000ul + end.tv_nsec - start.tv_nsec; printf("%.3lfμs\n", (double) ns / 1000.0); }