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 


How to changes values by reducing them in PES 6

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

Joined: 12 Oct 2021
Posts: 6

PostPosted: Thu Sep 08, 2022 7:37 am    Post subject: How to changes values by reducing them in PES 6 Reply with quote

I don't understand well about Cheat Engine, so I need help.

I'm playing a football video game, PES 6.

In a carrer mode called Master League, where you have funds.

Before a match, you have an amount of funds (in my case 4550)

After a match, the fund swill increase by 500 (+goals bonus) when it's about a draw or by 1000 (+goals bonus) when it's about a win.

So draw= 500 + bonus (50 for each goal)
win= 1000 + bonus (50 for each goal)

For e.g. if my team draw without scoring (0-0), then the funds will increase only by 500 (without bonus).

[b]I want to reduce 500 and 1000 to make them for e.g. 250 and 500 (and then make a CT)
[/b]

Before playing a match, the funds were 4550
I searched for the address of the funds. It's [b]03CDD088[/b]

<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>0</ID>
<Description>"No description"</Description>
<LastState Value="5050" RealAddress="03CDD088"/>
<VariableType>4 Bytes</VariableType>
<Address>PES6.exe+38DD088</Address>
</CheatEntry>
</CheatEntries>
</CheatTable>


After a 0-0 draw (so +500), my fund became 5050.
This is what writes to this adress:

PES6.exe+2B49B6:
006B49B2 - 3B C3 - cmp eax,ebx
006B49B4 - 74 03 - je PES6.exe+2B49B9
[b]006B49B6 - 01 70 34 - add [eax+34],esi <<[/b]
006B49B9 - 5F - pop edi
006B49BA - 5E - pop esi

EAX=03CDD054
EBX=00000000
ECX=03C8AA40
EDX=000013BA
ESI=000001F4
EDI=000003E8
ESP=0571FBC8
EBP=00662F2F
EIP=006B49B9


In this case, esi (000001F4) = 500

After a win (2-0); 1000+100

PES6.exe+2B49B6:
006B49B2 - 3B C3 - cmp eax,ebx
006B49B4 - 74 03 - je PES6.exe+2B49B9
006B49B6 - 01 70 34 - add [eax+34],esi <<
006B49B9 - 5F - pop edi
006B49BA - 5E - pop esi

EAX=03CDD054
EBX=00000000
ECX=03C8AA40
EDX=00001C20
ESI=0000044C
EDI=000003E8
ESP=0571FBC8
EBP=00662F2F
EIP=006B49B9

The esi (0000044C) = 1100

How can I reduce the esi value when it's 500 and 1000 ?
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Thu Sep 08, 2022 10:11 am    Post subject: Reply with quote

with "006B49B6 - 01 70 34 - add [eax+34],esi" selected in the memory viewer, select auto-assemble and use the AOB template.

Then you can either right shift ESI or use a compare and replace.

cmp ESI, #500
JNE skip1
mov ESI, #250
skip1:
cmp ESI, #1000
JNE skip2
mov ESI, #500
skip2:
add [eax+34],esi


Naturally, you want to know that the only time that instruction is called and has a value of 500 or 1000 you want to change it. If it is reused and those values appear any other time, you may find unexpected behavior.
Back to top
View user's profile Send private message
1nn5
How do I cheat?
Reputation: 0

Joined: 12 Oct 2021
Posts: 6

PostPosted: Thu Sep 08, 2022 1:44 pm    Post subject: Reply with quote

[quote="cooleko"]with "006B49B6 - 01 70 34 - add [eax+34],esi" selected in the memory viewer, select auto-assemble and use the AOB template.

Then you can either right shift ESI or use a compare and replace.

cmp ESI, #500
JNE skip1
mov ESI, #250
skip1:
cmp ESI, #1000
JNE skip2
mov ESI, #500
skip2:
add [eax+34],esi


Naturally, you want to know that the only time that instruction is called and has a value of 500 or 1000 you want to change it. If it is reused and those values appear any other time, you may find unexpected behavior.[/quote]

This is the code, where should I put those in the code ?


[ENABLE]

aobscanmodule(INJECT,PES6.exe,01 70 34 5F 5E) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
add [eax+34],esi
pop edi
pop esi
jmp return

INJECT:
jmp newmem
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
db 01 70 34 5F 5E

unregistersymbol(INJECT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: PES6.exe+2B49B6

PES6.exe+2B499A: 5B - pop ebx
PES6.exe+2B499B: C3 - ret
PES6.exe+2B499C: E8 FF 18 FC FF - call PES6.exe+2762A0
PES6.exe+2B49A1: 88 44 24 10 - mov [esp+10],al
PES6.exe+2B49A5: 8B 4C 24 10 - mov ecx,[esp+10]
PES6.exe+2B49A9: 51 - push ecx
PES6.exe+2B49AA: E8 61 17 FC FF - call PES6.exe+276110
PES6.exe+2B49AF: 83 C4 04 - add esp,04
PES6.exe+2B49B2: 3B C3 - cmp eax,ebx
PES6.exe+2B49B4: 74 03 - je PES6.exe+2B49B9
// ---------- INJECTING HERE ----------
PES6.exe+2B49B6: 01 70 34 - add [eax+34],esi
// ---------- DONE INJECTING ----------
PES6.exe+2B49B9: 5F - pop edi
PES6.exe+2B49BA: 5E - pop esi
PES6.exe+2B49BB: 5B - pop ebx
PES6.exe+2B49BC: C3 - ret
PES6.exe+2B49BD: 8D 49 00 - lea ecx,[ecx+00]
PES6.exe+2B49C0: 93 - xchg eax,ebx
PES6.exe+2B49C1: 48 - dec eax
PES6.exe+2B49C2: 6B 00 93 - imul eax,[eax],-6D
PES6.exe+2B49C5: 48 - dec eax
PES6.exe+2B49C6: 6B 00 A6 - imul eax,[eax],-5A
}
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Thu Sep 08, 2022 2:36 pm    Post subject: Reply with quote

After "code:"
Dont leave both Adds, though, or you will get the original result.
Back to top
View user's profile Send private message
1nn5
How do I cheat?
Reputation: 0

Joined: 12 Oct 2021
Posts: 6

PostPosted: Thu Sep 08, 2022 2:48 pm    Post subject: Reply with quote

So, it should be like this ?

newmem:

code:
cmp ESI, #500
JNE skip1
mov ESI, #250
skip1:
cmp ESI, #1000
JNE skip2
mov ESI, #500
skip2:
add [eax+34],esi
pop edi
pop esi
jmp return

EDIT


Hey again,

So I used this

[code]newmem:

code:
cmp ESI, #500
JNE skip1
mov ESI, #250
skip1:
cmp ESI, #1000
JNE skip2
mov ESI, #500
skip2:
add [eax+34],esi
pop edi
pop esi
jmp return[/code]

And assigned it in the cheat table.

And made the script active, but after a draw I still get 500
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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