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 


I'm looking for a solution for the difference between SWF an

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1260

PostPosted: Thu Dec 19, 2019 6:35 pm    Post subject: I'm looking for a solution for the difference between SWF an Reply with quote

hi ..

Unfortunately, the game server has moved from SWF to Unity.
How do I change the same code now?

SWF example:
Code:
pushstring "EarnedStarsLastLevel"
; 62 05
getlocal 5
; 4f e7 8d 01 02
callpropvoid Qname(PackageNamespace(""),"setGlobalInt") 2
; 5f a4 4f
finddef Qname(PackageNamespace("application.gameInfo"),"GameInfo")
; 66 a4 4f
getproperty Qname(PackageNamespace("application.gameInfo"),"GameInfo")
; 66 a5 4f
getproperty Qname(PackageNamespace(""),"$")
; 46 da 4f 00
callproperty Qname(PackageNamespace(""),"getPlayer") 0
; 62 05
---------------------------------------
pushstring "EarnedStarsLastLevel"
; 24 64
pushbyte 100
; 4f c2 6c 02
callpropvoid Qname(PackageNamespace(""),"setGlobalInt") 2
; 5f fe 03
finddef Qname(PackageNamespace("application.gameInfo"),"GameInfo")
; 66 fe 03
getproperty Qname(PackageNamespace("application.gameInfo"),"GameInfo")
; 66 8c 4f
getproperty Qname(PackageNamespace(""),"$")
; 46 b6 5a 00
callproperty Qname(PackageNamespace(""),"getPlayer") 0
; 24 64
pushbyte 100


Code:
62 05 4f e7 8d 01 02 5f a4 4f 66 a4 4f 66 a5 4f 46 da 4f 00 62 05
24 64 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 24 64



Unity example:

Code:
         /* 0x0026BCFF 72B3DA0770   */ IL_0227: ldstr     "EarnedStarsLastLevel"
         /* 0x0026BD04 1106         */ IL_022C: ldloc.s   V_6
         /* 0x0026BD06 6F8D300006   */ IL_022E: callvirt  instance void GameInfo::setGlobalInt(string, int32)
         /* 0x0026BD0B 7E19190004   */ IL_0233: ldsfld    class GameInfo GameInfo::gameInfo
         /* 0x0026BD10 6F13310006   */ IL_0238: callvirt  instance class PlayerInfo GameInfo::getPlayer()
         /* 0x0026BD15 1106         */ IL_023D: ldloc.s   V_6
------------------------------------------------------------------------------         /* 0x0026BCFF 72????????   */ IL_0227: ldstr     "EarnedStarsLastLevel"
         /* 0x0026BD04 207D000000   */ IL_022C: ldc.i4    125
         /* 0x0026BD09 6F8D300006   */ IL_0231: callvirt  instance void GameInfo::setGlobalInt(string, int32)
         /* 0x0026BD0E 7E19190004   */ IL_0236: ldsfld    class GameInfo GameInfo::gameInfo
         /* 0x0026BD13 6F13310006   */ IL_023B: callvirt  instance class PlayerInfo GameInfo::getPlayer()
         /* 0x0026BD18 207D000000   */ IL_0240: ldc.i4    125


Code:
72 B3 DA 07 70 11 06 6F 8D 30 00 06 7E 19 19 00 04 6F 13 31 00 06 11 06
72 ?? ?? ?? ?? 20 7D 00 00 00 6F 8D 30 00 06 7E 19 19 00 04 6F 13 31 00 06 20 7D 00 00 00


------------------------------------------------

"72 ?? ?? ?? ??" >> This error is reflected in the game and when the code order, the game gives an error.
Is there a solution for Unity that will inject "125" without error?
Thanks in advance for the answer.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Thu Dec 19, 2019 10:32 pm    Post subject: This post has 1 review(s) Reply with quote

May use 2 byte short form, 1st byte is op code, 2nd byte is signed, so 80~ff => -128~-1.
https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.ldc_i4_s

_________________
- Retarded.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1260

PostPosted: Fri Dec 20, 2019 1:01 am    Post subject: Reply with quote

panraven wrote:
May use 2 byte short form, 1st byte is op code, 2nd byte is signed, so 80~ff => -128~-1.
https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.ldc_i4_s


Thanks master .
1F 7D = ldc_i4_s(125)

it worked, no error. Thank you. And +1

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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