ollydbg -> search for all intermodular calls -> in the new window -> set log break point radio button pause to never , log function argument to always ok
you should see all the lib functions breakpointed in pink
f9 to run the application
on exit look at log window for all the calls that were made to other modules from executab;e
Log data
Message
Program entry point
CALL to GetSystemTimeAsFileTime
pFileTime = 0013FFB4
CALL to GetCurrentProcessId
CALL to GetCurrentThreadId
CALL to GetTickCount
CALL to QueryPerformanceCounter
pPerformanceCount = 0013FFAC
CALL to HeapCreate
Flags = 0
InitialSize = 1000 (4096.)
MaximumSize = 0
CALL to GetModuleHandleW
pModule = "KERNEL32.DLL"
CALL to GetProcAddress
hModule = 7C800000 (kernel32)
ProcNameOrOrdinal = "FlsAlloc"
CALL to GetProcAddress
hModule = 7C800000 (kernel32)
ProcNameOrOrdinal = "FlsGetValue"
CALL to GetProcAddress
hModule = 7C800000 (kernel32)
ProcNameOrOrdinal = "FlsSetValue"
CALL to GetProcAddress
hModule = 7C800000 (kernel32)
ProcNameOrOrdinal = "FlsFree"
CALL to TlsAlloc
CALL to TlsSetValue
TlsIndex = 1
pValue = kernel32.TlsGetValue
CALL to TlsAlloc
CALL to HeapAlloc
hHeap = 00350000
Flags = HEAP_ZERO_MEMORY
windbg
cdb -c "!logexts.loge;!logm i *;!loge;!logo e d;g;q" msgboxw.exe > trace.txt & grep MessageBoxW trace.txt
Thrd 3c4 00401017 MessageBoxW( NULL "cannot find "hello"" "test"MB_OK) -> IDOK
Thrd 3c4 0040102B MessageBoxW( NULL "cannot find "iello"" "test"MB_OK) -> IDOK
Thrd 3c4 0040103F MessageBoxW( NULL "cannot find "jello"" "test"MB_OK) -> IDOK
Thrd 3c4 00401053 MessageBoxW( NULL "cannot find "fello"" "test"MB_OK) -> IDOK
Thrd 3c4 00401067 MessageBoxW( NULL "cannot find "kello"" "test"MB_OK) -> IDOK
Thrd 3c4 0040107B MessageBoxW( NULL "saying "hello" baby" "test"MB_OK) -> IDOK
ltrace
isn't a debugger either), but does a lot of what you might want: Api Monitor