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 


Need code replacement help.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
rain-13
Expert Cheater
Reputation: 0

Joined: 18 Mar 2009
Posts: 110

PostPosted: Mon Jun 27, 2011 5:49 am    Post subject: Need code replacement help. Reply with quote

On image I marked code I want to replace with NOPs red. (those replacements I made manually)



I want to make auto assemble script that would do this replacement automatically.

In auto assemble window I used coderelocation template that gave me this:

But when I execute it next time, code doesnt change like that. What's wrong in script?
Code:
alloc(newmem,522)

label(orig_0042044C)
label(orig_00420455)
label(orig_0042047E)
label(orig_00420488)
label(orig_004204A3)
label(orig_004204A6)
label(orig_004204D5)
label(orig_004204D9)

newmem:
nop
nop
nop
nop
nop
nop
mov eax,[ebx+000003F2]
mov bx,0005
ret
lea eax,[edi+0C]
call 004224A2
movzx ebx,word ptr [edi+04]
mov ecx,ebx
shl ebx,02
add ebx,00427EA0
lea eax,[edi+0C]
call 004224A2
movzx ebx,word ptr [edi+04]
mov ecx,ebx
shl ebx,02
add ebx,00427EA0
add eax,[ebx+000003E2]
lea eax,[edi+0C]
call 004224A2
movzx ebx,word ptr [edi+04]
mov ecx,ebx
shl ebx,02
add ebx,00427EA0
neg eax
add eax,[ebx+000003E2]
sub eax,eax

orig_0042044C:
cmp [ebx+000003E2],eax
ret

orig_00420455:
and eax,eax
cmp dword ptr [ebx+000003E2],00
mov dx,FBF9
sub esp,02
push cx
push 00
push 00
sub esp,02
push dx
push 0041DFD1
call 0041DDF0

orig_0042047E:
mov [ebx+000003E2],eax
mov bx,0006

orig_00420488:
push esi
push edi
inc cx
movzx ebx,bx
mov dx,[004277C0]
and dx,dx
mov edi,[00427E94]

orig_004204A3:
add edi,08

orig_004204A6:
mov esi,[edi]
and esi,esi
mov esi,[edi]
cmp [esi+16],bx
cmp [esi+000000F8],cx
cmp [esi+00000102],eax
mov [esi+00000102],eax
push 00
push 00
push esi
call 00418A43

orig_004204D5:
dec dx

orig_004204D9:
pop edi
pop esi
ret
movzx ebx,word ptr [edi+04]
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25956
Location: The netherlands

PostPosted: Mon Jun 27, 2011 6:46 am    Post subject: Reply with quote

just do:
Code:

004203db:
nop
nop
nop
nop
nop
nop

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
rain-13
Expert Cheater
Reputation: 0

Joined: 18 Mar 2009
Posts: 110

PostPosted: Mon Jun 27, 2011 7:53 am    Post subject: Reply with quote

thank you. How I can include this auto assemble script in trainer?

edit: when I write it manually then it's ok if I just WINAPI WriteProcessMemory "909090909090" on 004203db ?

Edit: why there's always 6 nops when I replace code?? why never less or more?

Edit2: why is it so that if I full func that decreases life with nops, then game starts some how lag and then freeze? it doesnt happen immediately but in few minutes.
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