I found that guarded_open_np
function is used by libsqlite3.dylib to open database file. I had a look into sqlite3 open source, there was no such thing. So definitely Apple has modified it to use guarded_open_np
instead of unix's open
.
I know that guarded_open_np
is a private API and I found neither header nor documentation about it. I want to do interception (Cydia's MSFunctionHook) on guarded_open_np
, so I need to know what are the parameters as well, not just the function name.
I reverse-engineered libsqlite3.dylib using IDA Pro, this is how it called guarded_open_np
:
sub_79c1c:
push {r7, lr}
mov r7, sp
sub sp, #0x4
mov r3, r1
movw r1, #0xc57e
movt r1, #0x0
str r2, [sp, #0x4 + var_0]
add r1, pc
movs r2, #0xf
blx imp___picsymbolstub4__guarded_open_np
add sp, #0x4
pop {r7, pc}
However, it is still not clear what params it could take. I appreciate much if there is some official site mentioning guarded_open_np
with all its parameters.