home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Reverse Code Engineering RCE CD +sandman 2000
/
ReverseCodeEngineeringRceCdsandman2000.iso
/
RCE
/
Stone
/
windows
/
stnapih.arj
/
FLAF.ASM
< prev
next >
Wrap
Assembly Source File
|
1998-02-20
|
2KB
|
83 lines
Comment % This DLL represents the absolutely most abusive way of doing a DLL
Infact I doubt it even returns the right values - I sorta just
played with it till it loaded!! :)
The "main" part should be done with some "real" code! I just didn't
have the includes - so i sorta quick debugged the LoadLibraryA
function and made some brutal code that would allow it to load.
%
.386P
Locals
jumps
.Model Flat ,StdCall
;Define the needed external functions and constants here.
Extrn GetModuleHandleA : PROC
Extrn OpenProcess : PROC
Extrn ExitProcess : PROC
Extrn MessageBoxA : PROC
PUBLICDLL FLAF
.Data
Godnat db "flaffer",0
ReturnAddress dd 0
.Code
;──────────────────────────────────────────────────────────────────────────────
Main:
; int 3h
push 0
call GetModuleHandleA
push 0
push 0
push eax
pop eax
pop eax
pop eax
mov eax, 01
ret 0ch
.data
FLAF PROC
jmp RunOn
dd offset MiniIAT ; Address of the IAT
; for the debugger to find it
RunOn:
push eax ; store EAX
mov eax, [esp+4h] ; fetch the return address
mov [ReturnAddress], eax ; save it
mov dword ptr [esp+4], offset return ; change it to chain our code
push 0 ; show us a messagebox to say
push offset Godnat ; it works!
push offset Godnat
push 0
call MessageBoxA
pop eax ; restore EAX
jmp dword ptr [MiniIAT] ; do the function
return:
push eax
mov eax, [ReturnAddress] ; restore the original return
mov dword ptr [esp+4], eax ; address
pop eax
ret ; and return to the mother!
MiniIAT dd 0
FLAF ENDP
;──────────────────────────────────────────────────────────────────────────────
End Main