{"type": "func", "start": 4664400, "end": 4664596, "name": "GJBaseGameLayer::getMoveTargetDelta", "pseudocode": "// \n// GJBaseGameLayer::getMoveTargetDelta from 0x472c50 to 0x472d14 (196 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::triggerMoveCommand @ 0x481b1e\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(\n        cocos2d::CCPoint *__return_ptr retstr,\n        GJBaseGameLayer *a2,\n        EffectGameObject *a3,\n        bool a4)\n{\n  _BOOL4 v5; // r9\n  int m_targetModCenterID; // r1\n  GameObject *MainObject; // r0\n  _DWORD *v10; // r7\n  PlayerObject *m_player2; // r1\n  int m_centerGroupID; // r1\n  GameObject *Object; // r0\n  _BYTE v15[8]; // [sp+4h] [bp-18h] BYREF\n  _BYTE v16[8]; // [sp+Ch] [bp-10h] BYREF\n\n  v5 = a4;\n  m_targetModCenterID = a3->m_targetModCenterID;\n  if ( m_targetModCenterID <= 0 )\n    m_targetModCenterID = a3->m_targetGroupID;\n  if ( a4 )\n    MainObject = GJBaseGameLayer::tryGetMainObject(a2, m_targetModCenterID);\n  else\n    MainObject = GJBaseGameLayer::tryGetObject(a2, m_targetModCenterID);\n  v10 = &MainObject->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  if ( a3->m_targetPlayer1 )\n    goto LABEL_9;\n  if ( !a3->m_targetPlayer2 )\n  {\n    m_centerGroupID = a3->m_centerGroupID;\n    if ( v5 )\n      Object = GJBaseGameLayer::tryGetMainObject(a2, m_centerGroupID);\n    else\n      Object = GJBaseGameLayer::tryGetObject(a2, m_centerGroupID);\n    m_player2 = (PlayerObject *)Object;\n    goto LABEL_15;\n  }\n  if ( a2->m_gameState.m_isDualMode )\n    m_player2 = a2->m_player2;\n  else\nLABEL_9:\n    m_player2 = a2->m_player1;\nLABEL_15:\n  if ( v10 && m_player2 && v10[193] != m_player2->m_uniqueID )\n  {\n    ((void (__fastcall *)(_BYTE *))m_player2->getRealPosition)(v15);\n    (*(void (__fastcall **)(_BYTE *, _DWORD *))(*v10 + 672))(v16, v10);\n    cocos2d::CCPoint::operator-(retstr, v15, v16);\n  }\n  else\n  {\n    cocos2d::CCPoint::CCPoint(retstr, &stru_AC68C0);\n  }\n  return retstr;\n}", "assembly": "; \n; GJBaseGameLayer::getMoveTargetDelta from 0x472c50 to 0x472d14 (196 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::triggerMoveCommand @ 0x481b1e\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\nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x472c50\nMOV             R4, R1                                                 ; +0x4, 0x472c54\nLDR             R5, =(__stack_chk_guard_ptr - 0x472C64)                ; +0x6, 0x472c56\nMOV             R9, R3                                                 ; +0x8, 0x472c58\nLDR.W           R1, [R2,#0x53C]                                        ; +0xa, 0x472c5a\nSUB             SP, SP, #0x1C                                          ; +0xe, 0x472c5e\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x10, 0x472c60\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x12, 0x472c62\nMOV             R8, R0                                                 ; +0x14, 0x472c64\nCMP             R1, #0                                                 ; +0x16, 0x472c66\nMOV             R6, R2                                                 ; +0x18, 0x472c68\nLDR             R3, [R5]                                               ; +0x1a, 0x472c6a\nMOV             R0, R4; this                                           ; +0x1c, 0x472c6c\nIT LE                                                                  ; +0x1e, 0x472c6e\nLDRLE.W         R1, [R2,#0x4FC]; int                                   ; +0x20, 0x472c70\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x24, 0x472c74\nCMP.W           R9, #0                                                 ; +0x26, 0x472c76\nBEQ             loc_472C82                                             ; +0x2a, 0x472c7a\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x2c, 0x472c7c\nB               loc_472C86                                             ; +0x30, 0x472c80\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x32, 0x472c82\nLDRB.W          R3, [R6,#0x5D8]                                        ; +0x36, 0x472c86\nMOV             R7, R0                                                 ; +0x3a, 0x472c8a\nCBNZ            R3, loc_472C9A                                         ; +0x3c, 0x472c8c\nLDRB.W          R3, [R6,#0x5D9]                                        ; +0x3e, 0x472c8e\nCBZ             R3, loc_472CA6                                         ; +0x42, 0x472c92\nLDRB.W          R3, [R4,#0x372]                                        ; +0x44, 0x472c94\nCBNZ            R3, loc_472CA0                                         ; +0x48, 0x472c98\nLDR.W           R1, [R4,#0x8B8]                                        ; +0x4a, 0x472c9a\nB               loc_472CBE                                             ; +0x4e, 0x472c9e\nLDR.W           R1, [R4,#0x8BC]                                        ; +0x50, 0x472ca0\nB               loc_472CBE                                             ; +0x54, 0x472ca4\nMOV             R0, R4; this                                           ; +0x56, 0x472ca6\nLDR.W           R1, [R6,#0x500]; int                                   ; +0x58, 0x472ca8\nCMP.W           R9, #0                                                 ; +0x5c, 0x472cac\nBEQ             loc_472CB8                                             ; +0x60, 0x472cb0\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x62, 0x472cb2\nB               loc_472CBC                                             ; +0x66, 0x472cb6\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x68, 0x472cb8\nMOV             R1, R0                                                 ; +0x6c, 0x472cbc\nCBZ             R7, loc_472CF4                                         ; +0x6e, 0x472cbe\nCBZ             R1, loc_472CF4                                         ; +0x70, 0x472cc0\nLDR.W           R2, [R7,#0x304]                                        ; +0x72, 0x472cc2\nLDR.W           R3, [R1,#0x304]                                        ; +0x76, 0x472cc6\nCMP             R2, R3                                                 ; +0x7a, 0x472cca\nBEQ             loc_472CF4                                             ; +0x7c, 0x472ccc\nLDR             R3, [R1]                                               ; +0x7e, 0x472cce\nADD             R6, SP, #0x1C+var_18                                   ; +0x80, 0x472cd0\nADD             R4, SP, #0x1C+var_10                                   ; +0x82, 0x472cd2\nMOV             R0, R6                                                 ; +0x84, 0x472cd4\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x86, 0x472cd6\nBLX             R3                                                     ; +0x8a, 0x472cda\nLDR             R3, [R7]                                               ; +0x8c, 0x472cdc\nMOV             R0, R4                                                 ; +0x8e, 0x472cde\nMOV             R1, R7                                                 ; +0x90, 0x472ce0\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x92, 0x472ce2\nBLX             R3                                                     ; +0x96, 0x472ce6\nMOV             R0, R8                                                 ; +0x98, 0x472ce8\nMOV             R1, R6                                                 ; +0x9a, 0x472cea\nMOV             R2, R4                                                 ; +0x9c, 0x472cec\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x9e, 0x472cee\nB               loc_472D00                                             ; +0xa2, 0x472cf2\nLDR             R1, =(qword_AC68B8 - 0x472CFC)                         ; +0xa4, 0x472cf4\nMOV             R0, R8; this                                           ; +0xa6, 0x472cf6\nADD             R1, PC; qword_AC68B8                                   ; +0xa8, 0x472cf8\nADDS            R1, #(stru_AC68C0 - 0xAC68B8); cocos2d::CCPoint *      ; +0xaa, 0x472cfa\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xac, 0x472cfc\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xb0, 0x472d00\nMOV             R0, R8                                                 ; +0xb2, 0x472d02\nLDR             R3, [R5]                                               ; +0xb4, 0x472d04\nCMP             R2, R3                                                 ; +0xb6, 0x472d06\nBEQ             loc_472D0E                                             ; +0xb8, 0x472d08\nBLX             __stack_chk_fail                                       ; +0xba, 0x472d0a\nADD             SP, SP, #0x1C                                          ; +0xbe, 0x472d0e\nPOP.W           {R4-R9,PC}                                             ; +0xc0, 0x472d10", "xrefs": ["GJBaseGameLayer::triggerMoveCommand @ 0x481b1e"], "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"}