flat assembler
Message board for the users of flat assembler.

Index > Windows > proc ..endp 64bit

Author
Thread Post new topic Reply to topic
semiono



Joined: 31 Aug 2007
Posts: 192
Location: section '.code' executable
semiono 25 Nov 2011, 15:01
Code:
include '%fasm%/win64ax.inc'
section '.code' executable
start:
        stdcall del,'3d_maker_embeded'
        stdcall del,'Coverlabel'
        stdcall del,'GeoModule'
        stdcall del,'MusicEditor'
        stdcall del,'Online'
        stdcall del,'PhotoDesigner'
        stdcall del,'Video_deluxe_MX_Premium_en-GB_SetupRes'
        stdcall del,'Video_deluxe_MX_Premium_en-GB_setup.exe'
        stdcall del,'Video_deluxe_MX_Premium_en-GB_SetupInfo.ini'
        stdcall del,'license.txt'
        stdcall del,'support.rtf'
exit:
        invoke ExitProcess,NULL

        FO_DELETE = 3
        FOF_SILENT = 4
        FOF_NOCONFIRMATION = 10h

proc del a

        sub rsp,40

        mov qword [lpFileOp.fFlags],FOF_SILENT + FOF_NOCONFIRMATION
        mov qword [lpFileOp.wFunc],FO_DELETE

        invoke RtlZeroMemory,x,MAX_PATH

        invoke ExpandEnvironmentStrings,\
        '%ProgramFiles(x86)%\MAGIX\Movie_Edit_Pro_MX_Premium_Download_Version\',x,MAX_PATH
        invoke lstrcat,x,qword [a]
        mov qword [lpFileOp.pFrom],x
        invoke SHFileOperation,lpFileOp
        ret
endp

section '.data' readable writeable

        a rb MAX_PATH
        x rb MAX_PATH

struct SHFILEOPSTRUCT

        hwnd dq NULL
        wFunc dq NULL
        pFrom dq NULL
        pTo dq NULL
        fFlags dq NULL
        fAnyOperationsAborted dq NULL
        hNameMappings dq NULL
        lpszProgressTitle dq NULL
ends
        lpFileOp SHFILEOPSTRUCT

section '.idata' import readable

        library kernel32,'KERNEL32.DLL',shell32,'SHELL32.DLL'
        import kernel32,\
               ExitProcess,'ExitProcess',\
               ExpandEnvironmentStrings,'ExpandEnvironmentStringsA',\
               lstrcat,'lstrcatA',RtlZeroMemory,'RtlZeroMemory'
        import shell32,\
               SHFileOperation,'SHFileOperationA'    


Please help.. This code is work in x86 with dword dd etc.
What need know about 64bit more? Help!

And I very bad understanding stack operations Embarassed

_________________
Windows 9, FL Studio 19
Post 25 Nov 2011, 15:01
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.