Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
904 stars 205 forks source link

Code Renderer for Objective-C calls #5597

Open torarnv opened 1 year ago

torarnv commented 1 year ago

It would be nice if the signatures of the Objective-C messages would match more closely their form in practical use/documentation, etc. This is how they look right now:

image

Improvements would be:

0cyn commented 1 year ago

The image shown here doesn't appear to have the workflow actually operating on this method.

Either the workflow is not enabled or it is for some reason not running on this specific method.

The method signature should read: -[NSView addSubview:](NSView self, SEL arg2, id arg3)

If the workflow is enabled, it'd be helpful if you could shoot the binary over so I can take a look.

"No _ prefix in the signature" "Automatic rename of arg1 to self and arg2 to sel in the disassembly" "Removal of self and sel in the signature (these are implicit)"

All of these should already be happening within the workflow.

"Selector arguments in-line in the selector, e.g. -[NSView addSubview:(NSView*)arg1], instead of suffixed with ()"

This is currently blocking on something similar to a "Code renderer" in the core, similar to what exists for "DataRenderers", that'd allow custom token post-processing for existing HLIL.

torarnv commented 1 year ago

These are my settings:

image

I was under the impression that enabling the Objective-C plugin is enough. Is this workflow a superset of the default function workflow, or do I need to switch between the two if I'm analysing non-Objective-C code?

Tried now with the ObjC function workflow explicitly selected, after restarting BN, and the results are the same.

Log shows:

