int __fastcall main(int argc, constchar **argv, constchar **envp) { unsignedint v3; int v5[2]; unsignedint i; int v7; int v8;
_main(argc, argv, envp); v8 = 15; v3 = time(0i64); srand(v3); puts("You want my treasure? You can have it all if you want it. Go find it! I hid the treasure chest in the program"); puts("Number of remaining steps: 15 | 1 to 3 steps per round | The first one to get to the KEY\n"); v5[1] = 0; while ( v8 > 0 ) { printf("Remaining steps: [%d]\n", (unsignedint)v8); do { printf("Number of steps (1-3): "); while ( scanf("%d", v5) != 1 ) { printf("Input error, please re-enter: "); while ( getchar() != 10 ) ; } if ( v5[0] > 0 && v5[0] <= 3 ) { if ( v8 < v5[0] ) printf(aNotEnoughSteps, (unsignedint)v8); } else { puts(aMustTake13Step); } } while ( v5[0] <= 0 || v5[0] > 3 || v8 < v5[0] ); v8 -= v5[0]; printf("* Player walks %d steps, remaining %d\n\n", (unsignedint)v5[0], (unsignedint)v8); if ( v8 <= 0 ) { full_decrypt(); puts("This is your KEY. You deserve it ! !"); for ( i = 0; i <= 0x2F; ++i ) printf("%02X", real_key[i]); break; } v7 = calculate_best_move((unsignedint)v8); if ( v7 <= 0 || v7 > 3 ) v7 = 1; if ( v7 > v8 ) v7 = v8; v8 -= v7; printf("* The AI takes %d steps, remaining %d\n\n", (unsignedint)v7, (unsignedint)v8); if ( v8 <= 0 ) puts("This treasure does not belong to you. Go back, Boy"); } printf("\nGame over ! "); system("pause"); return0; }
addr = (void *)(exec_area & 0xFFFFFFFFFFFFF000LL); if ( mprotect((void *)(exec_area & 0xFFFFFFFFFFFFF000LL), 0x1000uLL, 7) == -1 ) { perror("mprotect failed"); exit(1); } printf("[BOSS] Your place is mine now %p!\n", addr); printf("[BOSS] Say your last word to your territory: "); read(0, addr, 1056uLL); return ((__int64 (*)(void))addr)(); }
int __fastcall main(int argc, constchar **argv, constchar **envp) { unsignedint v3; int v5[2]; unsignedint i; int v7; int v8;
_main(argc, argv, envp); v8 = 15; v3 = time(0i64); srand(v3); puts("You want my treasure? You can have it all if you want it. Go find it! I hid the treasure chest in the program"); puts("Number of remaining steps: 15 | 1 to 3 steps per round | The first one to get to the KEY\n"); v5[1] = 0; while ( v8 > 0 ) { printf("Remaining steps: [%d]\n", (unsignedint)v8); do { printf("Number of steps (1-3): "); while ( scanf("%d", v5) != 1 ) { printf("Input error, please re-enter: "); while ( getchar() != 10 ) ; } if ( v5[0] > 0 && v5[0] <= 3 ) { if ( v8 < v5[0] ) printf(aNotEnoughSteps, (unsignedint)v8); } else { puts(aMustTake13Step); } } while ( v5[0] <= 0 || v5[0] > 3 || v8 < v5[0] ); v8 -= v5[0]; printf("* Player walks %d steps, remaining %d\n\n", (unsignedint)v5[0], (unsignedint)v8); if ( v8 <= 0 ) { full_decrypt(); puts("This is your KEY. You deserve it ! !"); for ( i = 0; i <= 0x2F; ++i ) printf("%02X", real_key[i]); break; } v7 = calculate_best_move((unsignedint)v8); if ( v7 <= 0 || v7 > 3 ) v7 = 1; if ( v7 > v8 ) v7 = v8; v8 -= v7; printf("* The AI takes %d steps, remaining %d\n\n", (unsignedint)v7, (unsignedint)v8); if ( v8 <= 0 ) puts("This treasure does not belong to you. Go back, Boy"); } printf("\nGame over ! "); system("pause"); return0; }
addr = (void *)(exec_area & 0xFFFFFFFFFFFFF000LL); if ( mprotect((void *)(exec_area & 0xFFFFFFFFFFFFF000LL), 0x1000uLL, 7) == -1 ) { perror("mprotect failed"); exit(1); } printf("[BOSS] Your place is mine now %p!\n", addr); printf("[BOSS] Say your last word to your territory: "); read(0, addr, 1056uLL); return ((__int64 (*)(void))addr)(); }