-
Notifications
You must be signed in to change notification settings - Fork 2
/
mop-protect.asm
115 lines (85 loc) · 1.32 KB
/
mop-protect.asm
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
; protect: 7B, 2C, 2D, 2E, 2F, 27
; og - 8037F164 8037F214
; delta = 283280
; filter
.orga 0x1202600
LUI V1, 0x8039
LW V1, 0xBE28(V1)
LBU T0, 0x3(V1)
ADD V0, R0, R0
LI T1, 0x7B
BEQ T1, T0, end
ADDIU V0, V0, 1
LI T1, 0x2C
BEQ T1, T0, end
ADDIU V0, V0, 1
LI T1, 0x2D
BEQ T1, T0, end
ADDIU V0, V0, 1
LI T1, 0x2E
BEQ T1, T0, end
ADDIU V0, V0, 1
LI T1, 0x2F
BEQ T1, T0, end
ADDIU V0, V0, 1
LI T1, 0x27
BEQ T1, T0, end
ADDIU V0, V0, 1
ADD V0, R0, R0
end:
JR RA
NOP
;cmd 21
.orga 0x1202800
ADDIU SP, SP, -0x18
SW RA, 0x14(SP)
JAL 0x80402600
NOP
BEQ V0, R0, @@call_og
NOP
LUI V1, 0x8040
ADDU V1, V1, V0
LB T0, 0x10(V1)
BEQ T0, R0, @@call_og
SB K1, 0x10(V1)
;ignore mode -- move to next cmd
LUI V1, 0x8039
LW T0, 0xBE28(V1)
ADDIU T0, T0, 8
SW T0, 0xBE28(V1)
B @@ignore
NOP
@@call_og:
JAL 0x8037F164
NOP
@@ignore:
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x18
;cmd 22
.orga 0x1202900
ADDIU SP, SP, -0x18
SW RA, 0x14(SP)
JAL 0x80402600
NOP
BEQ V0, R0, @@call_og
NOP
LUI V1, 0x8040
ADDU V1, V1, V0
LB T0, 0x10(V1)
BEQ T0, R0, @@call_og
SB K1, 0x10(V1)
;ignore mode -- move to next cmd
LUI V1, 0x8039
LW T0, 0xBE28(V1)
ADDIU T0, T0, 8
SW T0, 0xBE28(V1)
B @@ignore
NOP
@@call_og:
JAL 0x8037F214
NOP
@@ignore:
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x18