The MASM Forum

General => The Campus => Topic started by: ДмитроВолодимирович on May 18, 2015, 08:20:38 PM

Title: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 08:20:38 PM
Good kind daypart. Prompt me please! :biggrin:
I want for MASM, to create the indirect transition of jmp with the digital code of FF 25.
Prompt me please, complete standard of koda, that he was compiled.
What will appear in me then in a that pointer, it I it can will understand, I do not remember
how to write покажчик- forgot коди of MASM.
I also wish that the label indicated the DWORD,
pointing to the correct address ..
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 08:39:11 PM
Well that would be sample code full  complete ready fully to compile put here good then!
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 09:37:53 PM
I would also like how that would mark showed certain bytes such as these here
45h 12h 91h 74h

:Metka_1:dword  ;
;dB 45h 12h 91h 74h

Is it possible to them?
Title: Re: jmp with the digital code of FF 25.
Post by: Mikl__ on May 18, 2015, 09:44:49 PM
Здравствуй, ДмитроВолодимирович!
Напиши по-русски чего ты хочешь. Твой автоматический переводчик с переводом на английский язык не справился...
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 09:56:49 PM
Спасибо!!

В экзешниках часто встречается FF 25 10 40 40 00

хитрый джамп.   Я хочу научиться его полностью воспроизводить.

FF 25 понятно джамп, а 10 40 40 00 адрес, в катором лежит сам прыжок.


Хочу в asm. файле научиться правильно прописівать єту конструкцию.

Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 10:07:17 PM
Хорошо было бы посмотреть образец кода, полностью готовый к компиляции!
Title: Re: jmp with the digital code of FF 25.
Post by: Mikl__ on May 18, 2015, 10:16:47 PM
FF 25 10 40 40 00 = jmp dword ds:[404010h]
ничего хитрого - косвенный переход по адресу находящегося в ячейке памяти с адресом 404010h
.code
jmp x;jump to address 403456h
.data
x dd 403456h
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 10:25:00 PM
Супер!!!!

Я подумаю и спрошу..  То есть наверное щас не скомпилируется..

Super!!!!

I will think and will ask. Id est щас not скомпилируется probably.
Title: Re: jmp with the digital code of FF 25.
Post by: dedndave on May 18, 2015, 10:30:30 PM
JMP indirect

;###############################################################################################

        INCLUDE    \Masm32\Include\Masm32rt.inc

;###############################################################################################

        .DATA

lpLabel LPVOID  MyLabel

MyData  db      45h,12h,91h,74h

;***********************************************************************************************

  ;      .DATA?

;###############################################################################################

        .CODE

;***********************************************************************************************

main    PROC

        jmp dword ptr lpLabel

MyLabel::
        print   chr$(13,10)
        inkey
        exit

main    ENDP

;###############################################################################################

        END     main
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 10:36:57 PM
Super!!!!

Пока не ругается!!   Не могу поверить.. 

Super!!!!

While does not swear!! I can not believe.
Title: Re: jmp with the digital code of FF 25.
Post by: ДмитроВолодимирович on May 18, 2015, 10:40:33 PM
Thank you !! Cool !!

It works !!
Title: Re: jmp with the digital code of FF 25.
Post by: dedndave on May 18, 2015, 10:41:20 PM
by the way.....

xyz PROC

SomeLabel:

xyz ENDP


normally, labels inside a PROC are private
that is, they only have local scope
in order to reference a label outside the PROC, you use 2 colons "SomeLabel::"
now, the label is public
Title: Re: jmp with the digital code of FF 25.
Post by: dedndave on May 18, 2015, 10:46:43 PM
if you want to keep the label private...

;###############################################################################################

        INCLUDE    \Masm32\Include\Masm32rt.inc

;###############################################################################################

        .DATA

MyData  db      45h,12h,91h,74h

;***********************************************************************************************

  ;      .DATA?

;###############################################################################################

        .CODE

;***********************************************************************************************

main    PROC

        .DATA

lpLabel LPVOID  MyLabel

        .CODE

        jmp dword ptr lpLabel

MyLabel:
        print   chr$(13,10)
        inkey
        exit

main    ENDP

;###############################################################################################

        END     main
Title: Re: jmp with the digital code of FF 25.
Post by: Mikl__ on May 18, 2015, 11:04:03 PM
Hi, dedndave !
or define the label as GLOBAL or PUBLIC