{"type": "func", "start": 8796008, "end": 8796456, "name": "GJBaseGameLayer::getFollowSpeedVal", "pseudocode": "// \n// GJBaseGameLayer::getFollowSpeedVal from 0x863768 to 0x863928 (448 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::modifyObjectPhysics @ 0x863a1c\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x8841d0\n// > <???> @ 0x705f0\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::getFollowSpeedVal(\n        GJBaseGameLayer *a1,\n        GameObject *a2,\n        int a3,\n        int a4,\n        float a5,\n        float a6)\n{\n  float v10; // s8\n  GameObject *Object; // x0\n  GameObject *v12; // x24\n  const cocos2d::CCPoint *LastPosition; // x23\n  const cocos2d::CCPoint *v14; // x0\n  float v15; // s0\n  float v16; // s1\n  float v17; // s1\n  GameObject *v20; // x24\n  cocos2d::CCPoint v22; // [xsp+78h] [xbp+78h] BYREF\n  __int64 v23; // [xsp+80h] [xbp+80h] BYREF\n  __int64 v24; // [xsp+88h] [xbp+88h] BYREF\n  __int64 v25; // [xsp+90h] [xbp+90h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v10 = (float)(90.0 - a5) * 0.017453;\n  cocos2d::CCPoint::CCPoint(&v22, &stru_1242DA8);\n  if ( a3 > 0 )\n  {\n    Object = GJBaseGameLayer::tryGetObject(a1, a3);\n    v12 = Object;\n    if ( Object )\n    {\n      LastPosition = GameObject::getLastPosition(Object);\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))v12->getRealPosition)(&v24, v12);\n      v14 = LastPosition;\nLABEL_4:\n      cocos2d::CCPoint::operator-(&v25, v14, &v24);\n      cocos2d::CCPoint::operator=(&v22, v15, v16);\n      goto LABEL_5;\n    }\n  }\n  if ( a4 > 0 )\n  {\n    v20 = GJBaseGameLayer::tryGetObject(a1, a4);\n    if ( v20 )\n    {\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))a2->getRealPosition)(&v23, a2);\n      ((void (__fastcall *)(__int64 *__return_ptr, GameObject *))v20->getRealPosition)(&v24, v20);\n      v14 = (const cocos2d::CCPoint *)&v23;\n      goto LABEL_4;\n    }\n  }\nLABEL_5:\n  if ( v22.x != 0.0 || v22.y != 0.0 )\n  {\n    v17 = atan2(v22.y, v22.x) + 1.57079633;\n    v10 = v10 + v17;\n  }\n  cocos2d::ccpForAngle(v10);\n  cocos2d::CCPoint::operator*(&v25, a6);\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getFollowSpeedVal from 0x863768 to 0x863928 (448 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::modifyObjectPhysics @ 0x863a1c\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x8841d0\n; > <???> @ 0x705f0\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_A0]!                                ; +0x0, 0x863768\nMOV             X29, SP                                                ; +0x4, 0x86376c\nLDR             S2, =0x42B40000                                        ; +0x8, 0x863770\nSTP             D8, D9, [SP,#0xA0+var_58]                              ; +0xc, 0x863774\nSTP             X19, X20, [SP,#0xA0+var_90]                            ; +0x10, 0x863778\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x86377c\nMOV             X20, X0                                                ; +0x18, 0x863780\nFSUB            S0, S2, S0                                             ; +0x1c, 0x863784\nSTR             X25, [SP,#0xA0+var_60]                                 ; +0x20, 0x863788\nLDR             S8, =0x3C8EFA35                                        ; +0x24, 0x86378c\nSTR             X2, [X29,#0xA0+var_38]                                 ; +0x28, 0x863790\nLDR             X4, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0x863794\nMOV             W25, W3                                                ; +0x30, 0x863798\nSTP             X23, X24, [SP,#0xA0+var_70]                            ; +0x34, 0x86379c\nFMOV            S9, S1                                                 ; +0x38, 0x8637a0\nMOV             X23, X1                                                ; +0x3c, 0x8637a4\nFMUL            S8, S0, S8                                             ; +0x40, 0x8637a8\nADRP            X1, #qword_1242DA0@PAGE                                ; +0x44, 0x8637ac\nSTP             X21, X22, [SP,#0xA0+var_80]                            ; +0x48, 0x8637b0\nLDR             X4, [X4]                                               ; +0x4c, 0x8637b4\nADD             X22, X29, #0xA0+var_28                                 ; +0x50, 0x8637b8\nADD             X1, X1, #qword_1242DA0@PAGEOFF                         ; +0x54, 0x8637bc\nMOV             X0, X22; this                                          ; +0x58, 0x8637c0\nADD             X1, X1, #8; cocos2d::CCPoint *                         ; +0x5c, 0x8637c4\nMOV             X21, X8                                                ; +0x60, 0x8637c8\nSTR             X4, [X29,#0xA0+var_8]                                  ; +0x64, 0x8637cc\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x68, 0x8637d0\nLDR             X2, [X29,#0xA0+var_38]                                 ; +0x6c, 0x8637d4\nCMP             W2, WZR                                                ; +0x70, 0x8637d8\nB.LE            loc_8638BC                                             ; +0x74, 0x8637dc\nMOV             X0, X20; this                                          ; +0x78, 0x8637e0\nMOV             W1, W2; int                                            ; +0x7c, 0x8637e4\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x80, 0x8637e8\nMOV             X24, X0                                                ; +0x84, 0x8637ec\nCBZ             X0, loc_8638BC                                         ; +0x88, 0x8637f0\nBL              _ZN10GameObject15getLastPositionEv; GameObject::getLastPosition(void) ; +0x8c, 0x8637f4\nMOV             X23, X0                                                ; +0x90, 0x8637f8\nLDR             X2, [X24]                                              ; +0x94, 0x8637fc\nADD             X1, X29, #0xA0+var_18                                  ; +0x98, 0x863800\nMOV             X8, X1                                                 ; +0x9c, 0x863804\nMOV             X0, X24                                                ; +0xa0, 0x863808\nSTR             X1, [X29,#0xA0+var_38]                                 ; +0xa4, 0x86380c\nADD             X20, X29, #0xA0+var_10                                 ; +0xa8, 0x863810\nLDR             X2, [X2,#0x540]                                        ; +0xac, 0x863814\nBLR             X2                                                     ; +0xb0, 0x863818\nMOV             X8, X20                                                ; +0xb4, 0x86381c\nMOV             X0, X23                                                ; +0xb8, 0x863820\nLDR             X1, [X29,#0xA0+var_38]                                 ; +0xbc, 0x863824\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xc0, 0x863828\nMOV             X0, X22                                                ; +0xc4, 0x86382c\nMOV             X1, X20                                                ; +0xc8, 0x863830\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xcc, 0x863834\nLDR             S1, [X29,#0xA0+var_28]                                 ; +0xd0, 0x863838\nLDR             S0, [X29,#0xA0+var_24]                                 ; +0xd4, 0x86383c\nFCMP            S1, #0.0                                               ; +0xd8, 0x863840\nB.NE            loc_863850                                             ; +0xdc, 0x863844\nFCMP            S0, #0.0                                               ; +0xe0, 0x863848\nB.EQ            loc_86386C                                             ; +0xe4, 0x86384c\nFCVT            D1, S1; x                                              ; +0xe8, 0x863850\nFCVT            D0, S0; y                                              ; +0xec, 0x863854\nBL              .atan2                                                 ; +0xf0, 0x863858\nLDR             D1, =0x3FF921FB54442D18                                ; +0xf4, 0x86385c\nFADD            D0, D0, D1                                             ; +0xf8, 0x863860\nFCVT            S1, D0                                                 ; +0xfc, 0x863864\nFADD            S8, S8, S1                                             ; +0x100, 0x863868\nFMOV            S0, S8; float                                          ; +0x104, 0x86386c\nMOV             X8, X20                                                ; +0x108, 0x863870\nBL              _ZN7cocos2d11ccpForAngleEf; cocos2d::ccpForAngle(float) ; +0x10c, 0x863874\nFMOV            S0, S9                                                 ; +0x110, 0x863878\nMOV             X0, X20                                                ; +0x114, 0x86387c\nMOV             X8, X21                                                ; +0x118, 0x863880\nBL              _ZNK7cocos2d7CCPointmlEf; cocos2d::CCPoint::operator*(float) ; +0x11c, 0x863884\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x120, 0x863888\nMOV             X0, X21                                                ; +0x124, 0x86388c\nLDR             X2, [X29,#0xA0+var_8]                                  ; +0x128, 0x863890\nLDR             X1, [X1]                                               ; +0x12c, 0x863894\nCMP             X2, X1                                                 ; +0x130, 0x863898\nB.NE            loc_863924                                             ; +0x134, 0x86389c\nLDP             X19, X20, [SP,#0xA0+var_90]                            ; +0x138, 0x8638a0\nLDP             D8, D9, [SP,#0xA0+var_58]                              ; +0x13c, 0x8638a4\nLDP             X21, X22, [SP,#0xA0+var_80]                            ; +0x140, 0x8638a8\nLDP             X23, X24, [SP,#0xA0+var_70]                            ; +0x144, 0x8638ac\nLDR             X25, [SP,#0xA0+var_60]                                 ; +0x148, 0x8638b0\nLDP             X29, X30, [SP+0xA0+var_A0],#0xA0                       ; +0x14c, 0x8638b4\nRET                                                                    ; +0x150, 0x8638b8\nCMP             W25, WZR                                               ; +0x154, 0x8638bc\nB.LE            loc_86391C                                             ; +0x158, 0x8638c0\nMOV             X0, X20; this                                          ; +0x15c, 0x8638c4\nMOV             W1, W25; int                                           ; +0x160, 0x8638c8\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x164, 0x8638cc\nMOV             X24, X0                                                ; +0x168, 0x8638d0\nCBZ             X0, loc_86391C                                         ; +0x16c, 0x8638d4\nLDR             X1, [X23]                                              ; +0x170, 0x8638d8\nADD             X25, X29, #0xA0+var_20                                 ; +0x174, 0x8638dc\nMOV             X0, X23                                                ; +0x178, 0x8638e0\nMOV             X8, X25                                                ; +0x17c, 0x8638e4\nADD             X23, X29, #0xA0+var_18                                 ; +0x180, 0x8638e8\nADD             X20, X29, #0xA0+var_10                                 ; +0x184, 0x8638ec\nLDR             X1, [X1,#0x540]                                        ; +0x188, 0x8638f0\nBLR             X1                                                     ; +0x18c, 0x8638f4\nSTR             X23, [X29,#0xA0+var_38]                                ; +0x190, 0x8638f8\nLDR             X2, [X24]                                              ; +0x194, 0x8638fc\nMOV             X8, X23                                                ; +0x198, 0x863900\nMOV             X0, X24                                                ; +0x19c, 0x863904\nLDR             X2, [X2,#0x540]                                        ; +0x1a0, 0x863908\nBLR             X2                                                     ; +0x1a4, 0x86390c\nMOV             X8, X20                                                ; +0x1a8, 0x863910\nMOV             X0, X25                                                ; +0x1ac, 0x863914\nB               loc_863824                                             ; +0x1b0, 0x863918\nADD             X20, X29, #0xA0+var_10                                 ; +0x1b4, 0x86391c\nB               loc_863838                                             ; +0x1b8, 0x863920\nBL              .__stack_chk_fail                                      ; +0x1bc, 0x863924", "xrefs": ["GJBaseGameLayer::modifyObjectPhysics @ 0x863a1c", "GJBaseGameLayer::processAdvancedFollowAction @ 0x8841d0", "<???> @ 0x705f0"], "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"}