A few possibilities come to mind:
The application did not use WriteFile
but some other API to write.
one of the other APIs or one of the DLLs used by the program called WriteFile
indirectly. You can try to catch the this situation by putting a breakpoint on the final API in kernel32 (kernel32_WriteFile
).
As mentined by Amirag, the program could be calling the native API NtWriteFile
in ntdll.dll
directly, or even invoke the syscall instruction manually (though this is very rare and tricky to pull off).
the write was performed on the process' behalf by the kernel or a kernel-mode driver. This situation can't be caught by a user-mode debugger.
To determine the real cause, double-click the event in Process Monitor and check the Stack tab. If you configure the symbols properly, you should see the actual path through the process and the kernel and determine what exact location in the process triggered the write and inspect the code there.
NtWriteFile
, maybe try breaking on it instead? also, by hitting ctrl+x you can see where a function is being used. (cross reference)fwrite
,fprintf
and other members of that family). Because if the application isn't statically linked these imports would be imports of the C runtime DLLs rather than of the application itself.fwrite