2017-12-11 17:48 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000282Cheat Enginepublic2013-09-29 21:54
ReporterCsimbi 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusnewResolutionopen 
Summary0000282: CE6.3 - Custom templates for auto-assembler
DescriptionI find myself spending excessive time changing the automatically generated code every time I want to inject some code.
It'd far easier if I could create my own template somehow.
I am not sure how though.
I put the template I'd like to generate below.

Thank you for considering!
Additional Information[ENABLE]
aobscan(aobMyPoint,XX XX XX XX XX XX) <= Made from the highlighted instructions

alloc(newmem,4096) <= Still don't understand why 2048 is the default when 4k is allocated anyway.

label(aobMyPoint_r)
registersymbol(aobMyPoint_r)

label(lblMyPoint)
label(lblMyPointSkip)
label(lblMyPointRet)

label(bEnableMyPoint)
registersymbol(bEnableMyPoint)

newmem:
bEnable:
dd 1

lblMyPoint:
cmp dword ptr [bEnableMyPoint],1
jne short lblMyPointSkip
// TODO: Code when enabled
lblMyPointSkip:

// Original code goes here

jmp lblMyPointRet

//"process.exe"+ABCDEF: <= Hook, retaining original location
aobMyPoint:
aobMyPoint_r:
jmp lblMyPoint
nop
lblMyPointRet:

[DISABLE]
//"process.exe"+ABCDEF: <= Hook, retaining original location
aobMyPoint_r:

// Original code goes here <= Original code, but commented out.
db XX XX XX XX XX XX <= Byte code, shorted than AOB search on top.

unregistersymbol(aobMyPoint_r)

unregistersymbol(bEnableMyPoint)

dealloc(newmem)
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000582

Csimbi (reporter)

Last edited: 2013-09-24 03:13

It occurred to me that CE could ask me "What do you want this injection point called?" - or something like that, where I could enter the name I want instead of 'MyPoint' (so I would not have to do a manual search/replace afterwards).

~0000583

mgr_inz_Player (reporter)

"Still don't understand why 2048 is the default when 4k is allocated anyway"

Scenario 1
You merged two scripts into one, and you have those two:
alloc(newmem1,2048)
alloc(newmem2,2048)

Allocated memory will be 4096 instead of 8192



Scenario 2
You have few allocs:
alloc(newmem,2048)
alloc(var1,4)
alloc(var2,4)

Again, allocated memory will be 4096 instead of 8192.







Enable this script and check "userdefined symbols"
######################
[ENABLE]
alloc(newmem,2048)
alloc(var1,4)
alloc(var2,4)

label(test1)
label(test2)
label(test3)
registersymbol(test1)
registersymbol(test2)
registersymbol(test3)

newmem:
test1:
dd 0

var1:
test2:
dd 56

var2:
test3:
dd 78

[DISABLE]
dealloc(newmem)
dealloc(var1)
dealloc(var2)

unregistersymbol(test1)
unregistersymbol(test2)
unregistersymbol(test3)
######################

You will see something like this:

test1, address = XXXX0000
test2, address = XXXX0800
test3, address = XXXX0804

~0000584

Csimbi (reporter)

@mgr_inz_Player
Got it, thank0, but still, those are not *good* reasons.

~0000585

Dark Byte (developer)

Scenario2 is a method i often use myself, that way no need to work with cumbersome labels

Also, it allocates 64KB virtual address space (only 4kb physical)

~0000586

Csimbi (reporter)

God works in mysterious ways ;-)
+Notes

-Issue History
Date Modified Username Field Change
2013-09-24 00:40 Csimbi New Issue
2013-09-24 03:13 Csimbi Note Added: 0000582
2013-09-24 03:13 Csimbi Note Edited: 0000582
2013-09-28 21:30 mgr_inz_Player Note Added: 0000583
2013-09-28 23:32 Csimbi Note Added: 0000584
2013-09-29 20:58 Dark Byte Note Added: 0000585
2013-09-29 21:54 Csimbi Note Added: 0000586
+Issue History