forked from shizukachan/atelier_pak_decrypt
-
Notifications
You must be signed in to change notification settings - Fork 25
/
gust_enc.json
232 lines (232 loc) · 6.18 KB
/
gust_enc.json
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
{
"version": 0x300,
/* Change to false if you don't want to spend time validating that the numbers below are prime */
"validate_primes": true,
/* Change to the id of the game you wish to descramble (using one of the ids below) */
"seeds_id": "A21",
/* Seeds used by a game executable can be found in its IDA Freeware disassembly:
* 1. Locate the function call that uses literal value 3B9A73C9h (SEED_CONSTANT).
* Note that there may be multiple similar function calls with different seeds, so make sure to pick the right one!
* 2. At the beginning of that function you get length[] and table[] array values (lengths are usually 1Dh, 13h, 0Bh).
* 3. Find the first call to a function that uses parameters 800h and 100h and look for another literal. That's main[0].
* 4. Find the next literal being used after this call. That's main[1].
* 5. Go further down and look for 2 literals, one of which is half the value of the first and is prime. That's fence.
* 6. Finally look for a call near the end where 80h is used as parameter. The other literal there is main[2].
* Note: All of the seeds are prime numbers so if you have a number that is not prime, then it's not a seed.
* If needed, you can access deobfuscated binary code (to use with IDA) by saving the WinDbg dump.
*
* Note that Fairy Tail uses a slightly different scrambling set, which isn't documented here.
*/
"seeds": [
{
"id": "A16",
"name": "Atelier Shallie",
"version": 2,
"main": [
0x6df7,
0xc953,
0x72ef
],
"table": [
0xaa83,
0xac8b,
0x89cf
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x9fd
},
{
"id": "A17",
"name": "Atelier Sophie",
"version": 2,
"main": [
0x6e45,
0xc9af,
0x7525
],
"table": [
0xa9d9,
0xae8f,
0x89f5
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0a99
},
{
"id": "A18",
"name": "Atelier Firis",
"version": 2,
"main": [
0x69b5,
0xd069,
0x7577
],
"table": [
0xa80b,
0xb3c5,
0x8c89
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0aed
},
{
"id": "A19",
"name": "Atelier Lydie & Suelle",
"version": 2,
"main": [
0x6d7b,
0xcac3,
0x747b
],
"table": [
0xa8e5,
0xb0b1,
0x8a5b
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0ab5
},
{
"id": "A20",
"name": "Atelier Lulua",
"version": 2,
"main": [
0x6d7b,
0xcac3,
0x747b
],
"table": [
0xa8e5,
0xb0b1,
0x8a5b
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0ab5
},
{ // Atelier Ryza (A21), Atelier Ryza 2 (A22), Blue Reflection 2 and Atelier Sophie 2 (A23)
"id": "A21",
"name": "Atelier Ryza",
"version": 2,
"main": [
0x6d3f,
0xcb53,
0x74b9
],
"table": [
0xa83b,
0xb11d,
0x88a5
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0a31
},
{
"id": "ANW",
"name": "Ateliers of the New World (Nelke & the Legendary Alchemists)",
"version": 2,
"main": [
0x6d7b,
0xcac3,
0x747b
],
"table": [
0xa8e5,
0xb0b1,
0x8a5b
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0ab5
},
{
"id": "NOA",
"name": "Nights of Azure / Nights of Azure 2",
"version": 2,
"main": [
0x6d73,
0xc979,
0x728f
],
"table": [
0xa9bb,
0x892d,
0x8939
],
"length": [
0x1f,
0x1d,
0x17
],
"fence": 0x09a9
},
{ // Note: "Blue Reflection: Second Light" uses the same seed as A21
"id": "BR",
"name": "Blue Reflection",
"version": 2,
"main": [
0x6947,
0xcb63,
0x7597
],
"table": [
0xa829,
0xb047,
0x8af5
],
"length": [
0x1d,
0x13,
0x0b
],
"fence": 0x0b23
},
{
"id": "FT",
"name": "Fairy Tail",
"version": 3,
"main": [
0x3e87,
0xcac3,
0x0000 // Only two main seeds are used
],
"table": [
0xa8e5,
0xb0b1,
0x8a5b
],
"length": [
0x11,
0x0b,
0x13
],
"fence": 0x0755
}
]
}