Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Known API's

May
57
0
I have created a BTM that can extract API Names from known DLL libraries
for reasons of wrapping I will append the actual script to this message as a
DEBUG.EXE script
Use DEBUG to translate it back into readable form.

I have included 3 known Windows Library names in base script. If you know of
any others you can add it to the %INFILE variable
These files are all located in _winsysdir were the script expects to find
them.

Actual case sensitive FunctionNames will be written to Text file in the root
of the boot drive as AGetApi.TXT
I use the file contents of AGetApi.TXT to find help on specific function
names on MSDN.

n AGetApi.BTM
e 100 73 65 74 6C 6F 63 61 6C 0D 0A 0D 0A 20 20 20 20
e 110 2A 28 20 75 6E 73 65 74 20 2F 71 20 2A 20 25 2B
e 120 20 75 6E 61 6C 69 61 73 20 2F 71 20 2A 20 25 2B
e 130 20 75 6E 66 75 6E 63 74 69 6F 6E 20 2F 71 20 2A
e 140 29 0D 0A 0D 0A 3A 3A 20 55 50 44 41 54 45 20 6E
e 150 65 76 65 72 20 61 70 70 65 6E 64 20 61 6C 6C 77
e 160 61 79 73 20 75 70 64 61 74 65 20 20 20 0D 0A 0D
e 170 0A 20 20 20 20 69 66 20 65 78 69 73 74 20 25 5F
e 180 62 6F 6F 74 3A 5C 25 40 6E 61 6D 65 5B 25 30 5D
e 190 2E 54 58 54 20 64 65 6C 20 2F 6B 71 20 25 5F 62
e 1A0 6F 6F 74 3A 5C 25 40 6E 61 6D 65 5B 25 30 5D 2E
e 1B0 54 58 54 0D 0A 20 20 20 20 0D 0A 3A 3A 20 54 41
e 1C0 52 47 45 54 46 49 4C 45 53 20 61 64 64 20 6D 6F
e 1D0 72 65 20 6C 69 62 72 61 72 69 65 73 20 62 75 74
e 1E0 20 74 68 65 20 66 69 6C 65 73 20 6D 75 73 74 20
e 1F0 72 65 73 69 64 65 20 69 6E 20 5F 77 69 6E 73 79
e 200 73 64 69 72 0D 0A 20 20 20 20 0D 0A 20 20 20 20
e 210 73 65 74 20 69 6E 66 69 6C 65 3D 41 44 56 41 50
e 220 49 33 32 2E 44 4C 4C 20 55 53 45 52 33 32 2E 44
e 230 4C 4C 20 4B 45 52 4E 45 4C 33 32 2E 44 4C 4C 20
e 240 20 20 20 20 20 0D 0A 09 70 75 73 68 64 20 25 5F
e 250 77 69 6E 73 79 73 64 69 72 0D 0A 0D 0A 09 53 45
e 260 54 20 4E 46 3D 30 0D 0A 09 0D 0A 09 65 63 68 6F
e 270 2E 0D 0A 09 65 63 68 6F 20 25 40 66 6F 72 6D 61
e 280 74 5B 39 2C 20 5D 20 25 40 63 68 61 72 5B 39 34
e 290 38 34 5D 20 52 65 61 64 69 6E 67 20 25 40 77 6F
e 2A0 72 64 73 5B 25 69 6E 66 69 6C 65 5D 20 66 69 6C
e 2B0 65 73 0D 0A 09 65 63 68 6F 20 25 40 66 6F 72 6D
e 2C0 61 74 5B 39 2C 20 5D 20 25 40 63 68 61 72 5B 39
e 2D0 34 37 34 5D 20 0D 0A 20 20 20 20 0D 0A 20 20 20
e 2E0 20 73 65 74 20 6F 70 65 6E 5F 31 3D 25 40 66 69
e 2F0 6C 65 6F 70 65 6E 5B 25 5F 62 6F 6F 74 3A 5C 25
e 300 40 6E 61 6D 65 5B 25 40 63 61 70 73 5B 25 30 5D
e 310 5D 2E 54 58 54 2C 77 2C 74 5D 20 20 20 20 0D 0A
e 320 20 20 20 20 0D 0A 3A 4C 4F 4F 50 0D 0A 0D 0A 20
e 330 20 20 20 53 45 54 20 46 49 46 4F 3D 25 40 57 4F
e 340 52 44 5B 25 4E 46 2C 25 49 4E 46 49 4C 45 5D 0D
e 350 0A 20 20 20 20 0D 0A 09 73 65 74 20 5F 62 79 74
e 360 65 3D 25 40 77 6F 72 64 5B 30 2C 25 40 73 74 72
e 370 69 70 5B 22 2C 22 2C 25 40 69 6E 73 74 72 5B 31
e 380 2C 2C 25 40 66 69 65 6C 64 5B 22 3A 22 2C 31 2C
e 390 25 40 65 78 65 63 73 74 72 5B 66 66 69 6E 64 20
e 3A0 2F 6B 6D 74 22 25 66 69 66 6F 22 20 2F 78 20 25
e 3B0 66 69 66 6F 5D 5D 5D 5D 5D 0D 0A 09 73 65 74 20
e 3C0 5F 62 79 74 65 3D 25 40 65 76 61 6C 5B 28 25 5F
e 3D0 62 79 74 65 20 2B 20 25 40 6C 65 6E 5B 25 66 69
e 3E0 66 6F 5D 29 20 2B 20 31 5D 0D 0A 09 73 65 74 20
e 3F0 5F 65 6E 64 3D 25 40 65 76 61 6C 5B 25 5F 62 79
e 400 74 65 20 2A 20 34 5D 09 0D 0A 09 0D 0A 09 73 65
e 410 74 20 6F 70 65 6E 5F 30 3D 25 40 66 69 6C 65 6F
e 420 70 65 6E 5B 25 66 69 66 6F 2C 72 2C 62 5D 20 20
e 430 20 0D 0A 09 0D 0A 09 73 65 74 20 73 65 65 6B 3D
e 440 25 40 66 69 6C 65 73 65 65 6B 5B 25 6F 70 65 6E
e 450 5F 30 2C 25 5F 62 79 74 65 2C 31 5D 0D 0A 09 73
e 460 65 74 20 77 72 69 74 65 3D 25 40 66 69 6C 65 77
e 470 72 69 74 65 5B 25 6F 70 65 6E 5F 31 2C 23 20 41
e 480 50 49 20 46 75 6E 63 74 69 6F 6E 73 20 69 6E 20
e 490 25 66 69 66 6F 5D 0D 0A 0D 0A 20 20 20 20 65 63
e 4A0 68 6F 20 25 40 66 6F 72 6D 61 74 5B 31 31 2C 25
e 4B0 40 63 68 61 72 5B 39 35 30 30 5D 5D 20 25 66 69
e 4C0 66 6F 09 0D 0A 20 20 20 20 0D 0A 20 20 20 20 64
e 4D0 6F 20 66 6F 72 65 76 65 72 0D 0A 09 20 20 20 20
e 4E0 73 65 74 20 5F 78 3D 25 40 66 69 6C 65 72 65 61
e 4F0 64 5B 25 6F 70 65 6E 5F 30 2C 5D 0D 0A 09 09 69
e 500 66 20 25 40 69 6E 73 74 72 5B 30 2C 31 2C 25 5F
e 510 78 5D 20 3D 3D 20 25 40 63 68 61 72 5B 32 30 31
e 520 5D 20 2E 6F 72 2E 20 25 5F 62 79 74 65 20 67 65
e 530 20 25 5F 65 6E 64 20 2E 6F 72 2E 20 25 5F 6B 62
e 540 68 69 74 20 3D 3D 20 31 20 6C 65 61 76 65 20 20
e 550 20 20 20 20 20 20 20 20 20 20 20 20 0D 0A 20 20
e 560 20 20 20 20 20 09 73 65 74 20 73 65 65 6B 3D 25
e 570 40 66 69 6C 65 73 65 65 6B 5B 25 6F 70 65 6E 5F
e 580 30 2C 25 40 65 76 61 6C 5B 28 25 5F 62 79 74 65
e 590 20 2B 20 25 40 6C 65 6E 5B 25 5F 78 5D 29 5D 2C
e 5A0 30 5D 0D 0A 20 20 20 20 20 20 20 09 73 65 74 20
e 5B0 5F 62 79 74 65 3D 25 40 69 6E 63 5B 25 73 65 65
e 5C0 6B 5D 0D 0A 09 20 20 20 20 69 66 20 7B 25 5F 78
e 5D0 7D 20 3D 3D 20 7B 7D 20 65 6E 64 64 6F 0D 0A 20
e 5E0 20 20 09 73 65 74 20 77 72 69 74 65 3D 25 40 66
e 5F0 69 6C 65 77 72 69 74 65 5B 25 6F 70 65 6E 5F 31
e 600 2C 25 46 49 46 4F 20 25 5F 78 5D 0D 0A 65 6E 64
e 610 64 6F 0D 0A 0D 0A 09 75 6E 73 65 74 20 2F 71 20
e 620 5F 78 0D 0A 20 20 20 20 73 65 74 20 63 6C 6F 73
e 630 65 3D 25 40 66 69 6C 65 63 6C 6F 73 65 5B 25 6F
e 640 70 65 6E 5F 30 5D 0D 0A 20 20 20 20 0D 0A 20 20
e 650 20 20 53 45 54 20 4E 46 3D 25 40 49 4E 43 5B 25
e 660 4E 46 5D 0D 0A 20 20 20 20 25 40 49 46 5B 25 4E
e 670 46 20 47 45 20 25 40 57 4F 52 44 53 5B 25 49 4E
e 680 46 49 4C 45 5D 2C 47 4F 54 4F 20 45 4E 44 2C 47
e 690 4F 54 4F 20 4C 4F 4F 50 5D 20 20 20 20 20 20 20
e 6A0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
e 6B0 20 20 20 20 20 20 20 20 0D 0A 0D 0A 3A 45 4E 44
e 6C0 0D 0A 70 6F 70 64 0D 0A 0D 0A 65 63 68 6F 20 25
e 6D0 40 66 69 6C 65 63 6C 6F 73 65 5B 25 6F 70 65 6E
e 6E0 5F 31 5D 20 3E 26 6E 75 6C 20 0D 0A 65 63 68 6F
e 6F0 20 25 40 66 6F 72 6D 61 74 5B 39 2C 20 5D 20 25
e 700 40 63 68 61 72 5B 39 34 37 34 5D 0D 0A 65 63 68
e 710 6F 20 25 40 66 6F 72 6D 61 74 5B 39 2C 20 5D 20
e 720 25 40 63 68 61 72 5B 39 34 39 32 5D 20 44 6F 6E
e 730 65 20 72 65 61 64 69 6E 67 20 66 69 6C 65 73 0D
e 740 0A 65 6E 64 6C 6F 63 61 6C 0D 0A 71 75 69 74 0D
e 750 0A 0D 0A 3A 20 57 72 69 74 74 65 6E 20 62 79 20
e 760 52 65 78 20 43 6C 61 72 6B 20 32 30 30 37
rcx
66E
w
q
 
