Reversing CoreTelephony using otool

Discussion in 'iOS Development' started by saravanadel, Feb 17, 2010.

  1. saravanadel

    saravanadel New Member

    Joined:
    Feb 17, 2010
    Messages:
    2
    Likes Received:
    0
    Hi Everyone,
    I had a few problems in terms of understanding the method and method input parameters of the binary dumps created using otool and nm.
    Lets take the example of coretelephony class
    http://code.google.com/p/iphone-wireless/wiki/CoreTelephonyFunctions
    in this dump every method seems to be the same , i cannot differentiate how many input parameters each and every method taken.

    EX: _CTTelephonyCenterAddObserver - takes 4 arguments
    _CTCallAnswer - takes 1 argument

    How can be we find out this.When i try changing the input parameters also the ide does not warn me that this method with argument is invalid.

    Please help , i am stuck in this. Thnks .
  2. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    I'm not terribly familiar with reverse-engineering (the most I've done is reverse a few very basic C programs), but perhaps you would do something like this:

    disassemble the function, and see what registers have their values copied to the stack right off the bat.

    For example (x86-64),

    %rdi -> 1st argument
    %rsi -> 2nd argument
    %rdx -> 3rd, etc.

Share This Page