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 


C+How can I convert that script to assembly(Multiple labels)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
B14CKS1D3
Cheater
Reputation: 0

Joined: 30 Jul 2014
Posts: 26

PostPosted: Wed Jun 15, 2016 3:47 pm    Post subject: C+How can I convert that script to assembly(Multiple labels) Reply with quote

I'm trying to convert the following script to assembly, but I can't get it to work. I tried to follow a tutorial to convert it but this script is more complex and I can't figure it out.
Here's the Assembly Script:

Code:
aobscanmodule(SetEntityDead,Game.exe,F3 41 0F 5C 70 10)
alloc(newmem,$1000,SetEntityDead)

label(code)
label(return)
label(is_player)

newmem:
  push rcx
  mov rcx,[some_ptr]
  mov rcx,[rcx+3d8]
  cmp rcx,rdx
  je is_player
  mov rcx,[some_ptr]
  mov rcx,[rcx+3e0]
  cmp rcx,rdx
  je is_player
  pop rcx
  jmp code

is_player:
  pop rcx
  movaps xmm6,xmm8
  jmp return

code:
  subss xmm6,[r8+10]
  jmp return

death:
  jmp newmem
  nop
return:
registersymbol(SetEntityDead)

[DISABLE]
death:
  db F3 41 0F 5C 70 10
unregistersymbol(SetEntityDead)
dealloc(newmem)
</AssemblerScript>


some_ptr
Code:

[ENABLE]
aobscanmodule(get_ptr,Game.exe,48 8B 81 E0 03 00 00 48 8B)
alloc(newmem,$1000,get_ptr) // By Lobix300
alloc(some_ptr,8)

label(code)
label(return)

newmem:

code:
  mov qword ptr [some_ptr],rcx
  mov rax,[rcx+000003E0]
  jmp return

get_ptr:
  jmp code
  nop
  nop
return:
registersymbol(get_ptr)
registersymbol(some_ptr)



Can anyone help me convert this to c++?
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Thu Jun 16, 2016 3:13 am    Post subject: Reply with quote

wrote:
I'm trying to convert the following script to assembly

Nope, I think you want to convert that assembly script to a c++ version of it resp. include that into some c++ program Wink

But 10s of googling brought me all the results you'll need:
https://msdn.microsoft.com/de-de/library/4ks26t93.aspx
https://de.wikibooks.org/wiki/C%2B%2B-Programmierung:_Inline-Assembler
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Tue Jun 21, 2016 2:40 pm    Post subject: Reply with quote

Wow, haven't been here for quite a time..
hope that's still relevant
http://realforum.cheatengine.org/viewtopic.php?p=4302768&sid=2b691ce954c89c35b3097fd0fed0095a
Smile

_________________
Stylo
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 programming 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