need help how about assebly error

Reply

Join Date: Oct 2009
Posts: 2
Reputation: wilen is an unknown quantity at this point 
Solved Threads: 0
wilen wilen is offline Offline
Newbie Poster

need help how about assebly error

 
0
  #1
Oct 17th, 2009
i just want to ask how can i add a another value in this code
this is for educational purpose and im not familiar with asm
i know java programming but this is far different

mov eax,[000003E8+100] crash my system

honestly i dont know how to add in asm
any one can help me here

d97aede:
add eax,00
alloc(newmem,256)
label(returnhere)
0D97AC8C:
jmp newmem
nop
returnhere:
newmem:
label(empiesa)
label(setea)
label(sigue)
label(resetea)
alloc(Patiniox,4)
jmp empiesa
empiesa:
cmp [Patiniox],00000000
je setea
jmp sigue
setea:
mov [Patiniox],00000001
jmp empiesa
sigue:
inc [Patiniox]
cmp [Patiniox],00000004
je resetea
jmp d97ac92
resetea:
mov [Patiniox],00000000
jmp d97b2e4
alloc(newmem2,128)
label(returnhere2)
label(originalcode2)
label(exit2)
d97afb5:
jmp newmem2
nop
returnhere2:
newmem2: 
mov eax,000003E8 <-- this part of the code how am i able to add another 100 value here its 1000 so i want to add 100 
mov ecx,000003E8
originalcode2:
add esp,08
mov ecx,[edi+08]
exit2:
jmp returnhere2
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 133
Reputation: NotNull is an unknown quantity at this point 
Solved Threads: 13
NotNull's Avatar
NotNull NotNull is offline Offline
Junior Poster
 
0
  #2
Oct 18th, 2009
To change,
newmem2:
mov eax,0x3e8
so that EAX will be loaded with the value
0x3e8+0x100 replace with:
mov eax,0x3e8+0x100
This varient of mov instruction has immediate as the source
operand, and this has memory operand as source:
mov eax,[0x3e8+0x100]
Using a hardwired offset could cause an Access Violation.
Once you have a dissassembled source listing of a
executable image you can change offsets to labels
and add in any opcodes you wish.
Last edited by NotNull; Oct 18th, 2009 at 1:36 am.
----------------------------------------------------------
To control a mind violates a man, and all it has been used for is
hurting and afflicting. Nowonder I progam in assembly...
--->Now available http://dotcoding.netai.net/
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: wilen is an unknown quantity at this point 
Solved Threads: 0
wilen wilen is offline Offline
Newbie Poster
 
0
  #3
Oct 19th, 2009
thank's for the reply it works like a charm but you mention i could change offsets to label and add in any opcodes could you help me how to do that
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC