rain-13 Expert Cheater
Reputation: 0
Joined: 18 Mar 2009 Posts: 110
|
Posted: Mon Jun 27, 2011 5:49 am Post subject: Need code replacement help. |
|
|
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] |
|
|