[原创]KCTF2022秋季赛 第二题 盗贼作乱 题解
2022-11-30 12:26:0 Author: bbs.pediy.com(查看原文) 阅读量:8 收藏

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

if ( v3 > 0

   && (v6 = v4 - v3, v4 - v3 > 0)

   && frombase62(first, &a2, v3, table) > 0

   && frombase62(&second, &v10[v3], v6 - 1, table) > 0

   && (frombase62(&example, "IRtzloZ6iuB", strlen("IRtzloZ6iuB"), table),

       init(firstop, 0),

       init(secondop, 0),

       compare((char *)first, (char *)&second) < 0)

   && compare((char *)first, (char *)&example) < 0

   && compare((char *)&second, (char *)&example) < 0 )

 {

   v7 = 0;

   while ( 1 )

   {

     i = v7 + 1;

     plus(firstop, firstop, first);

     plus(secondop, secondop, &second);

     mod((unsigned int *)firstop, (char *)firstop, (char *)&example);

     mod((unsigned int *)secondop, (char *)secondop, (char *)&example);

     init(&firststageNumber, 1);

     sub(&firststageNumber, firstop, &firststageNumber);

     if ( !compare((char *)&firststageNumber, (char *)first) )

     {

       ++succ;

       sbf1(&firststageNumber, &firststageNumber, first);// sbf1唯一的作用就是当i==32时,succ+=4

     }

     init(&secondStageNumber, 1);

     plus(&secondStageNumber, secondop, &secondStageNumber);

     if ( !compare((char *)&secondStageNumber, (char *)&second) )

     {

       ++succ;

       sbf2(&secondStageNumber, (char *)&example, (char *)&second);// sbf2唯一的作用就是当i==32时,succ+=4

     }

     if ( succ == 10 )

       break;

     v7 = i;

     if ( i >= 2097152 )

       goto LABEL_20;

   }

   sub_40284A((int)aSuccess);

   return 0;

 }


文章来源: https://bbs.pediy.com/thread-275361.htm
如有侵权请联系:admin#unsafe.sh