Thanks for Your response. I am using Cdecl calling convention in all dll import attributes (using parameter to set it). I found here: http://www.sqlite.org/cvstrac/wiki? p=SqliteWikiFaq that it is the right one. I tried to check all available calling conventions (Cdecl, StdCall, ThisCall, Winapi) with no result.
Please notify that "step" into simple query (without custom function) works ok in all builds, but using custom function crashing only in x86 build (x64, arm are ok).