flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
Raedwulf 15 Aug 2005, 13:31
If you search the whole function i.e. check in the function address table for the next function address and and subtract it from the currect function address.
Then find all the ret statement within the function and take the highest return value. This will give more accurate results at the slight cost of speed. (most of the time - worked on kernel32 anyway ![]() Btw, However, bewary of the last function ![]() _________________ Raedwulf |
|||
![]() |
|
Reverend 16 Aug 2005, 15:13
Raedwulf: Your idea may be correct, but I guess only in system dlls. Example: I can make such library.
AddressOfFunctions: FirstFunction = 0 SecondFunction = 100 ThirdFunctions = 50 Then your code will search offsets from 0-100 in the first pass (but in fact the first function is in 0-50). Then it will get negative value as delta ![]() Also when dealing with Microsoft libraries never depend on fixed values ![]() |
|||
![]() |
|
Raedwulf 17 Aug 2005, 06:23
Yeah thats true
![]() This is just a lot of progging though ![]() |
|||
![]() |
|
Reverend 27 Dec 2005, 22:38
Added new 2.2 version in edited 1st post.
|
|||
![]() |
|
flaith 28 Dec 2005, 08:28
Thx Reverend for your prog, it helps me
![]() here its ok Code: if used BroadcastSystemMessage extrn '__imp__BroadcastSystemMessage@20' as BroadcastSystemMessage:dword end if but here it isn't ok (look what happened to the 'endif' ![]() Code: if used BroadcastSystemMessageA extrn '__imp__BroadcastSystemMessageA@20' as BroadcastSystemMessageA:dword :dword ;<-- ??? Code: if used BroadcastSystemMessage extrn '__imp__BroadcastSystemMessage@20' as BroadcastSystemMessage:dword end if if used BroadcastSystemMessageA extrn '__imp__BroadcastSystemMessageA@20' as BroadcastSystemMessageA:dword :dword if used CallMsgFilter extrn '__imp__CallMsgFilter@8' as CallMsgFilter:dword end if if used CallMsgFilterA extrn '__imp__CallMsgFilterA@8' as CallMsgFilterA:dword :dword param of the prog : Quote: ApiResolve.exe -coff user32.dll _________________ Je suis sur de 'rien', mais je ne suis pas sur du 'tout'. |
|||
![]() |
|
chris 25 Jan 2006, 15:58
Hi, Reverend
thanks for your handy tool which saves me a lot of time building an API import list. One suggestion is that, just as comrade mentioned above, for MS COFF output format, which requires a linker to produce the final execuable(this is usually what we really trying to make), import library files are required at link stage. So why not take the .lib file(those files should be availabe) as input when -coff command switch is activitied? But anyway, disassembling the binary isn't too bad;) |
|||
![]() |
|
Reverend 05 Feb 2006, 19:21
There is ApiResolve v2.3 in the first post. Another bug removed.
flaith: The bug is now fixed. Sorry that you had to wait so long ![]() chris: Maybe getting data from .lib is much more accurate, but I don't have time currently to even read this formats' specification. |
|||
![]() |
|
Reverend 17 Feb 2006, 10:38
New version in edited first post. Fixed another bug.
|
|||
![]() |
|
Reverend 23 Oct 2006, 12:31
New version in the first post. Compiled with the new LDE engine
|
|||
![]() |
|
CoolCmd 27 Dec 2023, 11:15
ApiResolve is a bad program for COFF because its algorithm is unreliable by the nature. two examples:
the program generates __imp__VirtualAllocEx@8 for kernel32.dll. the actual import is __imp__VirtualAllocEx@16. this function uses jmp instruction instead of ret instruction. the program generates __imp__wsprintfA@0 for user32.dll. this is CDECL function, it dos not need @number suffix. |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.