News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

JMP function

Started by bawrobin, March 22, 2010, 07:09:20 AM

Previous topic - Next topic

bawrobin

Hello.
Please help.


Here is my code:

.686p

.model flat, stdcall

option casemap:none


includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\windows.inc





.data

MsgText     db 'Calculating results - %d',0
MsgTitle    db 'Hello',0
buffer      db 100 dup(?)
number EQU 80




.code
start:

mov eax, number

jmp sign1

sign1:
sub eax, 15

sign2:
add eax, 20

   invoke  wsprintf,ADDR buffer,ADDR MsgText,eax
   invoke  MessageBox,0,ADDR buffer,ADDR MsgTitle,MB_OK
   invoke  ExitProcess,0

end start




Please help.
I need to ignore "sign2:*" code after executing jumping and reading to sign1. So, I need that results must be 65. Please help. How to ignore reading of sign2 after jumping to sign1.

MichaelW

One possibility:

sign1:
  sub eax, 15
  jmp around2
sign2:
  add eax, 20
around2: 
eschew obfuscation

bawrobin


theunknownguy

Quote from: MichaelW on March 22, 2010, 07:13:36 AM
One possibility:

sign1:
  sub eax, 15
  jmp around2
sign2:
  add eax, 20
around2: 


Another here:

sign1:
  sub eax, 15
  sub eax, 20
sign2:
  add eax, 20


When it pass over the add eax, 20 it will be like nothing happen, but lol i just go to far with the assumption ^^.

sign1:
  sub eax, 15
  push offset lol
  ret
sign2:
  add eax, 20
lol::


Too far again...

MichaelW

QuoteToo far again...

Yes, too far :lol
eschew obfuscation