Where Can I find tutorial about making an EDIT BOX to Code Injection?

marek1957

Expert Cheater
Dec 16, 2017
81
0
6
#1
Hello,
I was searching for a tutorial to learn how to make a working edit box for my code injection script. I have a script that you can change the amount of racers when you are racing, but I want to make a possibility that I will write a number on edit box and then freeze address and the written value will be activated in game. I dont know how to do this, is there any tutorial about that to learn that method?

I wanna use this method in my Code Injection Script.

My script:
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov [edi+2C],#24
originalcode:
mov eax,[edi+2C]
mov [esi+2C],eax

exit:
jmp returnhere

"Asphalt8.exe"+8710E:
jmp newmem
nop
returnhere:




[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Asphalt8.exe"+8710E:
mov eax,[edi+2C]
mov [esi+2C],eax
//Alt: db 8B 47 2C 89 46 2C
 

Blayde

Expert Cheater
Aug 25, 2017
220
1
16
#2
marek1957 post_id=29765 time=1515527303 user_id=11389 said:
Hello,
I was searching for a tutorial to learn how to make a working edit box for my code injection script. I have a script that you can change the amount of racers when you are racing, but I want to make a possibility that I will write a number on edit box and then freeze address and the written value will be activated in game. I dont know how to do this, is there any tutorial about that to learn that method?

I wanna use this method in my Code Injection Script.
You need edit box + check box ( to freeze address ).
Search on CE forum.

And you must delete this: mov [edi+2C],#24
or edit box will be useless.
 

marek1957

Expert Cheater
Dec 16, 2017
81
0
6
#3
Bro, I now that I need to have edit box + check box. But I don't know how change the function to working with. I was trying to add globalalloc(this,4) for example and then i was trying : mov [edi+2C],(this) - but this is not working. I don't know how to write a correct function.
 

TheyCallMeTim13

Wiki Monster
Talents
Fearless Donors
Mar 3, 2017
409
45
28
#4
So you you need to look in to and experiment with:
Lua Classes: Timer, CheatComponent
Lua Functions: readPointer, writeInteger, autoAssemble

But not really any tutorials that I know of.

I think the CheatComponent has an edit box, check box, and can freeze values, so I would start there for what you are doing. But I have not messed with it my self.
 

Acido

Cheater
Dec 20, 2017
40
0
6
#6
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(myEdit)
registersymbol(myEdit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov eax,[myEdit]
cmp eax,0
je originalcode
mov [edi+2C],eax
originalcode:
mov eax,[edi+2C]
mov [esi+2C],eax

exit:
jmp returnhere

myEdit:
  dd 0

"Asphalt8.exe"+8710E:
jmp newmem
nop
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(myEdit)

"Asphalt8.exe"+8710E:
mov eax,[edi+2C]
mov [esi+2C],eax
//Alt: db 8B 47 2C 89 46 2C
--

Add a new entry in table, under Address type: myEdit set it to 4 bytes. You do not need to freeze it either, just type your value you want into it.
 

marek1957

Expert Cheater
Dec 16, 2017
81
0
6
#7
hey Acido! Thank you for your help! It is working perfectly!!!!

I was trying to do the same with number of LAPS but when I freeze the script - I am instantly ending the race! Then when I unfreeze the script and do again the race, I will have a number of laps that I wrote. Why is that happening?

Original script of number of laps (code injecion):
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
mov [esi+18],#24
mov eax,[edi+1C]

exit:
jmp returnhere

"Asphalt8.exe"+870F3:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Asphalt8.exe"+870F3:
mov [esi+18],eax
mov eax,[edi+1C]
//Alt: db 89 46 18 8B 47 1C 89 46 1C 8B 47 20
My changed script like yours ACIDO but something is wrong..:
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(mama)
registersymbol(mama)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov eax,[mama]
cmp eax,0
je exit
mov [esi+1C],eax
originalcode:
mov eax,[edi+18]
mov [esi+1C],eax

exit:
jmp returnhere

mama:
 dd 0

"Asphalt8.exe"+870F3:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
unregistersymbol(mama)

"Asphalt8.exe"+870F3:
mov [esi+18],eax
mov eax,[edi+1C]
//Alt: db 89 46 18 8B 47 1C 89 46 1C 8B 47 20
 

Blayde

Expert Cheater
Aug 25, 2017
220
1
16
#8
marek1957 post_id=29770 time=1515537715 user_id=11389 said:
Bro, I now that I need to have edit box + check box. But I don't know how change the function to working with. I was trying to add globalalloc(this,4) for example and then i was trying : mov [edi+2C],(this) - but this is not working. I don't know how to write a correct function.
Ok. What are we talking about ?
Trainer or script ?
 

sbryzl

Expert Cheater
Mar 4, 2017
97
4
8
#9
One of these is wrong. They should be the same.
Code:
originalcode:
mov eax,[edi+18]
mov [esi+1C],eax
Code:
"Asphalt8.exe"+870F3:
mov [esi+18],eax
mov eax,[edi+1C]
 

Blayde

Expert Cheater
Aug 25, 2017
220
1
16
#10
marek1957 post_id=29775 time=1515543247 user_id=11389 said:
hey Acido! Thank you for your help! It is working perfectly!!!!

I was trying to do the same with number of LAPS but when I freeze the script - I am instantly ending the race! Then when I unfreeze the script and do again the race, I will have a number of laps that I wrote. Why is that happening?
Try:
Code:
[ENABLE]
alloc(newmem,2048)
alloc(mama,4)
label(returnhere)
label(originalcode)
label(exit)

mama:
 dd 0

newmem:
cmp [mama],0
je originalcode
mov eax,[mama]

originalcode:
mov [esi+18],eax
mov eax,[edi+1C]

exit:
jmp returnhere

"Asphalt8.exe"+870F3:
jmp newmem
nop
returnhere:
registersymbol(mama)


 
 
[DISABLE]
unregistersymbol(mama)
dealloc(newmem)
dealloc(mama)
"Asphalt8.exe"+870F3:
mov [esi+18],eax
mov eax,[edi+1C]
 
Dec 20, 2017
40
0
6
#11
marek1957 post_id=29775 time=1515543247 user_id=11389 said:
hey Acido! Thank you for your help! It is working perfectly!!!!

I was trying to do the same with number of LAPS but when I freeze the script - I am instantly ending the race! Then when I unfreeze the script and do again the race, I will have a number of laps that I wrote. Why is that happening?
Glad its working for you, as for your question on the other script, you're jumping over the original code to exit after the compare, jump to originalcode instead of exit, plus it looks like from your posted code that the value should go into esi+18 not esi+1C. Also you can't use the same code exactly cause eax will have your value in this function and you're overwriting it. You can use another register or use the code suggested by Blayde above, though you shouldn't need to allocate 4 bytes for it as he's doing, just registering it as a symbol is fine. It is already allocated in newmem.
 

sbryzl

Expert Cheater
Mar 4, 2017
97
4
8
#12
Acido post_id=29800 time=1515583408 user_id=11491 said:
. You can use another register or use the code suggested by Blayde above, though you shouldn't need to allocate 4 bytes for it as he's doing, just registering it as a symbol is fine. It is already allocated in newmem.
It's not allocated under newmem in Blayde's script.
 
Dec 20, 2017
40
0
6
#13
sbryzl post_id=29819 time=1515610749 user_id=592 said:
Acido post_id=29800 time=1515583408 user_id=11491 said:
. You can use another register or use the code suggested by Blayde above, though you shouldn't need to allocate 4 bytes for it as he's doing, just registering it as a symbol is fine. It is already allocated in newmem.
It's not allocated under newmem in Blayde's script.
No but that is why i said just register it as a symbol and it will already be allocated under newmem. But at the end of the day doesn't really matter.
 

sbryzl

Expert Cheater
Mar 4, 2017
97
4
8
#14
Acido post_id=29823 time=1515617202 user_id=11491 said:
sbryzl post_id=29819 time=1515610749 user_id=592 said:
Acido post_id=29800 time=1515583408 user_id=11491 said:
. You can use another register or use the code suggested by Blayde above, though you shouldn't need to allocate 4 bytes for it as he's doing, just registering it as a symbol is fine. It is already allocated in newmem.
It's not allocated under newmem in Blayde's script.
No but that is why i said just register it as a symbol and it will already be allocated under newmem. But at the end of the day doesn't really matter.
Just registering it as a symbol will not place it under newmem. You have to place that label under the newmem label in the script in order to locate it within newmem along with allocation designation.
 
Dec 20, 2017
40
0
6
#15
sbryzl post_id=29825 time=1515618334 user_id=592 said:
Acido post_id=29823 time=1515617202 user_id=11491 said:
sbryzl post_id=29819 time=1515610749 user_id=592 said:
It's not allocated under newmem in Blayde's script.
No but that is why i said just register it as a symbol and it will already be allocated under newmem. But at the end of the day doesn't really matter.
Just registering it as a symbol will not place it under newmem. You have to place that label under the newmem label in the script in order to locate it within newmem along with allocation designation.
Obviously and it was.

I'm not sure what point you're trying to make? the script as posted was correct, whatever you wanna allocate additional memory from another region or reuse what is already allocated is up to you of course. For me personally i don't really like to do extra allocations when they are not needed, but it will work just the same whatever you do it 1 way or the other.
 

sbryzl

Expert Cheater
Mar 4, 2017
97
4
8
#16
Acido post_id=29834 time=1515626750 user_id=11491 said:
sbryzl post_id=29825 time=1515618334 user_id=592 said:
Acido post_id=29823 time=1515617202 user_id=11491 said:
No but that is why i said just register it as a symbol and it will already be allocated under newmem. But at the end of the day doesn't really matter.
Just registering it as a symbol will not place it under newmem. You have to place that label under the newmem label in the script in order to locate it within newmem along with allocation designation.
Obviously and it was.

I'm not sure what point you're trying to make? the script as posted was correct, whatever you wanna allocate additional memory from another region or reuse what is already allocated is up to you of course. For me personally i don't really like to do extra allocations when they are not needed, but it will work just the same whatever you do it 1 way or the other.
I didn't try to make a point. I corrected faulty information.
 
Dec 20, 2017
40
0
6
#17
sbryzl post_id=29879 time=1515686802 user_id=592 said:
I didn't try to make a point. I corrected faulty information.
But the information wasn't faulty, sure i could have worded it a bit better, was talking in relation to the original script not the one posted by Blayde. Regardless gonna drop this here no point continuing the discussion about something that doesn't matter in the slightest and doesn't actually help the OP in any shape or form.
 

sbryzl

Expert Cheater
Mar 4, 2017
97
4
8
#18
Registering a variable as a symbol will not place it within allocated memory.
 
Top Bottom