Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recheck all callback #118

Open
Xele02 opened this issue Sep 2, 2023 · 0 comments
Open

Recheck all callback #118

Xele02 opened this issue Sep 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Xele02
Copy link
Owner

Xele02 commented Sep 2, 2023

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 Xele02 added the bug Something isn't working label Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant