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 


Help me to convert this code

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

Joined: 24 Sep 2021
Posts: 5

PostPosted: Wed Oct 13, 2021 10:53 am    Post subject: Help me to convert this code Reply with quote

Hello.

This code :''
Code:
[ENABLE]
{$lua}
if syntaxcheck then return end
onScriptActivate()

INJECT_SideManipulator = gCTManager.memory_manager:get_validated_address('SideManipulator')
ORG_SideManipulator = readBytes(INJECT_SideManipulator, 8, true)

{$asm}
alloc(newmem_SideManipulator,$500,$INJECT_SideManipulator)

label(code_SideManipulator)
label(ret_SideManipulator)
label(SetUserController)
label(SetCPUOneController)
label(SetCPUTwoController)

alloc(intUserController, 4, $INJECT_SideManipulator)
registersymbol(intUserController)
intUserController:
db FF FF FF FF

alloc(intCPUOneController, 4, $INJECT_SideManipulator)
registersymbol(intCPUOneController)
intCPUOneController:
db 00

alloc(intCPUTwoController, 4, $INJECT_SideManipulator)
registersymbol(intCPUTwoController)
intCPUTwoController:
db 01

alloc(intControllerID, 4, $INJECT_SideManipulator)
registersymbol(intControllerID)
intControllerID:
db 00

newmem_SideManipulator:

code_SideManipulator:
  mov rax,[rdi+rcx*8+00000118]
  cmp rcx , [intControllerID]
  je SetUserController
  cmp rcx, 16
  je SetCPUOneController
  cmp rcx, 17
  je SetCPUTwoController
  jmp ret_SideManipulator

SetUserController:
  push rcx
  mov rcx, [intUserController]
  mov [rax+30], rcx
  pop rcx
  jmp ret_SideManipulator

SetCPUOneController:
  push rcx
  mov rcx, [intCPUOneController]
  mov [rax+30], rcx
  pop rcx
  jmp ret_SideManipulator

SetCPUTwoController:
  push rcx
  mov rcx, [intCPUTwoController]
  mov [rax+30], rcx
  pop rcx
  jmp ret_SideManipulator

$INJECT_SideManipulator:
  jmp newmem_SideManipulator
  nop
  nop
  nop
ret_SideManipulator:

[DISABLE]
//code_SideManipulator from here till the end of the code_SideManipulator will be used to disable the cheat
{$lua}
writeBytes(INJECT_SideManipulator, ORG_SideManipulator)
{$asm}

dealloc(newmem_SideManipulator)
unregistersymbol(intUserController)
unregistersymbol(intCPUOneController)
unregistersymbol(intCPUTwoController)
unregistersymbol(intControllerID)
dealloc(intUserController)
dealloc(intCPUOneController)
dealloc(intCPUTwoController)
dealloc(intControllerID)



{
// ORIGINAL CODE - INJECTION POINT: FIFA22.exe+3F496DD

FIFA22.exe+3F496AE: 48 8B 77 50              - mov rsi,[rdi+50]
FIFA22.exe+3F496B2: 48 3B 77 58              - cmp rsi,[rdi+58]
FIFA22.exe+3F496B6: 0F 84 10 02 00 00        - je FIFA22.exe+3F498CC
FIFA22.exe+3F496BC: 4C 89 64 24 58           - mov [rsp+58],r12
FIFA22.exe+3F496C1: 45 33 E4                 - xor r12d,r12d
FIFA22.exe+3F496C4: 48 89 6C 24 50           - mov [rsp+50],rbp
FIFA22.exe+3F496C9: 4C 89 74 24 60           - mov [rsp+60],r14
FIFA22.exe+3F496CE: 4C 89 7C 24 68           - mov [rsp+68],r15
FIFA22.exe+3F496D3: 48 8B 06                 - mov rax,[rsi]
FIFA22.exe+3F496D6: 48 63 88 80 04 00 00     - movsxd  rcx,dword ptr [rax+00000480]
// ---------- INJECTING HERE ----------
FIFA22.exe+3F496DD: 48 8B 84 CF 18 01 00 00  - mov rax,[rdi+rcx*8+00000118]
// ---------- DONE INJECTING  ----------
FIFA22.exe+3F496E5: 83 78 30 FF              - cmp dword ptr [rax+30],-01
FIFA22.exe+3F496E9: 0F 84 D4 00 00 00        - je FIFA22.exe+3F497C3
FIFA22.exe+3F496EF: 48 8B 4F 78              - mov rcx,[rdi+78]
FIFA22.exe+3F496F3: 48 3B 8F 80 00 00 00     - cmp rcx,[rdi+00000080]
FIFA22.exe+3F496FA: 73 13                    - jae FIFA22.exe+3F4970F
FIFA22.exe+3F496FC: 48 8D 41 08              - lea rax,[rcx+08]
FIFA22.exe+3F49700: 48 89 47 78              - mov [rdi+78],rax
FIFA22.exe+3F49704: 48 8B 06                 - mov rax,[rsi]
FIFA22.exe+3F49707: 48 89 01                 - mov [rcx],rax
FIFA22.exe+3F4970A: E9 9B 01 00 00           - jmp FIFA22.exe+3F498AA

[ENABLE]
intUserController:
dd (int)-1
intCPUOneController:
dd (int)0
intCPUTwoController:
dd (int)1
[DISABLE]
}
 i
If I run it on auto assemble it won't work, it's for  fifa 22.

How do I modify it to work ?
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