pokemon

点击此处获得更好的阅读体验


WriteUp 来源

https://xz.aliyun.com/t/1589

题目考点

解题思路

打开游戏,大木会直接和你疯狂暗示

大木告诉你,FLAG在第一个道馆,去打败馆主。到研究室领精灵,助手给你20个奇异糖果,让你快速升级。再次提醒打败第一个馆主。

一路打怪升级到第一个道馆

打败后

馆主说我不会告诉你的,想知道的话自己去逆向这个rom。
正文开始。 用PPRE工具。

1
2
3
4
5
text_11="HIIIIIINT(You-really-want-to-get-the-flag-by-submi
ting-it-one-by-one?)"
text_12="HIIIIIINT(Try-to-read-the-scrpit-XP)"
text_13="HIIIIIINT(Don’t forget to change Brackets to Curly
Brackets !!!!)"

下面是一堆flag,但只有一个是正确的。
提示你去看脚本。锁定脚本

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
Fanfare 1500
Lockall
Faceplayer
Checkbadge 0 0x800c
If 0x800c 1
CheckLR 1 func_5
Message 0
CloseMsgOnKeyPress
TrainerBattle 20 0 0
CheckTrainerLost 0x800c
If 0x800c 0
CheckLR 1 func_6
Setbdgtrue 0
ActMainEvent 22
SetTrainerId 29
SetTrainerId 50
Setvar 0x4074 1
Setflag 402
Setvar 16648 6
Setflag 244
Setflag 403
Message 1
SetvarHero 0
Message 2
Soundfr 1189
Fadedef
Message 3
Jump func_7

到func_7

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Setvar 0x8004 378
Setvar 0x8005 1
CheckItem3 0x8004 0x8005 0x800c
If 0x800c 0
CheckLR 1 func_15
Callstd 241 7
Setflag 115
Clearflag 741
Setvar 0x8004 378
Setvar 0x8005 1
CheckItem3 0x8004 0x8005 0x800c
If 0x800c 0
CheckLR 1 func_16
Message 4
WaitButton
CloseMsgOnKeyPress
Releaseall
End

分析逻辑可知,func_16永远不会被执行
到func_16

1
2
3
4
5
Message 64
WaitButton
CloseMsgOnKeyPress
Releaseall
End

发现是使用64号text弹出对话框

text_64="HCTF(6A0A81AB5F9917B1EEC3A6183C614380)"

Flag

1
HCTF{6A0A81AB5F9917B1EEC3A6183C614380}