flat assembler
Message board for the users of flat assembler.

Index > Windows > Make dmp file

Author
Thread Post new topic Reply to topic
ragdog



Joined: 03 Mar 2008
Posts: 1
ragdog
Hi

I found this source and i wonder how i can make this ufmod.dmp file
Gives any tools for it?

Code:
;--------------------------------------------------------------------
format            PE      gui 4.0
include     'win32a.inc'
;--------------------------------------------------------------------
xm_lib        file    'ufmod.dmp'         ; must be at 0x00401000 !!!
xm_play     =      xm_lib + 9158h
xm_stop     =         xm_lib + 0D8h
xm_handle   =          xm_lib + 1Ch
;--------------------------------------------------------------------
xm_file     file    'glass.xm'
xm_size     =      $-xm_file
;--------------------------------------------------------------------
caption     db            '.:FASM:.',0
message     db        'uFMOD ruleZ!',0
;--------------------------------------------------------------------
entry            $
           push    xm_size xm_file [GetProcAddress][GetModuleHandle]
           call    xm_play
     invoke  MessageBox,0,message,caption,MB_ICONQUESTION
        push    dword [xm_handle]
           call    xm_stop
     invoke  ExitProcess,0
;--------------------------------------------------------------------
data          import
library     kernel32,'kernel32.dll',user32,'user32.dll'
include     'api\kernel32.inc'
include     'api\user32.inc'
end            data
;--------------------------
    


greets,
Post 05 Mar 2011, 01:33
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
You mean like a process crash dump? For that you can use the MiniDumpWriteDump API.

But from looking at the source context, it sounds like I may have mistaken the context of your question.

What kind of .dmp file? What for?
Post 07 Mar 2011, 08:14
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Are you trying to create your own file ?. Use Win32 API CreateFile, WriteFile, CloseHandle...

xm_lib file 'ufmod.dmp' ; must be at 0x00401000 !!!
^^^That seems like you are trying to extract the file from some place.

If you know the structure of the file then you just move that offset into a register, EBX (I also rec. you push EBX first)... and then access the file contents by their address for ex.
Code:

;assuming you have the file address in EAX

MOV EBX,EAX

MOV EAX,[EBX+nBytes_Of_Item_here]

MOV dword[Some_Variable],EAX

JMP .WriteSomeVariableToFileAndComeBack
    



Is that it ?
Post 07 Mar 2011, 20:34
View user's profile Send private message Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack
Just download ufmod package and look inside, there are some fasm examples inside to get you started. The source you posted is pretty outdated IIRC.

http://ufmod.sourceforge.net/
Post 07 Mar 2011, 23:56
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-2020, Tomasz Grysztar.

Powered by rwasa.