{"type": "func", "start": 8781384, "end": 8781708, "name": "GJBaseGameLayer::getMoveTargetDelta", "pseudocode": "// \n// GJBaseGameLayer::getMoveTargetDelta from 0x85fe48 to 0x85ff8c (324 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::triggerMoveCommand @ 0x874f54\n// > <???> @ 0x6a500\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCPoint GJBaseGameLayer::getMoveTargetDelta(GJBaseGameLayer *a1, EffectGameObject *a2, bool a3)\n{\n  cocos2d::CCPoint *v3; // x8\n  int m_targetModCenterID; // w1\n  cocos2d::CCPoint *v7; // x23\n  _BOOL4 v8; // w24\n  GameObject *MainObject; // x22\n  PlayerObject *m_player1; // x0\n  int m_centerGroupID; // w1\n  __int64 v14; // [xsp+58h] [xbp+58h] BYREF\n  __int64 v15; // [xsp+60h] [xbp+60h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  m_targetModCenterID = a2->m_targetModCenterID;\n  v7 = v3;\n  v8 = a3;\n  if ( m_targetModCenterID <= 0 )\n    m_targetModCenterID = a2->m_targetGroupID;\n  if ( a3 )\n    MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_targetModCenterID);\n  else\n    MainObject = GJBaseGameLayer::tryGetObject(a1, m_targetModCenterID);\n  if ( a2->m_targetPlayer1 )\n  {\nLABEL_8:\n    m_player1 = a1->m_player1;\n    goto LABEL_9;\n  }\n  if ( a2->m_targetPlayer2 )\n  {\n    if ( a1->m_gameState.m_isDualMode )\n    {\n      m_player1 = a1->m_player2;\n      goto LABEL_9;\n    }\n    goto LABEL_8;\n  }\n  m_centerGroupID = a2->m_centerGroupID;\n  if ( v8 )\n    m_player1 = (PlayerObject *)GJBaseGameLayer::tryGetMainObject(a1, m_centerGroupID);\n  else\n    m_player1 = (PlayerObject *)GJBaseGameLayer::tryGetObject(a1, m_centerGroupID);\nLABEL_9:\n  if ( m_player1 && MainObject && MainObject->m_uniqueID != m_player1->m_uniqueID )\n  {\n    m_player1->getRealPosition((PlayerObject *)&v14);\n    ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))MainObject->getRealPosition)(&v15, MainObject);\n    cocos2d::CCPoint::operator-(v7, &v14, &v15);\n  }\n  else\n  {\n    cocos2d::CCPoint::CCPoint(v7, &stru_1242DA8);\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getMoveTargetDelta from 0x85fe48 to 0x85ff8c (324 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::triggerMoveCommand @ 0x874f54\n; > <???> @ 0x6a500\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x85fe48\nMOV             X29, SP                                                ; +0x4, 0x85fe4c\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x85fe50\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x85fe54\nMOV             X20, X1                                                ; +0x10, 0x85fe58\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0x85fe5c\nMOV             X21, X0                                                ; +0x18, 0x85fe60\nLDR             W1, [X1,#0x5E8]; int                                   ; +0x1c, 0x85fe64\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x85fe68\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x24, 0x85fe6c\nCMP             W1, WZR                                                ; +0x28, 0x85fe70\nMOV             X23, X8                                                ; +0x2c, 0x85fe74\nLDR             X0, [X0]                                               ; +0x30, 0x85fe78\nUXTB            W24, W2                                                ; +0x34, 0x85fe7c\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x38, 0x85fe80\nB.LE            loc_85FF70                                             ; +0x3c, 0x85fe84\nMOV             X0, X21; this                                          ; +0x40, 0x85fe88\nCBZ             W24, loc_85FF0C                                        ; +0x44, 0x85fe8c\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x48, 0x85fe90\nMOV             X22, X0                                                ; +0x4c, 0x85fe94\nLDRB            W0, [X20,#0x684]                                       ; +0x50, 0x85fe98\nCBNZ            W0, loc_85FEB0                                         ; +0x54, 0x85fe9c\nLDRB            W0, [X20,#0x685]                                       ; +0x58, 0x85fea0\nCBZ             W0, loc_85FF5C                                         ; +0x5c, 0x85fea4\nLDRB            W0, [X21,#0x412]                                       ; +0x60, 0x85fea8\nCBNZ            W0, loc_85FF78                                         ; +0x64, 0x85feac\nLDR             X0, [X21,#0xDF8]                                       ; +0x68, 0x85feb0\nCBZ             X0, loc_85FECC                                         ; +0x6c, 0x85feb4\nCBZ             X22, loc_85FECC                                        ; +0x70, 0x85feb8\nLDR             W2, [X22,#0x384]                                       ; +0x74, 0x85febc\nLDR             W1, [X0,#0x384]                                        ; +0x78, 0x85fec0\nCMP             W2, W1                                                 ; +0x7c, 0x85fec4\nB.NE            loc_85FF18                                             ; +0x80, 0x85fec8\nADRP            X1, #qword_1242DA0@PAGE                                ; +0x84, 0x85fecc\nMOV             X0, X23; this                                          ; +0x88, 0x85fed0\nADD             X1, X1, #qword_1242DA0@PAGEOFF                         ; +0x8c, 0x85fed4\nADD             X1, X1, #8; cocos2d::CCPoint *                         ; +0x90, 0x85fed8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x94, 0x85fedc\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x98, 0x85fee0\nMOV             X0, X23                                                ; +0x9c, 0x85fee4\nLDR             X2, [X29,#0x70+var_8]                                  ; +0xa0, 0x85fee8\nLDR             X1, [X19]                                              ; +0xa4, 0x85feec\nCMP             X2, X1                                                 ; +0xa8, 0x85fef0\nB.NE            loc_85FF88                                             ; +0xac, 0x85fef4\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0xb0, 0x85fef8\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0xb4, 0x85fefc\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0xb8, 0x85ff00\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0xbc, 0x85ff04\nRET                                                                    ; +0xc0, 0x85ff08\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0xc4, 0x85ff0c\nMOV             X22, X0                                                ; +0xc8, 0x85ff10\nB               loc_85FE98                                             ; +0xcc, 0x85ff14\nLDR             X1, [X0]                                               ; +0xd0, 0x85ff18\nADD             X21, X29, #0x70+var_18                                 ; +0xd4, 0x85ff1c\nMOV             X8, X21                                                ; +0xd8, 0x85ff20\nADD             X20, X29, #0x70+var_10                                 ; +0xdc, 0x85ff24\nLDR             X1, [X1,#0x540]                                        ; +0xe0, 0x85ff28\nBLR             X1                                                     ; +0xe4, 0x85ff2c\nSTR             X20, [X29,#0x70+var_28]                                ; +0xe8, 0x85ff30\nLDR             X2, [X22]                                              ; +0xec, 0x85ff34\nMOV             X8, X20                                                ; +0xf0, 0x85ff38\nMOV             X0, X22                                                ; +0xf4, 0x85ff3c\nLDR             X2, [X2,#0x540]                                        ; +0xf8, 0x85ff40\nBLR             X2                                                     ; +0xfc, 0x85ff44\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x100, 0x85ff48\nMOV             X8, X23                                                ; +0x104, 0x85ff4c\nMOV             X0, X21                                                ; +0x108, 0x85ff50\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x10c, 0x85ff54\nB               loc_85FEE0                                             ; +0x110, 0x85ff58\nLDR             W1, [X20,#0x5AC]; int                                  ; +0x114, 0x85ff5c\nMOV             X0, X21; this                                          ; +0x118, 0x85ff60\nCBZ             W24, loc_85FF80                                        ; +0x11c, 0x85ff64\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x120, 0x85ff68\nB               loc_85FEB4                                             ; +0x124, 0x85ff6c\nLDR             W1, [X20,#0x5A8]                                       ; +0x128, 0x85ff70\nB               loc_85FE88                                             ; +0x12c, 0x85ff74\nLDR             X0, [X21,#0xE00]                                       ; +0x130, 0x85ff78\nB               loc_85FEB4                                             ; +0x134, 0x85ff7c\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x138, 0x85ff80\nB               loc_85FEB4                                             ; +0x13c, 0x85ff84\nBL              .__stack_chk_fail                                      ; +0x140, 0x85ff88", "xrefs": ["GJBaseGameLayer::triggerMoveCommand @ 0x874f54", "<???> @ 0x6a500"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}