fffang
2020-12-10 19:09:43 +08:00
InitWithCoder`-[UIViewController(hook) new_initWithCoder:]:
0x1043e1e60 <+0>: sub sp, sp, #0x40 ; =0x40
0x1043e1e64 <+4>: stp x29, x30, [sp, #0x30]
0x1043e1e68 <+8>: add x29, sp, #0x30 ; =0x30
0x1043e1e6c <+12>: stur x0, [x29, #-0x8]
0x1043e1e70 <+16>: stur x1, [x29, #-0x10]
0x1043e1e74 <+20>: add x8, sp, #0x18 ; =0x18
0x1043e1e78 <+24>: mov x9, #0x0
0x1043e1e7c <+28>: str x9, [sp, #0x18]
0x1043e1e80 <+32>: mov x0, x8
0x1043e1e84 <+36>: mov x1, x2
0x1043e1e88 <+40>: str x8, [sp, #0x10]
0x1043e1e8c <+44>: str x9, [sp, #0x8]
0x1043e1e90 <+48>: bl 0x1043e253c ; symbol stub for: objc_storeStrong
0x1043e1e94 <+52>: ldur x0, [x29, #-0x8]
0x1043e1e98 <+56>: ldr x2, [sp, #0x18]
0x1043e1e9c <+60>: adrp x8, 4
0x1043e1ea0 <+64>: add x8, x8, #0x4b8 ; =0x4b8
0x1043e1ea4 <+68>: ldr x1, [x8]
0x1043e1ea8 <+72>: bl 0x1043e2500 ; symbol stub for: objc_msgSend
0x1043e1eac <+76>: bl 0x1043e2518 ; symbol stub for: objc_release
-> 0x1043e1eb0 <+80>: ldur x0, [x29, #-0x8]
0x1043e1eb4 <+84>: bl 0x1043e2524 ; symbol stub for: objc_retain
0x1043e1eb8 <+88>: ldr x8, [sp, #0x10]
0x1043e1ebc <+92>: str x0, [sp]
0x1043e1ec0 <+96>: mov x0, x8
0x1043e1ec4 <+100>: ldr x9, [sp, #0x8]
0x1043e1ec8 <+104>: mov x1, x9
0x1043e1ecc <+108>: bl 0x1043e253c ; symbol stub for: objc_storeStrong
0x1043e1ed0 <+112>: ldr x0, [sp]
0x1043e1ed4 <+116>: ldp x29, x30, [sp, #0x30]
0x1043e1ed8 <+120>: add sp, sp, #0x40 ; =0x40
0x1043e1edc <+124>: ret
InitWithCoder`-[UIViewController(hook) abc_initWithCoder:]:
0x104ac1e60 <+0>: sub sp, sp, #0x40 ; =0x40
0x104ac1e64 <+4>: stp x29, x30, [sp, #0x30]
0x104ac1e68 <+8>: add x29, sp, #0x30 ; =0x30
0x104ac1e6c <+12>: stur x0, [x29, #-0x8]
0x104ac1e70 <+16>: stur x1, [x29, #-0x10]
0x104ac1e74 <+20>: add x8, sp, #0x18 ; =0x18
0x104ac1e78 <+24>: mov x9, #0x0
0x104ac1e7c <+28>: str x9, [sp, #0x18]
0x104ac1e80 <+32>: mov x0, x8
0x104ac1e84 <+36>: mov x1, x2
0x104ac1e88 <+40>: str x8, [sp, #0x10]
0x104ac1e8c <+44>: str x9, [sp, #0x8]
0x104ac1e90 <+48>: bl 0x104ac2530 ; symbol stub for: objc_storeStrong
0x104ac1e94 <+52>: ldur x0, [x29, #-0x8]
0x104ac1e98 <+56>: ldr x2, [sp, #0x18]
0x104ac1e9c <+60>: adrp x8, 4
0x104ac1ea0 <+64>: add x8, x8, #0x4b8 ; =0x4b8
0x104ac1ea4 <+68>: ldr x1, [x8]
0x104ac1ea8 <+72>: bl 0x104ac2500 ; symbol stub for: objc_msgSend
0x104ac1eac <+76>: mov x29, x29
0x104ac1eb0 <+80>: bl 0x104ac253c ; symbol stub for: objc_unsafeClaimAutoreleasedReturnValue
-> 0x104ac1eb4 <+84>: ldur x8, [x29, #-0x8]
0x104ac1eb8 <+88>: ldr x9, [sp, #0x10]
0x104ac1ebc <+92>: mov x0, x9
0x104ac1ec0 <+96>: ldr x10, [sp, #0x8]
0x104ac1ec4 <+100>: mov x1, x10
0x104ac1ec8 <+104>: str x8, [sp]
0x104ac1ecc <+108>: bl 0x104ac2530 ; symbol stub for: objc_storeStrong
0x104ac1ed0 <+112>: ldr x0, [sp]
0x104ac1ed4 <+116>: ldp x29, x30, [sp, #0x30]
0x104ac1ed8 <+120>: add sp, sp, #0x40 ; =0x40
0x104ac1edc <+124>: ret
以 new 开头的方法到底做了什么呢?附上两个这两个仅仅方法名不同的汇编实现以供有兴趣的同学研究~