Глядя на декомпилированный двоичный файл, я замечаю, что там есть раздел __swift_entry, указывающий на функция входа -
Код: Выделить всё
undefined entry()
10000c01c f6 57 bd a9 stp x22,x21,[sp, #local_30]!
...
//
// __swift5_entry
// __TEXT
// ram:xxx-ram:yyy
//
10xxxxx9c 80 16 6b fc pointer32 __((relative)) entry
10xxxxxa0 00 ?? 00h
10xxxxxa1 00 ?? 00h
10xxxxxa2 00 ?? 00h
10xxxxxa3 00 ?? 00h
Код: Выделить всё
Process.mainModule
.enumerateSections()
.find(r => /^__swift[5-9]_entry$/.test(r.name))
.address
.readByteArray(4)
// 0000 80 16 6b fc
Подробнее здесь: https://stackoverflow.com/questions/793 ... -using-fri
Мобильная версия