News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

jmp with the digital code of FF 25.

Started by ДмитроВолодимирович, May 18, 2015, 08:20:38 PM

Previous topic - Next topic

ДмитроВолодимирович

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 ..

ДмитроВолодимирович

Well that would be sample code full  complete ready fully to compile put here good then!

ДмитроВолодимирович

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?

Mikl__

Здравствуй, ДмитроВолодимирович!
Напиши по-русски чего ты хочешь. Твой автоматический переводчик с переводом на английский язык не справился...

ДмитроВолодимирович

Спасибо!!

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

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

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


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


ДмитроВолодимирович

Хорошо было бы посмотреть образец кода, полностью готовый к компиляции!

Mikl__

FF 25 10 40 40 00 = jmp dword ds:[404010h]
ничего хитрого - косвенный переход по адресу находящегося в ячейке памяти с адресом 404010h
.code
jmp x;jump to address 403456h
.data
x dd 403456h

ДмитроВолодимирович

Супер!!!!

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

Super!!!!

I will think and will ask. Id est щас not скомпилируется probably.

dedndave

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

ДмитроВолодимирович

Super!!!!

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

Super!!!!

While does not swear!! I can not believe.

ДмитроВолодимирович


dedndave

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

dedndave

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

Mikl__

Hi, dedndave !
or define the label as GLOBAL or PUBLIC