Loaded native plugin arch_arm64
Loaded native plugin arch_armv7
Loaded native plugin arch_mips
Loaded native plugin arch_ppc
Loaded native plugin arch_x86
Loaded native plugin cryptoplugin
Loaded native plugin pdb_import_plugin
Loaded native plugin platform_decree
Loaded native plugin platform_freebsd
Loaded native plugin platform_linux
Loaded native plugin platform_mac
Loaded native plugin platform_windows
Loaded native plugin workflow_objc
Loaded native plugin debuggercore
Loaded native plugin pythonplugin
Loaded UI plugin debuggerui
Loaded UI plugin triage
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a6454c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a64588
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a64c1c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a64c90
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a6bd4c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a6bd88
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a6e67c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a70a48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a7c0b4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a7c0c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a7d934
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a8a4d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183a9f920
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183aa2d48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183aa3b80
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183aa8054
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ab670c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ab9238
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183abfba8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183abfbc0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac1c1c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac1c54
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac1c64
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac1c74
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac1f28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac2160
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac239c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac23ac
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac2900
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac3840
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac3b78
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ac3e84
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183acedf0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183acf070
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183acf11c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183acf238
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183acf258
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad0198
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad026c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad08ec
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad0908
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad1088
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad1a2c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad1a44
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad2c2c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad2c3c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad31a8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad31c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad3248
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad3264
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad43a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ad45e8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af4a18
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af4b6c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af5e28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af9074
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af9228
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af9550
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af9644
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183af967c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183afa70c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183afadb0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183afb108
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b1047c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b104a8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b104b8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b12204
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b1221c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b134dc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b134f0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b1abfc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b1ac34
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b1b878
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b236e0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b236f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b2bab4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b2d9a4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b2e858
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b3167c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b34618
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b45578
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b455f0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b45b28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b45bb0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b4dad8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b4dd94
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b5d7bc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b5dbe0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b5dd40
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b5df20
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b5f9bc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b74830
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b79264
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b819f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b856b4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b86e48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b86e84
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b87be8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b87f28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b880e4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b88774
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b88b34
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b8c584
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183b8d360
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bae8b4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183baf7a8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bafba0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bb0c84
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bbc258
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bbc268
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bbc278
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bcb4dc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bcb4f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bcb50c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bcb528
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bd46d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bd74f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bda250
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bda744
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bda864
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdaab4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdb1a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdb1b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdb1c0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdb1d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdc02c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdc910
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdf6f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bdfb50
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183be00cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183be23f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183be89ac
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bee974
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bee9a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183beec8c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183beeca0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf00c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf0110
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf0134
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf0158
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf017c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf01a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf01c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf02b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf1158
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bf5d80
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bfca7c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183bfcd00
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c03050
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c03068
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c03ab8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c03ac8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c04f2c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c0a6cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c15e28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c17064
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c1a028
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c4114c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c41164
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c424b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c42680
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c510c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c510dc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c510fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c516cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c57180
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c577b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c577c0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c5d478
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c5d5fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c60e8c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c67d38
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c67d48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c6bf9c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c6bfac
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c79bbc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c79c44
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c79fc8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c7a224
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c81a40
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c93508
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c96fc8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c9d164
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183c9d2f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ca58cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ca7a0c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cafb94
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb2170
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb7cc8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb80cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb8410
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb8f88
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cb91cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cbeba8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183cc4348
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ccd1e0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ce0ca0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ce2680
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d17330
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d33abc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d41fe8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d6e6fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d6e8ac
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d72ab0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d763fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d76bc0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d85594
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88224
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88250
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88320
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88364
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d884c0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88504
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88a94
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d88ad8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d896b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d896d4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d94098
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d97944
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d97958
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d97968
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d9797c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d97c64
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d97f4c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183d9827c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183da1224
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183da7704
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183dbc928
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183dbf760
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183dcc8b8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ddb5fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ddb6fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ddb77c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183dde5f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183dde70c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ddfe10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183de05fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183de7b28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183df1298
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e0089c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e008ac
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e1a2d4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e1aa08
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e1b2f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e1b630
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e36fb0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3726c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3d78c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3dde0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3ddf4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3e98c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3e9a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3ef00
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3ef14
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3f418
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e3fa20
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e4005c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e40070
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e406a8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e406bc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e40fa8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e40fbc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e40fcc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e40fe0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e413bc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e413d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e47be4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e4f9cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e6be90
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e6befc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e7742c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e8403c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e84310
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e84334
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e89de4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e89e1c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183e9652c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ead628
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ead638
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183eafb10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ec7ce0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ed7aa0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee1020
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee4400
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee51f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee5204
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee5244
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee5740
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee71a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee85bc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ee9a10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ef967c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ef96fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ef9978
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183efeb10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f00248
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f0065c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f0067c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f041fc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f14438
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f20354
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f23e38
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f253dc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f2eb80
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f3e4e4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f41664
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f41678
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f4f650
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f53098
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f63d7c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f69864
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f69878
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6ccfc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6cd10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6cd28
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6cd3c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6cd4c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f6cd60
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f73a10
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f73aa8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f744b4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f744c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f806dc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f94428
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f94460
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f94480
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f944b8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f944f0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f96aa0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183f9a070
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fa7944
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fb894c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fb90d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fc0a20
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fcc798
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fcc7c0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fcc804
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fcc82c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183fd4b44
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x183ff17a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184003a48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840044ec
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184008d4c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18400a9ec
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184018524
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184018740
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18401d14c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18401d360
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184020024
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18402b70c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18402b738
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184037668
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184041be0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184052f04
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18405fe60
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840651f4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840674cc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18406f4b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18406f9a8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840702a0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184070854
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184070fcc
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184070fe4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18407160c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18409f134
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18409f4a4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840ac918
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840acf48
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840ad1c4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840b40d0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840b413c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d1c58
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d2270
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d5eb0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d5f1c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d5f44
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d91e8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d9288
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d9be8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840d9c54
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840e2e78
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840e78c8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840e92f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840e9350
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840e95f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f3428
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f343c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f6060
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f67e0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f79b0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1840f810c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841012d8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18410388c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18410eb6c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18410eb88
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18410eba8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841106f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184110958
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184110978
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184111a20
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184111a30
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184112264
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18411b084
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18411bd78
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18411c0d4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184122a0c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18412e6b8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18413618c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184137fb0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841393e4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18413947c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841398e4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18413997c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184143da4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184143db8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18414b708
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184152300
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184162060
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184162188
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184162448
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18416d4a4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18416e944
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18416f3a4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18417d03c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841895f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18418ac14
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18418ac24
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18418d168
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18418f690
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184191bb8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184191bc8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184191c00
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184191c38
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184191cf0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x184192014
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18419204c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841921e8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841922f8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841986c0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18419c970
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18419dc90
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x18419dde0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a1fa0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a2c74
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a2c8c
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a2ca8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a2cc0
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a2cd8
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a6ce4
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a6d08
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841a6d60
Possible error processing LC_FUNCTION_STARTS! Not adding function at: 0x1841b99f4
Mach-O parsing took 1.426 seconds
No available/valid debug info parsers for `Mach-O` view
Structure analysis failed; binary may be malformed.
Objective-C analysis will not be applied due to previous errors.
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Cannot perform Objective-C IL cleanup; no objc_msgSend candidates found
Function 0x183727ee4 at 0x18372815c has HLIL condition that exceeds maximum complexity, omitting condition (step 83)
Function 0x1840e0888 at 0x1840e09b0 has HLIL condition that exceeds maximum complexity, omitting condition (step 36)
Function 0x1840e0888 at 0x1840e09b0 has HLIL condition that exceeds maximum complexity, omitting condition (step 36)
Function 0x183727ee4 at 0x18372815c has HLIL condition that exceeds maximum complexity, omitting condition (step 83)
Function 0x183727ee4 at 0x18372815c has HLIL condition that exceeds maximum complexity, omitting condition (step 83)
Analysis update took 83.993 seconds
Analysis starting...
Adding section: __auth_stubs <0x1841c5b80 - 0x1841d0e6f> for analysis.
Adding section: __objc_stubs <0x18450da60 - 0x1845f8fff> for analysis.
Adding section: __text <0x1836f1ed4 - 0x1841c5b7f> for analysis.
Analysis Phase 2.0 created 0 functions. [aarch64:mac-aarch64]
Analysis Phase 2.1 created 0 functions. [aarch64:mac-aarch64]
Analysis Phase 3.0 created 1031 functions [aarch64:mac-aarch64]
Analysis Phase 3.1 created 1 functions [aarch64:mac-aarch64]
Analysis Phase 3.2 created 0 functions [aarch64:mac-aarch64]
0 functions matched total, 0 name-only matches, 1 thunks resolved, 2632 functions skipped because they were too small
Analysis update took 4.292 seconds
torarnv commented 1 year ago

