Results 1 to 5 of 5

Thread: help with asm source

  1. #1
    LowF
    Guest

    help with asm source

    not sure really where to post this thread!


    got asm file i managed to cut and past together *lol*, and it's real mess but need help with it, got problem with writefile function, btw it's tasm source, don't want any masm or nasm source, anyone feel they skilled on asm coding, then if u can contact me on icq 595219, and i send file , really just want it to work!
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    http://win32asmboard.cjb.net/ ?

  3. #3
    Red wine, not vodka! ZaiRoN's Avatar
    Join Date
    Oct 2001
    Location
    Italy
    Posts
    922
    Blog Entries
    17
    Hi LowF,
    which is exactly your problem with WriteFile? The function fails? Have you got problem to compile the file? Or something else...

    Btw, this is the syntax of the function:

    BOOL WriteFile(
    HANDLE hFile, // handle to file to write to
    LPCVOID lpBuffer, // pointer to data to write to file
    DWORD nNumberOfBytesToWrite, // number of bytes to write
    LPDWORD lpNumberOfBytesWritten, // pointer to number of bytes written
    LPOVERLAPPED lpOverlapped // pointer to structure needed for overlapped I/O
    );

    Important: the file must be created with GENERIC_WRITE flag.

    I don't use tasm anymore but if I remember correctly you need to include the function using the Extrn keyword:

    Extrn WriteFile:Proc

    Now, you can call the function.
    This is a simple example:

    ...
    text_to_write db "example!",0
    bytes_written dd 0
    ...
    call WriteFile, handle_file, offset text_to_write, 8, offset bytes_written, 0

    Hope it helps you...

    Regards,
    ZaiRoN

  4. #4
    zairon: the code is correct but you have to add stdcall to the model declaration... if you don't you have to push everything for your self

    Code:
    push 0
    push offset bytes_written
    push 8
    push offset text_to_write
    push handle_file
    call WriteFile
    for the example
    Eyes to see...what the others see not
    Ears to hear...the voice of the elders guides
    Eyes to see...and the blind, they wither away
    You fools! These eyes are never for you

  5. #5
    Red wine, not vodka! ZaiRoN's Avatar
    Join Date
    Oct 2001
    Location
    Italy
    Posts
    922
    Blog Entries
    17
    Hi NervGaz,
    you are right, I was taking it for granted

Similar Threads

  1. Dll source code
    By w_a_r_1 in forum The Newbie Forum
    Replies: 6
    Last Post: July 1st, 2009, 15:07
  2. I want to look at source code
    By mdhakk in forum The Newbie Forum
    Replies: 7
    Last Post: March 19th, 2005, 22:52
  3. open source tools
    By neutrino in forum Tools of Our Trade (TOT) Messageboard
    Replies: 10
    Last Post: November 10th, 2002, 02:27
  4. VB source patch
    By current in forum Malware Analysis and Unpacking Forum
    Replies: 5
    Last Post: December 10th, 2000, 12:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •