External function scanner supporting POASM

Started by Vortex, January 09, 2006, 12:16:35 PM

Previous topic - Next topic

Vortex

My tool scan.exe - external function scanner supports now Poasm. To create a listing of function prototypes from an .asm file, type the statements below :

scan filename.asm -m5

http://www.vortex.masmcode.com/files/Scan342.zip

A quick demo :
.386
.model flat, stdcall
option casemap:none
Include \masm32\include\windows2.inc
include msgbox.imp
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.data
MsgCaption      db "Iczelion's tutorial no.2",0
MsgBoxText      db "Win32 Assembly is Great!",0

.code
start:
   invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption, MB_OK
   invoke ExitProcess,NULL
end start


scan msgbox.asm -m5

msgbox.imp :

ExitProcess PROTO :DWORD
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
MessageBox equ <MessageBoxA>


Notice that there is no parameter checking, so you must pass the correct parameters to the functions.

Vortex

To generate function declarations eliminating the jump table in the final PE :

scan dialog.asm -m2

dialog.imp :

EXTERNDEF _imp__ExitProcess@4:PTR pr1
ExitProcess EQU <_imp__ExitProcess@4>

EXTERNDEF _imp__GetModuleHandleA@4:PTR pr1
GetModuleHandle EQU <_imp__GetModuleHandleA@4>

EXTERNDEF _imp__DialogBoxIndirectParamA@20:PTR pr5
DialogBoxIndirectParam EQU <_imp__DialogBoxIndirectParamA@20>

EXTERNDEF _imp__EndDialog@8:PTR pr2
EndDialog EQU <_imp__EndDialog@8>

EXTERNDEF _imp__LoadIconA@8:PTR pr2
LoadIcon EQU <_imp__LoadIconA@8>

EXTERNDEF _imp__LoadMenuIndirectA@4:PTR pr1
LoadMenuIndirect EQU <_imp__LoadMenuIndirectA@4>

EXTERNDEF _imp__MessageBoxA@16:PTR pr4
MessageBox EQU <_imp__MessageBoxA@16>

EXTERNDEF _imp__SendMessageA@16:PTR pr4
SendMessage EQU <_imp__SendMessageA@16>

EXTERNDEF _imp__SetMenu@8:PTR pr2
SetMenu EQU <_imp__SetMenu@8>



[attachment deleted by admin]