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 


Static double address problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 4:39 pm    Post subject: Static double address problem Reply with quote

Code:
mov [mine3],00000000
mov [mine3+4],40590000

    push eax
mov eax,[mine3+4]
mov [008AB088+4],eax
    pop eax

Pretty much there's this static double address ([008AB088])that I can change in the CE table fine (although I can't in the memory viewer?), but once I use the code above it crashes the game. Any idea what's wrong?

It's current value is 75, and I'm trying to change it to 100.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Aug 17, 2015 5:31 pm    Post subject: Reply with quote

Not sure what the first half of your script is accomplishing.
And where's the: mov [008AB088],00000000
All you really need is:
Code:
[ENABLE]
008AB088:
dq (double)100
[DISABLE]
008AB088:
dq (double)75
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 6:02 pm    Post subject: Reply with quote

Zanzer wrote:
Not sure what the first half of your script is accomplishing.
And where's the: mov [008AB088],00000000
All you really need is:
Code:
[ENABLE]
008AB088:
dq (double)100
[DISABLE]
008AB088:
dq (double)75

Oh, I was just playing around.
It worked! But why wouldn't it work my way?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Aug 17, 2015 6:28 pm    Post subject: Reply with quote

What did you define "mine3" as?
And you needed to move 0 into [008AB088],
Code:
    push eax
mov eax,[mine3]
mov [008AB088],eax
mov eax,[mine3+4]
mov [008AB088+4],eax
    pop eax
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 6:42 pm    Post subject: Reply with quote

Zanzer wrote:
What did you define "mine3" as?
And you needed to move 0 into [008AB088],
Code:
    push eax
mov eax,[mine3]
mov [008AB088],eax
mov eax,[mine3+4]
mov [008AB088+4],eax
    pop eax

Nope still crashes
Code:

alloc(mine3,16)
registersymbol(mine3)
...
mov [mine3],00000000
mov [mine3+4],40590000

    push eax
mov eax,[mine3]
mov [008AB088],eax
mov eax,[mine3+4]
mov [008AB088+4],eax
    pop eax

I just gave mine3 16 bytes to work with.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Aug 17, 2015 7:23 pm    Post subject: Reply with quote

Sounds like your other code is causing the crash.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 7:38 pm    Post subject: Reply with quote

Zanzer wrote:
Sounds like your other code is causing the crash.

Other code? That's all I got.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Aug 17, 2015 7:43 pm    Post subject: Reply with quote

Your injection point? Show the whole script.
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 7:52 pm    Post subject: Reply with quote

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

alloc(mine3,16)
registersymbol(mine3)

//mb_warband.exe+4AB088:
//dq (double)100
//mb_warband.exe+501BC0:
//dq (double)65

newmem: //this is allocated memory, you have read,write,execute access
//[mb_warband.exe+4AB088] //FOV
//[mb_warband.exe+501BC0] //Zoom
//00000000
//40590000

mov [mine3],00000000
mov [mine3+4],40590000

    push eax
mov eax,[mine3]
mov [008AB088],eax
mov eax,[mine3+4]
mov [008AB088+4],eax
    pop eax

originalcode:
fstp dword ptr [ebp+000003D4]

exit:
jmp returnhere

"mb_warband.exe"+20106E:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(mine3)
unregistersymbol(mine3)
"mb_warband.exe"+20106E:
fstp dword ptr [ebp+000003D4]
//Alt: db D9 9D D4 03 00 00
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Aug 17, 2015 8:01 pm    Post subject: Reply with quote

Looks like you should replace
[008AB088] with [mb_warband.exe+4AB088]
and
[008AB088+4] with [mb_warband.exe+4AB08C]
Back to top
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Mon Aug 17, 2015 8:10 pm    Post subject: Reply with quote

Zanzer wrote:
Looks like you should replace
[008AB088] with [mb_warband.exe+4AB088]
and
[008AB088+4] with [mb_warband.exe+4AB08C]


Oh, right; forgot to mention, those are alternative addresses I used; thought maybe that was the problem, turns out it wasn't...

well, I guess it's the game, cause the instructions work fine on other stuff.
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 Gamehacking 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