UMO icon indicating copy to clipboard operation
UMO copied to clipboard

Recheck all callback

Open Xele02 opened this issue 1 year ago • 0 comments

Ghidra fail to undestand some callback switch. IE in ListSortButtonGroup OnSortButton . Asm code :

        01541be8 00 60 a0 e1     cpy        r6,r0
        01541bec 01 00 77 e3     cmn        r7,#0x1
        01541bf0 02 00 00 0a     beq        LAB_01541c00
        01541bf4 54 00 9f e5     ldr        r0,[DAT_01541c50]                                = 025D7EF4h
        01541bf8 00 00 9f e7     ldr        r0,[pc,r0]=>->Method$XeApp.Game.Menu.ListSortB   = 03ba1dd4
        01541bfc 01 00 00 ea     b          LAB_01541c08
                             LAB_01541c00                                    XREF[1]:     01541bf0(j)  
        01541c00 4c 00 9f e5     ldr        r0,[DAT_01541c54]                                = 025D7ECCh
        01541c04 00 00 9f e7     ldr        r0,[pc,r0]=>->Method$XeApp.Game.Menu.ListSortB   = 03ba1dd8
                             LAB_01541c08                                    XREF[1]:     01541bfc(j)  
        01541c08 00 20 90 e5     ldr        r2,[r0,#0x0]=>Method$XeApp.Game.Menu.ListSortB   = ??
        01541c0c 06 00 a0 e1     cpy        r0,r6
        01541c10 04 10 a0 e1     cpy        r1,r4
        01541c14 00 30 a0 e3     mov        r3,#0x0
        01541c18 f5 78 e4 eb     bl         XeApp.Game.Common.ButtonBase.OnClickCallback$$   void XeApp.Game.Common.ButtonBas

image c code reverted :

  pXVar1 = (__this->fields).m_sortListButton;
  OnClickEvent = (XeApp_Game_Common_ButtonBase_OnClickCallback_o *)
                 thunk_FUN_0087e91c(XeApp.Game.Common.ButtonBase.OnClickCallback_TypeInfo);
  XeApp.Game.Common.ButtonBase.OnClickCallback$$.ctor();
  if (pXVar1 == (XeApp_Game_Common_ActionButton_o *)0x0) {
                    /* WARNING: Subroutine does not return */
    FUN_0086eea0(0);
  }
  XeApp.Game.Common.ButtonBase$$AddOnClickCallback
            ((XeApp_Game_Common_ButtonBase_o *)pXVar1,OnClickEvent,(MethodInfo *)0x0);

Ghidra completely miss the test at address 01541bf0 and so the callback switch. All callback assignement should be rechecked to find error of the same type.

Xele02 avatar Sep 02 '23 11:09 Xele02