Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Inject crash my game, but code list work

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Wed Feb 19, 2014 7:02 pm    Post subject: Inject crash my game, but code list work Reply with quote

This is my code in code list (working):
Code:

newmem:
nop
nop

originalcode:
sub [edi], eax


But if I copy it in script, game crash when freeze, same address, same code. Why? Rolling Eyes
P.S. Money script work

Bioshock (Steam)
Windows 7 64bits
8gb ram
Cheat engine 6.3
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Feb 19, 2014 7:48 pm    Post subject: Reply with quote

Please show entire script.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Wed Feb 19, 2014 8:09 pm    Post subject: Reply with quote

why are you nopping in newmem (your code cave), that makes the whole point of a code cave useless.

Show your full script so we can see what you are doing wrong (from the looks of it...everything!)

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Wed Feb 19, 2014 9:01 pm    Post subject: Reply with quote

++METHOS wrote:
Please show entire script.


Complete code:
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
nop
nop
mov edi,[edi]
mov ecx,[esp+14]

originalcode:
sub [edi],eax
mov edi,[edi]
mov ecx,[esp+14]

exit:
jmp returnhere

"bioshock.exe"+3DCB0C:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"bioshock.exe"+3DCB0C:
sub [edi],eax
mov edi,[edi]
mov ecx,[esp+14]
//Alt: db 29 07 8B 3F 8B 4C 24 14


Code list make this change and is works:
nop
nop
mov edi,[edi]
mov ecx,[esp+14]

STN wrote:

why are you nopping in newmem (your code cave), that makes the whole point of a code cave useless.

Show your full script so we can see what you are doing wrong (from the looks of it...everything!)


I put nop and others code in newmen, because is written '//place your code here'
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Feb 19, 2014 9:10 pm    Post subject: Reply with quote

I'm not sure what you're asking, what's working and what isn't working for you...but if nop'ing the instruction works for you, then this should work for you, as it essentially does the same thing:

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
mov edi,[edi]
mov ecx,[esp+14]
jmp returnhere

"bioshock.exe"+3DCB0C:
jmp newmem
nop
nop
nop
returnhere:

[DISABLE]
dealloc(newmem)
"bioshock.exe"+3DCB0C:
sub [edi],eax
mov edi,[edi]
mov ecx,[esp+14]

//Alt: db 29 07 8B 3F 8B 4C 24 14
Back to top
View user's profile Send private message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Wed Feb 19, 2014 9:36 pm    Post subject: Reply with quote

It's work only in code list, but in script the same code crash when freeze. I've been thinking about 'If code is the same, why script crash?' And about the STN question? The newmem is the wrong place to put altered code? Thank you.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Feb 19, 2014 9:41 pm    Post subject: Reply with quote

If my script above doesn't work, then you've done something wrong. Close the game and close cheat engine. Try again. Make sure the location of the injection point is correct, and be sure to let CE auto-generate your script for you to eliminate any possible user-related errors.
Back to top
View user's profile Send private message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Fri Feb 21, 2014 7:19 am    Post subject: Reply with quote

I do like this:
CTRL+A -> Template -> Cheat table framework code -> Template -> code injection.
On 'Code List' I click 'replace with code that does nothing' and copy modification to my script (in newmem: ////place your code here), but when freeze the game crash.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Feb 21, 2014 12:14 pm    Post subject: Reply with quote

You are sure that replacing/NOP'ing the instruction does not crash the game? Replace the code (do not use script) and play the game for a while. If it doesn't crash, then the script above should also work. You can test by closing everything out, finding the instruction again and auto-generating a script at that injection point. Don't add anything to the script, just add it to your table and enable it. Does it crash?
Back to top
View user's profile Send private message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Fri Feb 21, 2014 1:09 pm    Post subject: Reply with quote

++METHOS wrote:
You are sure that replacing/NOP'ing the instruction does not crash the game? Replace the code (do not use script) and play the game for a while. If it doesn't crash, then the script above should also work. You can test by closing everything out, finding the instruction again and auto-generating a script at that injection point. Don't add anything to the script, just add it to your table and enable it. Does it crash?


yeh, I did it, in code list it works, but script no, same address, same code.
I see a video and this guy put 'jmp returnhere' after coding, maybe this my problem, I'll try again, thanks. Embarassed
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Feb 21, 2014 1:33 pm    Post subject: Reply with quote

You must be overlooking something.

Anyway, I don't believe there are any protections in place for this game, but I've never played it, so can't be sure. If you think there are, just ask your question in one of the Bioshock table/trainer threads.
Back to top
View user's profile Send private message
JairoTuto
How do I cheat?
Reputation: 0

Joined: 19 Feb 2014
Posts: 8

PostPosted: Fri Feb 21, 2014 4:06 pm    Post subject: Reply with quote

OK, thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites