View previous topic :: View next topic |
Author |
Message |
sven3107 Expert Cheater
Reputation: 0
Joined: 04 Feb 2009 Posts: 118 Location: Belgium
|
Posted: Tue Mar 10, 2009 2:50 pm Post subject: [Question] Self-Injecting Code |
|
|
Hey, got another question (YES another one).
i found out you can make permanent adjustments to exe and other files by just opening the file instead of running it and attaching CE.
My question is if i can use some kind of function to make the executable inject the code below as soon as i run it.
Code: |
alloc(newmem,2048)
label(returnhere)
label(do)
label(undo)
label(exit)
UObject::execAddEqual_FloatFloat+A1:
jmp newmem
returnhere:
newmem:
cmp edi,0F000000
ja undo
jna do
do:
fst dword ptr [edi]
pop edi
fstp dword ptr [edx]
jmp returnhere
undo:
nop
nop
pop edi
fstp dword ptr [edx]
jmp returnhere
exit:
jmp returnhere
|
It's not the biggest of code injections but i want to know if i can use something like
00033000:
db ....
so it would inject the code into itself when it starts up.
- It's a code that triggers rapid fire in UT2004, it checks if the address being modified is a reload timer and jumps to a NOP if true.
|
|
Back to top |
|
 |
mStorm Expert Cheater
Reputation: 0
Joined: 21 Feb 2009 Posts: 107
|
Posted: Tue Mar 10, 2009 3:11 pm Post subject: |
|
|
This is something I'm also interested in.
I would think you would use some type of dll injection via C++?
|
|
Back to top |
|
 |
sven3107 Expert Cheater
Reputation: 0
Joined: 04 Feb 2009 Posts: 118 Location: Belgium
|
Posted: Tue Mar 10, 2009 3:39 pm Post subject: |
|
|
i don't know C# or C++...
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25804 Location: The netherlands
|
Posted: Tue Mar 10, 2009 4:23 pm Post subject: |
|
|
dll injection also works with delphi (and a lot easier)
anyhow, you use alloc, which isn't directly possible by just editing the code. Unless you use code caves. (executable codecaves that is)
But keep in mind that sections will be loaded at different offsets, so you have to inspect the pe header to find out where the actual virtual address is and not the offset in the file.
But for an easier solutions: Just try a standalone trainer that executes that script
anyhow, since you're playing with ut2k4, I've attached a example of what you can do with ce combined with dll injection (ut2k42-ll.cea would be the one you want to execute)
Fun fact: This same dll is also used in my ut3 version
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
sven3107 Expert Cheater
Reputation: 0
Joined: 04 Feb 2009 Posts: 118 Location: Belgium
|
Posted: Wed Mar 11, 2009 7:41 am Post subject: |
|
|
So you can't just make it inject the code as soon as the game starts?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25804 Location: The netherlands
|
Posted: Wed Mar 11, 2009 12:30 pm Post subject: |
|
|
only if you code your own trainer that does all that
Ce's trainers currently only execute code on user request
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|