After posting this I found BB code "tags" that would stop wrapping of btm
code. when posting in forum
No need to use debug.exe

BTW DEBUG.EXE tends to crash inside 4NT shell is this known issue or an
obsolete issue

Code:
setlocal

    *( unset /q * %+ unalias /q * %+ unfunction /q *)

:: UPDATE never append allways update

    if exist %_boot:\%@name[%0].TXT del /kq %_boot:\%@name[%0].TXT

:: TARGETFILES add more libraries but the files must reside in _winsysdir

    set infile=ADVAPI32.DLL USER32.DLL KERNEL32.DLL
 pushd %_winsysdir

 SET NF=0

 echo.
 echo %@format[9, ] %@char[9484] Reading %@words[%infile] files
 echo %@format[9, ] %@char[9474]

    set open_1=%@fileopen[%_boot:\%@name[%@caps[%0]].TXT,w,t]

:LOOP

    SET FIFO=%@WORD[%NF,%INFILE]

 set _byte=%@word[0,%@strip[",",%@instr[1,,%@field[":",1,%@execstr[ffind 
/kmt"%fifo" /x %fifo]]]]]
 set _byte=%@eval[(%_byte + %@len[%fifo]) + 1]
 set _end=%@eval[%_byte * 4]

 set open_0=%@fileopen[%fifo,r,b]

 set seek=%@fileseek[%open_0,%_byte,1]
 set write=%@filewrite[%open_1,# API Functions in %fifo]

    echo %@format[11,%@char[9500]] %fifo

    do forever
     set _x=%@fileread[%open_0,]
  if %@instr[0,1,%_x] == %@char[201] .or. %_byte ge %_end .or. %_kbhit == 1 
leave
        set seek=%@fileseek[%open_0,%@eval[(%_byte + %@len[%_x])],0]
        set _byte=%@inc[%seek]
     if {%_x} == {} enddo
    set write=%@filewrite[%open_1,%FIFO %_x]
enddo

 unset /q _x
    set close=%@fileclose[%open_0]

    SET NF=%@INC[%NF]
    %@IF[%NF GE %@WORDS[%INFILE],GOTO END,GOTO LOOP]

:END
popd

echo %@fileclose[%open_1] >&nul
echo %@format[9, ] %@char[9474]
echo %@format[9, ] %@char[9492] Done reading files
endlocal
quit

: Written by Rex Clark 2007
 
Nope it still wraps Can this be avoided ? Is it my end? do i need to set
wrap at column higher currently set at defaults

----- Original Message -----
| After posting this I found BB code "tags" that would stop wrapping of btm
| code. when posting in forum
| No need to use debug.exe
|
| BTW DEBUG.EXE tends to crash inside 4NT shell is this known issue or an
| obsolete issue
|
|
| Code:
| ---------
| setlocal
|
| *( unset /q * %+ unalias /q * %+ unfunction /q *)
|
| :: UPDATE never append allways update
|
| if exist %_boot:\%@name[%0].TXT del /kq %_boot:\%@name[%0].TXT
|
| :: TARGETFILES add more libraries but the files must reside in _winsysdir
|
| set infile=ADVAPI32.DLL USER32.DLL KERNEL32.DLL
| pushd %_winsysdir
|
| SET NF=0
|
| echo.
| echo %@format[9, ] %@char[9484] Reading %@words[%infile] files
| echo %@format[9, ] %@char[9474]
|
| set open_1=%@fileopen[%_boot:\%@name[%@caps[%0]].TXT,w,t]
|
| :LOOP
|
| SET FIFO=%@WORD[%NF,%INFILE]
|
| set _byte=%@word[0,%@strip[",",%@instr[1,,%@field[":",1,%@execstr[ffind
| /kmt"%fifo" /x %fifo]]]]]
| set _byte=%@eval[(%_byte + %@len[%fifo]) + 1]
| set _end=%@eval[%_byte * 4]
|
| set open_0=%@fileopen[%fifo,r,b]
|
| set seek=%@fileseek[%open_0,%_byte,1]
| set write=%@filewrite[%open_1,# API Functions in %fifo]
|
| echo %@format[11,%@char[9500]] %fifo
|
| do forever
| set _x=%@fileread[%open_0,]
| if %@instr[0,1,%_x] == %@char[201] .or. %_byte ge %_end .or. %_kbhit == 1
| leave
| set seek=%@fileseek[%open_0,%@eval[(%_byte + %@len[%_x])],0]
| set _byte=%@inc[%seek]
| if {%_x} == {} enddo
| set write=%@filewrite[%open_1,%FIFO %_x]
| enddo
|
| unset /q _x
| set close=%@fileclose[%open_0]
|
| SET NF=%@INC[%NF]
| %@IF[%NF GE %@WORDS[%INFILE],GOTO END,GOTO LOOP]
|
| :END
| popd
|
| echo %@fileclose[%open_1] >&nul
| echo %@format[9, ] %@char[9474]
| echo %@format[9, ] %@char[9492] Done reading files
| endlocal
| quit
|
| : Written by Rex Clark 2007
| ---------
 
From: Rex Clark
Sent: Monday, August 25, 2008 10:22 PM
Subject: RE: [Open Forum-t-410] Known API's

>
> Nope it still wraps Can this be avoided ? Is it my end? do i need to set
> wrap at column higher currently set at defaults

Most SMTP implementations will wrap lines at 76 characters. The only way to
avoid it is to send the e-mail with an alternate encoding, such as
quoted-printable, but that's out of your control since it is the forum
software actually sending the e-mail. =P

Jonathan Gilbert
 
Back
Top