flat assembler
Message board for the users of flat assembler.

flat assembler > DOS > Inverse stub

Author
Thread Post new topic Reply to topic
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7288
Location: Kraków, Poland
I just had this idea (not very serious):
Code:
format PE GUI on 'myfrmprg.exe'
entry start

  start:

        push    0
        push    0
        push    _message
        push    0
        call    [MessageBoxA]

        push    0
        call    [ExitProcess]

  _message db 'This program must be run in DOS mode.',0

  align 4

  data import

    dd 0,0,0,RVA kernel_name,RVA kernel_table
    dd 0,0,0,RVA user_name,RVA user_table
    dd 0,0,0,0,0

    kernel_table:
      ExitProcess dd RVA _ExitProcess
      dd 0
    user_table:
      MessageBoxA dd RVA _MessageBoxA
      dd 0

    kernel_name db 'KERNEL32.DLL',0
    user_name db 'USER32.DLL',0

    _ExitProcess dw 0
      db 'ExitProcess',0
    _MessageBoxA dw 0
      db 'MessageBoxA',0

  end data

  data fixups
  end data    
Post 26 Apr 2019, 08:32
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16618
Location: In your JS exploiting you and your system
Heh.
Code:
_message db "This program doesn't understand your fancy newfangled graphical OS. Only the one true OS will live forever, DOS!",0    
Post 26 Apr 2019, 09:52
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 293
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
These works only with old MZ exe but not with for example LE/NE. Rolling Eyes
Post 26 Apr 2019, 15:36
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.