1 #include <libcgc.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 /* Just leak 4 bytes from the flag page, performing a simple mutation on those bytes */
6
main(int secret_page_i)7 int __attribute((fastcall)) main(int secret_page_i)
8 {
9 int w = 0;
10 int aa = 0x41414141;
11 int x = 0;
12 int ab = 0x42424242;
13 int y = 0;
14 int ac = 0x43434343;
15 int z = 0;
16 int ad = 0x44444444;
17
18 char *secret_page = (void *)secret_page_i;
19
20 w = secret_page[6] + 0x22;
21 x = secret_page[4] ^ 0x66;
22 y = secret_page[3] - 0x14;
23 z = secret_page[5] - 0x13;
24
25 transmit(1, &aa, 8, NULL);
26 transmit(1, &ab, 8, NULL);
27 transmit(1, &ac, 8, NULL);
28 transmit(1, &ad, 8, NULL);
29 }
30