-
Notifications
You must be signed in to change notification settings - Fork 1
/
h3hota.txt
566 lines (497 loc) · 12.7 KB
/
h3hota.txt
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="24">
<CheatEntries>
<CheatEntry>
<ID>2</ID>
<Description>"PlayerID"</Description>
<LastState Value="6" RealAddress="0069CCF4"/>
<VariableType>Byte</VariableType>
<Address>h3hota.exe+29CCF4</Address>
</CheatEntry>
<CheatEntry>
<ID>5</ID>
<Description>"Unlimited Movement"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : h3hota.exe
Version:
Date : 2016-10-12
Author : Kien
This script does blah blah blah
}
//sub edx,ecx
//cmp edx,eax
//mov [esi+4D],edx
define(playerID, [h3hota.exe+29CCF4])
define(move,2B D1 3B D0 89 56 4D)
define(embark,C7 46 4D 00 00 00 00) //mov [esi+4D],00000000
define(disembark,C7 46 4D 00 00 00 00) //mov [esi+4D],00000000
define(pond,C7 47 4D 00 00 00 00) //mov [edi+4D],00000000
define(copyMove,8B 57 49 3B C2) //mov edx,[edi+49] //cmp eax,edx
define(dig,C7 42 4D 00 00 00 00) //mov [edx+4D],00000000
[ENABLE]
//aobscanmodule should be used when the array of bytes change as game restart
//otherwise we use static address for simplicity.
//aobscanmodule(playerMove,h3hota.exe,2B D1 3B D0 89 56 4D) // should be unique
alloc(customcode,2048,h3hota.exe)
label(PlayerMove)
label(moveExit)
label(NPCMove)
label(PlayerEmbark)
label(embarkExit)
label(NPCEmbark)
label(PlayerDisembark)
label(disembarkExit)
label(NPCDisembark)
label(PlayerSwanPond)
label(pondExit)
label(NPCSwanPond)
label(PlayerCompareMove)
label(compareMoveExit)
label(NPCCompareMove)
label(PlayerDig)
label(digExit)
label(NPCDig)
registersymbol(customcode)
//============CUSTOM CODE=====================
customcode:
//section1
PlayerMove:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCMove
db 90 90 90 90
//cmp edx,eax
//mov [esi+4D],edx
jmp moveExit
NPCMove:
db move
jmp moveExit
//end section1
//section2
PlayerEmbark:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCEmbark
db 90 90 90 90 90 90 90
jmp embarkExit
NPCEmbark:
db embark
jmp embarkExit
//end section2
//section3
PlayerDisembark:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCDisembark
db 90 90 90 90 90 90 90
jmp disembarkExit
NPCDisembark:
db disembark
jmp disembarkExit
//end section3
//section4
//Swan pond (+2 luck for all movement)
//Could have further memory analysis here
PlayerSwanPond:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCSwanPond
db 90 90 90 90 90 90 90
jmp pondExit
NPCSwanPond:
mov [edi+4D],00000000
jmp pondExit
//end section4
//section5
PlayerCompareMove:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCCompareMove
mov edx,[edi+4D]
cmp eax,edx
jmp compareMoveExit
NPCCompareMove:
db copyMove
jmp compareMoveExit
//end section5
//section6
PlayerDig:
{$lua}
return string.format('cmp byte ptr[esi+22],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCDig
db 90 90 90 90 90 90 90
jmp digExit
NPCDig:
db dig
jmp digExit
//end section6
//============END CUSTOM CODE=================
//===============INJECION=====================
"h3hota.exe"+80AA8:
jmp PlayerMove
nop
nop
moveExit:
"h3hota.exe"+9E340:
jmp PlayerDisembark
nop
nop
disembarkExit:
"h3hota.exe"+A0D08:
jmp PlayerEmbark
nop
nop
embarkExit:
"h3hota.exe"+A88CB:
jmp PlayerSwanPond
nop
pondExit:
"h3hota.exe"+EC4A:
jmp PlayerCompareMove
compareMoveExit:
"h3hota.exe"+F0CC:
jmp PlayerDig
nop
nop
digExit:
//============END INJECION=====================
[DISABLE]
"h3hota.exe"+80AA8:
db move
"h3hota.exe"+9E340:
db disembark
"h3hota.exe"+A0D08:
db embark
"h3hota.exe"+A88CB:
db pond
"h3hota.exe"+EC4A:
db copyMove
"h3hota.exe"+F0CC:
db dig
unregistersymbol(customcode)
dealloc(customcode)
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>928</ID>
<Description>"Minimum Resource"</Description>
<Options moHideChildren="1"/>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
function setResources()
local pointer = readPointer("0069CCFC")
for i = 6, 0, -1 do
local addr = pointer + 0x9c + 4*i
if i==6 then
if readPointer(addr) < 5000000 then
writeInteger(addr, 5000000)
else
break
end
else
if readPointer(addr) < 5000 then
writeInteger(addr, 5000)
end
end
end
end
setResources()
GameTimer=createTimer(nil)
GameTimer.Interval=5000
GameTimer.OnTimer = setResources
GameTimer.Enabled = true
[DISABLE]
GameTimer.destroy()
{$asm}
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>942</ID>
<Description>"Unlimited Building"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : h3hota.exe
Version:
Date : 2017-08-11
Author : Kien
Unlimited Building
}
define(address,"h3hota.exe"+1BF2A0)
define(build,C6 46 02 01 8B 86 50 01 00 00)
[ENABLE]
assert(address,build)
alloc(unlimitedbuild,$1000)
label(PlayerBuild)
label(buildExit)
label(NPCBuild)
registersymbol(unlimitedbuild)
//============CUSTOM CODE=====================
unlimitedbuild:
//section1
PlayerBuild:
{$lua}
return string.format('cmp byte ptr [esi+1],%d', readBytes('h3hota.exe+29CCF4'))
{$asm}
jne NPCBuild
nop
mov eax,[esi+00000150]
jmp buildExit
NPCBuild:
db build
jmp buildExit
//end section1
//============END CUSTOM CODE=================
//===============INJECION=====================
address:
jmp PlayerBuild
db 90 90 90 90 90
buildExit:
//============END INJECION=====================
[DISABLE]
address:
db build
// mov byte ptr [esi+02],01
// mov eax,[esi+00000150]
unregistersymbol(unlimitedbuild)
dealloc(unlimitedbuild)
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>940</ID>
<Description>"Last Damaged Unit"</Description>
<VariableType>4 Bytes</VariableType>
<Address>"hota.dll"+0008C470</Address>
<Offsets>
<Offset>4C</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>935</ID>
<Description>"Unit With Turn in Battle"</Description>
<VariableType>4 Bytes</VariableType>
<Address>"hota.dll"+0008C354</Address>
<Offsets>
<Offset>4C</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>941</ID>
<Description>"Godmod"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : h3hota.exe
Version:
Date : 2016-10-29
Author : Kien
This script does godmod!
}
define(battledamage,"h3hota.exe"+43E0C)
define(origincode,8B C2 89 56 4C)
[ENABLE]
//check whether exe contains this code
assert(battledamage,origincode)
alloc(newcode,$1000)
label(godmod)
label(return)
label(hitkill)
newcode:
godmod:
//if player casts magic = 1 hit kill
//cmp [["hota.dll"+0008C354]+4C],0
//je hitkill
//if player attacking = 1 hit kill
mov eax,[esi+4C]
cmp [["hota.dll"+0008C354]+4C],eax
je hitkill
//otherwise do not write to unit's health
mov eax,edx
nop
//mov [esi+4C],edx
jmp return
hitkill:
//1 hit kill = 0 hit points for opponent
mov eax,0
mov [esi+4C],0
jmp return
battledamage:
jmp newcode
return:
[DISABLE]
battledamage:
db origincode
// mov eax,edx
// mov [esi+4C],edx
dealloc(newcode)
{
// ORIGINAL CODE - INJECTION POINT: "h3hota.exe"+43E0C
"h3hota.exe"+43DF0: 88 8E E9 00 00 00 - mov [esi+000000E9],cl
"h3hota.exe"+43DF6: 7E 06 - jle h3hota.exe+43DFE
"h3hota.exe"+43DF8: 8B 56 4C - mov edx,[esi+4C]
"h3hota.exe"+43DFB: 89 56 50 - mov [esi+50],edx
"h3hota.exe"+43DFE: 8B 46 4C - mov eax,[esi+4C]
"h3hota.exe"+43E01: 3B F8 - cmp edi,eax
"h3hota.exe"+43E03: 7E 02 - jle h3hota.exe+43E07
"h3hota.exe"+43E05: 8B F8 - mov edi,eax
"h3hota.exe"+43E07: 8B 56 4C - mov edx,[esi+4C]
"h3hota.exe"+43E0A: 2B D7 - sub edx,edi
// ---------- INJECTING HERE ----------
"h3hota.exe"+43E0C: 8B C2 - mov eax,edx
"h3hota.exe"+43E0E: 89 56 4C - mov [esi+4C],edx
// ---------- DONE INJECTING ----------
"h3hota.exe"+43E11: 85 C0 - test eax,eax
"h3hota.exe"+43E13: 7F 06 - jg h3hota.exe+43E1B
"h3hota.exe"+43E15: E9 97 ED F3 FF - jmp 00382BB1
"h3hota.exe"+43E1A: 90 - nop
"h3hota.exe"+43E1B: 6A 3E - push 3E
"h3hota.exe"+43E1D: 8B CE - mov ecx,esi
"h3hota.exe"+43E1F: E8 0C 04 00 00 - call h3hota.exe+44230
"h3hota.exe"+43E24: 6A 46 - push 46
"h3hota.exe"+43E26: 8B CE - mov ecx,esi
"h3hota.exe"+43E28: E8 03 04 00 00 - call h3hota.exe+44230
}
</AssemblerScript>
</CheatEntry>
</CheatEntries>
<CheatCodes>
<CodeEntry>
<Description>Code :mov [esi+18],00000000</Description>
<Address>0046320E</Address>
<ModuleName>h3hota.exe</ModuleName>
<ModuleNameOffset>6320E</ModuleNameOffset>
<Before>
<Byte>C6</Byte>
<Byte>00</Byte>
<Byte>55</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Before>
<Actual>
<Byte>C7</Byte>
<Byte>46</Byte>
<Byte>18</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</Actual>
<After>
<Byte>8D</Byte>
<Byte>4E</Byte>
<Byte>CC</Byte>
<Byte>C7</Byte>
<Byte>06</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>Code :mov [ebx+4C],ecx</Description>
<Address>0043D466</Address>
<ModuleName>h3hota.exe</ModuleName>
<ModuleNameOffset>3D466</ModuleNameOffset>
<Before>
<Byte>4D</Byte>
<Byte>0C</Byte>
<Byte>89</Byte>
<Byte>43</Byte>
<Byte>34</Byte>
</Before>
<Actual>
<Byte>89</Byte>
<Byte>4B</Byte>
<Byte>4C</Byte>
</Actual>
<After>
<Byte>8D</Byte>
<Byte>14</Byte>
<Byte>C5</Byte>
<Byte>00</Byte>
<Byte>00</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>Building</Description>
<Address>005BF2A0</Address>
<ModuleName>h3hota.exe</ModuleName>
<ModuleNameOffset>1BF2A0</ModuleNameOffset>
<Before>
<Byte>46</Byte>
<Byte>02</Byte>
<Byte>02</Byte>
<Byte>EB</Byte>
<Byte>04</Byte>
</Before>
<Actual>
<Byte>C6</Byte>
<Byte>46</Byte>
<Byte>02</Byte>
<Byte>01</Byte>
</Actual>
<After>
<Byte>8B</Byte>
<Byte>86</Byte>
<Byte>50</Byte>
<Byte>01</Byte>
<Byte>00</Byte>
</After>
</CodeEntry>
<CodeEntry>
<Description>New day: reset building</Description>
<Address>004C7D7F</Address>
<ModuleName>h3hota.exe</ModuleName>
<ModuleNameOffset>C7D7F</ModuleNameOffset>
<Before>
<Byte>14</Byte>
<Byte>16</Byte>
<Byte>02</Byte>
<Byte>00</Byte>
<Byte>47</Byte>
</Before>
<Actual>
<Byte>C6</Byte>
<Byte>44</Byte>
<Byte>31</Byte>
<Byte>02</Byte>
<Byte>00</Byte>
</Actual>
<After>
<Byte>81</Byte>
<Byte>C6</Byte>
<Byte>68</Byte>
<Byte>01</Byte>
<Byte>00</Byte>
</After>
</CodeEntry>
</CheatCodes>
<UserdefinedSymbols>
<SymbolEntry>
<Name>stats</Name>
<Address>7FF65FBEF1D2</Address>
</SymbolEntry>
<SymbolEntry>
<Name>player</Name>
<Address>7FF6F55C23AC</Address>
</SymbolEntry>
<SymbolEntry>
<Name>player_ptr</Name>
<Address>7FF6F4BE0022</Address>
</SymbolEntry>
<SymbolEntry>
<Name>god</Name>
<Address>7FF6F5966C0A</Address>
</SymbolEntry>
<SymbolEntry>
<Name>god_code</Name>
<Address>7FF6F4BD0000</Address>
</SymbolEntry>
</UserdefinedSymbols>
<Comments>Info about this table:
</Comments>
</CheatTable>