BETA!
webmaster@virusexperts.com
Site Navigation:

 · Home · Statistics · Registration · Search · FAQ · Language ·

 Virus Experts Forums —› Q & A —› Offset jump question
Last poster Message


Posted: 3-Apr-2005 13:01:49

Hi, can any one tell me please asm code most likely one or two lines of asm code, witch would jump from one program to another in same file. Technicly the thing is simple .. I have 1 exe file .. with 2 programs combined in one exe file .. so if I run the exe it runs the first program .. I need the asm code witch would direct the first program to jump to the secound programs starting offset .. I`m not quite sure but I think it should be like this JMP OFFSET [offset], but im not quite sure about my confidence in this matter !


Posted: 29-May-2005 20:06:53 · Edited by: amir

You will definitely need to use the JMP instruction. You can call jump to an address contained in a register, memory location, or a label. In the case of a label, depending on the distance, a short, near, or far jump will be made. Although I am not an assembly programmer, I can think of one way to specify an offset:

ThisLabel:
LEA eax, ThisLabel
ADD eax, <offset>
JMP eax

This assumes you already know the offset amount... Also, I think offset addressing is limited to 4-bytes, which means you cannot jump more than 4 kb away!
 

Page loading time (sec.): 0.013
Powered by miniBB. The views expressed on this forum do not necessarily reflect the views of Virus Experts.com or any of its members. This website does not condone or support illegal activities of any kind, including, but not limited to hacking, cracking, authoring of viruses to cause harm, or exploitation of security vulnerabilties of any kind. It merely provides an alternative resource for those persons that are interested in knowing how to create, assemble, and analyze viruses and other "malware." Before using this site, please make sure you are protected by the First Amendment (U.S.) or a similar personal privacy law in your country; if not, we advise you to leave this site immediately. Virus Experts, including any of its staff, is not responsible for the non-educational misuse of any content found on this site.