-
Notifications
You must be signed in to change notification settings - Fork 0
/
uVerAdjust.pas
232 lines (224 loc) · 6.42 KB
/
uVerAdjust.pas
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
unit uVerAdjust;
interface
function AdjustOffsetUS11(Offset: LongWord): LongWord;
function AdjustOffsetAUS10(Offset: LongWord): LongWord;
function AdjustOffsetGER10(Offset: LongWord): LongWord;
function AdjustOffsetGER11(Offset: LongWord): LongWord;
implementation
function AdjustOffsetUS11(Offset: LongWord): LongWord;
begin
if Offset < $489D0C then
Result := Offset
else if Offset < $489D10 then
Result := Offset + $4
else if Offset < $489D82 then
Result := Offset + $D
else if Offset < $489E0D then
Result := Offset + $E
else if Offset < $498FF3 then
Result := Offset + $10
else if Offset < $4A4353 then
Result := Offset + $21
else if Offset < $600FB0 then
Result := Offset + $20
else if Offset < $601FF9 then
begin
if Offset < $601E83 then
Result := Offset + $30
else if Offset < $601EAB then
Result := Offset + $2E
else if Offset < $601EAD then
Result := Offset + $2C
else if Offset < $601EDC then
Result := Offset + $30
else if Offset < $601EDE then
Result := Offset + $2E
else if Offset < $601F0E then
Result := Offset + $30
else if Offset < $601F10 then
Result := Offset + $2E
else if Offset < $601F48 then
Result := Offset + $30
else if Offset < $601F50 then
Result := Offset + $2E
else if Offset < $601F5F then
Result := Offset + $28
else if Offset < $601F8C then
Result := Offset + $26
else
Result := Offset + $24
end
else if Offset < $626F79 then
Result := Offset - $20
else if Offset < $62758D then
begin
if Offset < $626F7F then
Result := Offset - $1B
else if Offset < $6271C9 then
Result := Offset - $20
else if Offset < $6271D8 then
Result := Offset - $19
else if Offset < $6271ED then
Result := Offset - $20
else if Offset < $6271F7 then
Result := Offset - $14
else if Offset < $627203 then
Result := Offset - 2
else if Offset < $62720A then
Result := Offset + $20
else if Offset < $627214 then
Result := Offset - 1
else if Offset < $62721B then
Result := Offset + 8
else if Offset < $6272DB then
Result := Offset + $F
else if Offset < $6273D1 then
Result := Offset + $10
else if Offset < $627448 then
Result := Offset + $23
else if Offset < $627470 then
Result := Offset + $28
else if Offset < $6274B6 then
Result := Offset + $26
else if Offset < $6274CC then
Result := Offset + $2A
else if Offset < $627570 then
Result := Offset + $20
else
Result := Offset + $46
end
else if Offset < $67E000 then
Result := Offset + $50
else if Offset < $6D6688 then
Result := Offset
else if Offset < $6D6B28 then
Result := Offset - $2C
else if Offset = $6DB8E8 then
Result := $786D44
else if Offset < $6DB8F0 then
Result := Offset - $28
else if Offset < $6DB924 then
Result := Offset - $30
else if Offset < $6E0000 then
Result := Offset - $10
else if Offset < $786BA8 then
Result := Offset
else if Offset < $786D40 then
Result := Offset + 4
else if Offset < $A10B56 then
Result := Offset + 8
else if Offset < $A12000 then
Result := Offset + 9
else
Result := Offset;
end;
function AdjustOffsetAUS10(Offset: LongWord): LongWord;
begin
if Offset < $600B8A then
Result := AdjustOffsetUS11(Offset)
else if Offset < $600FB0 then
begin
if Offset < $600B91 then
Result := Offset + $25
else if Offset < $600B96 then
Result := Offset + $19
else if Offset < $600BFD then
Result := Offset + $20
else if Offset < $600C40 then
Result := Offset - $36
else if Offset < $600C4A then
Result := Offset - $73
else if Offset < $600C4F then
Result := Offset - $88
else if Offset < $600C6E then
Result := Offset - $78
else
Result := Offset - $80
end
else if Offset < $67E000 then
Result := AdjustOffsetUS11(Offset) - $A0
else if Offset < $68DD6C then
Result := Offset
else if Offset < $68E008 then
Result := Offset + 4
else if Offset < $6D6688 then
Result := Offset + 8
else if Offset < $6D6934 then
Result := Offset - $24
else if Offset < $6D6B28 then
Result := Offset - $4C
else if Offset = $6DB8E8 then
Result := $786D44
else if Offset < $6DB8F0 then
Result := Offset - $48
else if Offset < $6DB924 then
Result := Offset - $50
else if Offset < $6E0000 then
Result := Offset - $30
else if Offset < $786BA8 then
Result := Offset
else if Offset < $786D40 then
Result := Offset + 4
else if Offset < $A10B56 then
Result := Offset + 8
else if Offset < $A10B9C then
Result := Offset + 9
else if Offset < $A12000 then
Result := Offset + 8
else
Result := Offset;
end;
function AdjustOffsetGER10(Offset: LongWord): LongWord;
begin
if Offset < $4A3941 then
Result := AdjustOffsetUS11(Offset)
else if Offset < $4A3948 then
Result := Offset + $E
else if Offset < $4A4357 then
Result := Offset + $15
else if Offset < $5367AE then
Result := Offset + $10
else if Offset < $536E5B then
begin
if Offset < $5367B7 then
Result := Result + $1D
else if Offset < $5367C4 then
Result := Result + $19
else if Offset < $5367D8 then
Result := Result - 4
else if Offset < $5367E3 then
Result := Offset - 8
else if Offset < $536855 then
Result := Offset - $C
else if Offset < $5368E0 then
Result := Offset - 5
else if Offset < $536966 then
Result := Offset - $C
else if Offset < $536A20 then
Result := Offset - 6
else if Offset < $536AA0 then
Result := Offset - 4
else if Offset < $536D37 then
Result := Offset - $D
else if Offset < $536D90 then
Result := Offset - 7
else if Offset < $536DC7 then
Result := Offset - $C
else if Offset < $536E32 then
Result := Offset - 7
else
Result := Offset - 2;
end
else
Result := Offset;
end;
function AdjustOffsetGER11(Offset: LongWord): LongWord;
begin
if Offset < $600FB0 then
Result := AdjustOffsetGER10(Offset)
else if Offset < $67E000 then
Result := AdjustOffsetUS11(Offset) - $10
else
Result := AdjustOffsetUS11(Offset);
end;
end.