-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathacs.CT
406 lines (358 loc) · 10.4 KB
/
acs.CT
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
<CheatEntries>
<CheatEntry>
<ID>3</ID>
<Description>"y speed"</Description>
<Options moAllowManualCollapseAndExpand="1"/>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Float</VariableType>
<Address>[speedrdx]+118</Address>
<CheatEntries>
<CheatEntry>
<ID>4</ID>
<Description>"x speed"</Description>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Float</VariableType>
<Address>-8</Address>
</CheatEntry>
<CheatEntry>
<ID>5</ID>
<Description>"z speed"</Description>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Float</VariableType>
<Address>-4</Address>
</CheatEntry>
<CheatEntry>
<ID>6</ID>
<Description>"steer"</Description>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Float</VariableType>
<Address>+C</Address>
</CheatEntry>
</CheatEntries>
</CheatEntry>
<CheatEntry>
<ID>2</ID>
<Description>"Gear system"</Description>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
if synataxcheck then return end
[ENABLE]
local mul=1.05
local jerk=2
local gearMul=3
local gearArr={13,17,30,45,65,100}
local maxGearArrIndex=6
local gearArrIndex=1
local div=1.12
local speedXString='x speed'
local speedYString='y speed'
local speedZString='z speed'
--Instructions
--mul is the multiplier by which the car will accelerate if the speed of the car is lower than top speed.
--gearMul is the multiplier by which the speed of the car will be brought down if it is higher than the top Speed.
--gearArr is the array of top speeds of each gear.
--maxGearArrIndex is the length of the gearArr array.
--gearArrIndex points to the index of the gear the car is in at a particular point in time. But initially this value should be 1 only.
--jerk is the multiplier/divider for mul.Increasing mul results in higher power and decreasing mul results in lower power.
--Gear is increased by W and decreased by S
--When trying to use this script in a game just adjust speedStrings , gearArr values accordin to the game.
--If you want to increase the size the number of gears then make gearArr array bigger and set the maxGearArrIndex to the size of the gearArr array.
local TempUp=gearArr[gearArrIndex]
t=getAddressList()
x=t.getMemoryRecordByDescription(speedXString)
y=t.getMemoryRecordByDescription(speedYString)
z=t.getMemoryRecordByDescription(speedZString)
function adjustSpeed(x,y,tempUp,speedUp)
if tempUp>=gearArr[gearArrIndex] then
r=((x.Value^2)+(y.Value^2)+(z.Value^2))^0.5
if r<=tempUp then
if r*mul<=tempUp then
if speedUp then
x.Value=x.Value*mul
y.Value=y.Value*mul
z.Value=z.Value*mul
end
else
if speedUp then
local ratio=tempUp/r
x.Value=x.Value*ratio
y.Value=y.Value*ratio
z.Value=z.Value*ratio
end
end
else
if (r/gearMul)>=tempUp then
x.Value=x.Value/gearMul
y.Value=y.Value/gearMul
z.Value=z.Value/gearMul
else
local ratio=tempUp/r
x.Value=x.Value*ratio
y.Value=y.Value*ratio
z.Value=z.Value*ratio
end
end
end
end
normal=createHotkey(function()
adjustSpeed(x,y,TempUp,true)
end,0x5807) --UP key
up=createHotkey(function()
if gearArrIndex < maxGearArrIndex then
gearArrIndex=gearArrIndex+1
TempUp=gearArr[gearArrIndex]
end
adjustSpeed(x,y,TempUp,false)
end,0x5830) --W
down=createHotkey(function()
if gearArrIndex > 1 then
gearArrIndex=gearArrIndex-1
TempUp=gearArr[gearArrIndex]
end
adjustSpeed(x,y,TempUp,false)
end,0x5831) --S
reset=createHotkey(function()
gearArrIndex=1
TempUp=gearArr[gearArrIndex]
adjustSpeed(x,y,TempUp,false)
end,0x20) --SPACE
brake=createHotkey(function()
x.Value=x.Value/div
y.Value=y.Value/div
end,0x5806) --Down
[DISABLE]
normal.destroy()
up.destroy()
down.destroy()
reset.destroy()
brake.destroy()
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>7</ID>
<Description>"Front speeder"</Description>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
local turn=0 --1/7
local mul=1+8e-3
local ratio=2
-- This script needs speed of turn address as "steer". You also have to adjust the ratio wrt the game. You may also have to change the sign of ratio if the car goes in opp direction to your key input.
list=getAddressList()
xspeed=list.getMemoryRecordByDescription('x speed')
yspeed=list.getMemoryRecordByDescription('y speed')
steer=list.getMemoryRecordByDescription('steer')
function rotate()
if xspeed==nil or xspeed.Value=="??" then return end
if isKeyPressed(0x25) then steer.Value=steer.Value-turn elseif isKeyPressed(0x27) then steer.Value=steer.Value+turn end
theta=math.rad(-ratio*steer.Value)
r=((xspeed.Value^2)+(yspeed.Value^2))^0.5
if r==0 then return end
x=xspeed.Value/r
y=yspeed.Value/r
xcomp=x*math.cos(theta)-y*math.sin(theta)
ycomp=x*math.sin(theta)+y*math.cos(theta)
xspeed.Value=xcomp*r
yspeed.Value=ycomp*r
if isKeyPressed(0x26) then
xspeed.Value=xcomp*r*mul
yspeed.Value=ycomp*r*mul
end
if isKeyPressed(0x28) then
xspeed.Value=xcomp*r/(mul*1.01)
yspeed.Value=ycomp*r/(mul*1.01)
end
end
timer=createTimer()
timer.Interval=50
timer.OnTimer=rotate
timer.Enabled=true
[DISABLE]
timer.destroy()
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>8</ID>
<Description>"Speed capture script"</Description>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : acs.exe
Version:
Date : 2024-07-22
Author : atult
This script does blah blah blah
}
[ENABLE]
aobscanmodule(speedy,acs.exe,8B 82 18 01 00 00 F3) // should be unique
alloc(newmem,$1000,speedy)
alloc(speedrdx,8)
alloc(flag,4)
registersymbol(flag)
registersymbol(speedrdx)
label(code)
label(return)
newmem:
cmp [flag],0
jne code
mov [speedrdx],rdx
mov [flag],1
code:
mov eax,[rdx+00000118]
jmp return
speedy:
jmp newmem
nop
return:
registersymbol(speedy)
flag:
db
[DISABLE]
speedy:
db 8B 82 18 01 00 00
unregistersymbol(speedrdx)
unregistersymbol(speedy)
dealloc(newmem)
unregistersymbol(flag)
dealloc(speedrdx)
dealloc(flag)
{
// ORIGINAL CODE - INJECTION POINT: acs.exe+31A7E
acs.exe+31A46: F3 0F 59 81 E0 00 00 00 - mulss xmm0,[rcx+000000E0]
acs.exe+31A4E: F3 0F 59 99 F8 00 00 00 - mulss xmm3,[rcx+000000F8]
acs.exe+31A56: F3 0F 59 89 E8 00 00 00 - mulss xmm1,[rcx+000000E8]
acs.exe+31A5E: F3 0F 58 F0 - addss xmm6,xmm0
acs.exe+31A62: F3 0F 58 F1 - addss xmm6,xmm1
acs.exe+31A66: F3 0F 59 A9 F0 00 00 00 - mulss xmm5,[rcx+000000F0]
acs.exe+31A6E: 48 8B 4C 24 60 - mov rcx,[rsp+60]
acs.exe+31A73: 89 01 - mov [rcx],eax
acs.exe+31A75: 8B 82 14 01 00 00 - mov eax,[rdx+00000114]
acs.exe+31A7B: 89 41 04 - mov [rcx+04],eax
// ---------- INJECTING HERE ----------
acs.exe+31A7E: 8B 82 18 01 00 00 - mov eax,[rdx+00000118]
// ---------- DONE INJECTING ----------
acs.exe+31A84: F3 44 0F 58 C5 - addss xmm8,xmm5
acs.exe+31A89: F3 44 0F 58 C3 - addss xmm8,xmm3
acs.exe+31A8E: 89 41 08 - mov [rcx+08],eax
acs.exe+31A91: F3 0F 10 8A 24 01 00 00 - movss xmm1,[rdx+00000124]
acs.exe+31A99: F3 0F 10 A2 28 01 00 00 - movss xmm4,[rdx+00000128]
acs.exe+31AA1: F3 0F 10 92 20 01 00 00 - movss xmm2,[rdx+00000120]
acs.exe+31AA9: 0F 28 C4 - movaps xmm0,xmm4
acs.exe+31AAC: F3 0F 59 E7 - mulss xmm4,xmm7
acs.exe+31AB0: 0F 28 D9 - movaps xmm3,xmm1
acs.exe+31AB3: F3 0F 59 C6 - mulss xmm0,xmm6
}
</AssemblerScript>
</CheatEntry>
</CheatEntries>
<CheatCodes>
<CodeEntry>
<Description>Code :addsd xmm0,[rcx+20] (gear something)</Description>
<AddressString>acs.exe+2CCE4D</AddressString>
<Before>
<Byte>28</Byte>
<Byte>C1</Byte>
<Byte>0F</Byte>
<Byte>28</Byte>
<Byte>D9</Byte>
</Before>
<Actual>
<Byte>F2</Byte>
<Byte>0F</Byte>
<Byte>58</Byte>
<Byte>41</Byte>
<Byte>20</Byte>
</Actual>
<After>
<Byte>F2</Byte>
<Byte>0F</Byte>
<Byte>11</Byte>
<Byte>41</Byte>
<Byte>20</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>Code :movss xmm2,[rbx+00000528] (maybe wheel speed)</Description>
<AddressString>acs.exe+2EA83A</AddressString>
<Before>
<Byte>A3</Byte>
<Byte>74</Byte>
<Byte>02</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Before>
<Actual>
<Byte>F3</Byte>
<Byte>0F</Byte>
<Byte>10</Byte>
<Byte>93</Byte>
<Byte>28</Byte>
<Byte>05</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Actual>
<After>
<Byte>0F</Byte>
<Byte>2F</Byte>
<Byte>D0</Byte>
<Byte>76</Byte>
<Byte>05</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>Code :mov eax,[rdx+00000118] (y speed)</Description>
<AddressString>acs.exe+31A7E</AddressString>
<Before>
<Byte>00</Byte>
<Byte>00</Byte>
<Byte>89</Byte>
<Byte>41</Byte>
<Byte>04</Byte>
</Before>
<Actual>
<Byte>8B</Byte>
<Byte>82</Byte>
<Byte>18</Byte>
<Byte>01</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Actual>
<After>
<Byte>F3</Byte>
<Byte>44</Byte>
<Byte>0F</Byte>
<Byte>58</Byte>
<Byte>C5</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>Code :comiss xmm8,[rbx+00000284] (Points)</Description>
<AddressString>acs.exe+224CB8</AddressString>
<Before>
<Byte>8B</Byte>
<Byte>E0</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Before>
<Actual>
<Byte>44</Byte>
<Byte>0F</Byte>
<Byte>2F</Byte>
<Byte>83</Byte>
<Byte>84</Byte>
<Byte>02</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Actual>
<After>
<Byte>76</Byte>
<Byte>0A</Byte>
<Byte>41</Byte>
<Byte>0F</Byte>
<Byte>28</Byte>
</After>
</CodeEntry>
</CheatCodes>
<UserdefinedSymbols/>
</CheatTable>