If the workflow is enabled, it'd be helpful if you could shoot the binary over so I can take a look.

This is AppKit, extracted from the dyld cache via https://github.com/keith/dyld-shared-cache-extractor

0cyn commented 1 year ago

I was under the impression that enabling the Objective-C plugin is enough. Is this workflow a superset of the default function workflow, or do I need to switch between the two if I'm analysing non-Objective-C code?

Typically the way it's used is via "Open with Options" > Clicking Workflow > Swapping it to the Objective-C one, for Objective-C bins. But you can also switch it back and forth in settings if you are going to be reversing several and don't want to repeat that.

via https://github.com/keith/dyld-shared-cache-extractor

This is a duplicate of Vector35/binaryninja-api#5596, then, as keith/dyld-shared-cache-extractor does not properly extract the binaries, and simply just wraps the default xcode tools.

torarnv commented 1 year ago

Typically the way it's used is via "Open with Options" > Clicking Workflow > Swapping it to the Objective-C one, for Objective-C bins.

Ah, I see. How does this work with binaries that contain both Objective-C and non-Objective-C (C++/C) code? Does the Objective-C analysis handle the latter fine in the ObjC-mode?

This is a duplicate of https://github.com/Vector35/binaryninja-api/issues/5596, then, as keith/dyld-shared-cache-extractor does not properly extract the binaries, and simply just wraps the default xcode tools.

Thanks for the tip!

I tried a small example locally:


#import <Foundation/Foundation.h>

@interface Foo : NSObject
-(void)doit:(int)foo;
@end

@implementation Foo
- (void)doit:(int)foo
{

}
@end

int main()
{
    Foo *foo = [Foo new];
    [foo doit:123];
    return 0;
}

Built with `clang++ /tmp/objc.mm -framework Foundation -o ~/tmp/objc``

and that gives:

image

The self and sel arguments seem to have been detected, but not hidden, and the arguments are in () and not part of the selector.

Should I open a separate issue about mapping _objc_opt_new(cr_Foo) to [Foo new] and _objc_msgSend$doit:(self: _objc_opt_new(cr_Foo), sel: var_30) to something more aligned with the original code?

torarnv commented 1 year ago

Since the original report still applies to the minimal non-dyld-cache example, should this be reopened?

0cyn commented 1 year ago

The minimal repro is reproducing Vector35/binaryninja-api#5563

torarnv commented 1 year ago

Which part of it?

Ah, I see. How does this work with binaries that contain both Objective-C and non-Objective-C (C++/C) code? Does the Objective-C analysis handle the latter fine in the ObjC-mode?

Any comments on this? 👆🏻 Thanks!

0cyn commented 1 year ago

The _objc_msgSend$doit: part.

I'll reopen it though, renamed as "Code Renderer for Objective-C calls", regarding the current call syntaxes.

Apologies, wasn't immediately clear what was being asked.

Ah, I see. How does this work with binaries that contain both Objective-C and non-Objective-C (C++/C) code? Does the Objective-C analysis handle the latter fine in the ObjC-mode?

Yes, if there's no Objective-C and the workflow is enabled, it will simply do nothing.

torarnv commented 1 year ago

Yes, if there's no Objective-C and the workflow is enabled, it will simply do nothing.

Excellent, thanks! Then I can have it always enabled :)