Thread: FASM Dll

Results 1 to 1 of 1
  1. #1
    ~FALLEN~'s Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    devenv.exe
    Posts
    529
    Reputation
    23
    Thanks
    328
    My Mood
    Inspired

    FASM Dll

    Getting sick of C... moving to asm... dll skeleton src

    Code:
    format PE DLL
    entry DllMain
    
    ;Includes
    include 'win32a.inc'
    include '\API\USER32.inc'
    include '\API\KERNEL32.inc'
    ;End of includes
    
    ;.text section
    section '.text' code readable executable
    proc DllMain hModule, dwAccess, lpPipe
    push ebp
    mov ebp, esp
    sub esp, 0ch
    push [hModule]
    call [DisableThreadLibraryCalls]
    cmp eax, 0
    JE .Finished
    cmp [dwAccess], DLL_PROCESS_ATTACH
    JE .Create
    JNE .Finished
    .Create:
    push NULL
    push 0
    push dword ptr lpPipe
    push dword ptr pThread
    push 0
    push NULL
    call [CreateThread]
    cmp eax, 0
    JE .Finished
    .Finished:
    add esp, 0ch
    pop ebp
    mov eax, TRUE
    endp
    
    proc pThread, lpPipe
    push ebp
    mov ebp, esp
    sub esp, 04h
    .Top:
    ;loop here
    CMP[ _While ], 1 
    JE .Top
    add esp, 04h
    pop ebp
    mov eax, TRUE
    endp
    
    ;section '.data' data readable writeable
    
    _While db 1
    
    section '.idata' import data readable writeable
    
    library kernel32, 'KERNEL32.DLL',\
    user32, 'USER32.DLL'
    
    section '.reloc' fixups data readable discardable
    Last edited by ~FALLEN~; 11-27-2012 at 02:48 PM.

Similar Threads

  1. [Source Code] FASM DLL Injector
    By PHREAK76 in forum Assembly
    Replies: 2
    Last Post: 03-17-2013, 06:47 PM
  2. Morphine.dll + Injec-Tor + Tutorial
    By Papaya in forum Gunz Hacks
    Replies: 21
    Last Post: 10-20-2010, 05:07 PM
  3. .dll injector
    By EleMentX in forum Gunz General
    Replies: 31
    Last Post: 07-08-2010, 10:44 AM
  4. dll for those who cant even google :P
    By jam in forum Gunz Hacks
    Replies: 5
    Last Post: 06-07-2007, 03:32 AM
  5. DLL injection Failled
    By aynal in forum WarRock - International Hacks
    Replies: 1
    Last Post: 01-15-2006, 09:41 PM