{"type": "func", "start": 5370997072, "end": 5370997426, "name": "GJBaseGameLayer::getFollowSpeedVal", "pseudocode": "// \n// GJBaseGameLayer::getFollowSpeedVal from 0x14022e950 to 0x14022eab2 (354 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::modifyGroupPhysics @ 0x14022f060\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x14022f87f\n// > <???> @ 0x1406cdd88\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\n// local variable allocation has failed, the output may be wrong!\ncocos2d::CCPoint GJBaseGameLayer::getFollowSpeedVal(\n        GJBaseGameLayer *a1,\n        GameObject *a2,\n        int a3,\n        int a4,\n        float a5,\n        float a6)\n{\n  __int64 v9; // r14\n  float v10; // xmm6_4\n  GameObject *Object; // rax\n  GameObject *v12; // rbx\n  __int64 v13; // r8\n  __int64 p_m_lastPosition; // rcx\n  GameObject *v15; // rax\n  __int64 v16; // rbx\n  struct cocos2d::CCPoint v17; // rax\n  _BYTE v19[8]; // [rsp+20h] [rbp-38h] BYREF\n  _BYTE v20[8]; // [rsp+28h] [rbp-30h] BYREF\n  _BYTE v21[16]; // [rsp+30h] [rbp-28h] BYREF\n  cocos2d::CCPoint X; // [rsp+68h] [rbp+10h] BYREF\n\n  v9 = *(_QWORD *)&a3;\n  v10 = (float)(90.0 - a6) * 0.017453292;\n  cocos2d::CCPoint::CCPoint(&X);\n  if ( a4 > 0 )\n  {\n    Object = GJBaseGameLayer::tryGetObject(a1, a4);\n    v12 = Object;\n    if ( Object )\n    {\n      v13 = ((__int64 (__fastcall *)(GameObject *, _BYTE *))Object->getRealPosition)(Object, v20);\n      p_m_lastPosition = (__int64)&v12->m_lastPosition;\nLABEL_7:\n      cocos2d::CCPoint::operator-(p_m_lastPosition, v19, v13);\n      cocos2d::CCPoint::operator=(&X, v19);\n      goto LABEL_8;\n    }\n  }\n  if ( SLODWORD(a5) > 0 )\n  {\n    v15 = GJBaseGameLayer::tryGetObject(a1, SLODWORD(a5));\n    if ( v15 )\n    {\n      v16 = ((__int64 (__fastcall *)(GameObject *, _BYTE *))v15->getRealPosition)(v15, v20);\n      p_m_lastPosition = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 1192LL))(v9, v21);\n      v13 = v16;\n      goto LABEL_7;\n    }\n  }\nLABEL_8:\n  if ( X.x != 0.0 || X.y != 0.0 )\n    v10 = v10 + (float)(atan2f(X.y, X.x) + 1.570796326794897);\n  v17 = cocos2d::ccpForAngle((cocos2d *)v21, v10);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator*)(v17, a2);\n  return (cocos2d::CCPoint)a2;\n}", "assembly": "; \n; GJBaseGameLayer::getFollowSpeedVal from 0x14022e950 to 0x14022eab2 (354 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::modifyGroupPhysics @ 0x14022f060\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x14022f87f\n; > <???> @ 0x1406cdd88\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14022e950\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x14022e955\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x14022e95a\npush    r14                                                            ; +0xf, 0x14022e95f\nsub     rsp, 50h                                                       ; +0x11, 0x14022e961\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0x15, 0x14022e965\nmov     rsi, rdx                                                       ; +0x1a, 0x14022e96a\nmovss   xmm6, cs:dword_140623294                                       ; +0x1d, 0x14022e96d\nlea     rdx, dword_1406C1D28                                           ; +0x25, 0x14022e975\nsubss   xmm6, [rsp+58h+arg_28]                                         ; +0x2c, 0x14022e97c\nmov     rdi, rcx                                                       ; +0x35, 0x14022e985\nmov     ebx, r9d                                                       ; +0x38, 0x14022e988\nlea     rcx, [rsp+58h+X]                                               ; +0x3b, 0x14022e98b\nmov     r14, r8                                                        ; +0x40, 0x14022e990\nmulss   xmm6, cs:dword_1406229BC                                       ; +0x43, 0x14022e993\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x4b, 0x14022e99b\ntest    ebx, ebx                                                       ; +0x51, 0x14022e9a1\njle     short loc_14022E9D5                                            ; +0x53, 0x14022e9a3\nmov     edx, ebx                                                       ; +0x55, 0x14022e9a5\nmov     rcx, rdi                                                       ; +0x57, 0x14022e9a7\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x5a, 0x14022e9aa\nmov     rbx, rax                                                       ; +0x5f, 0x14022e9af\ntest    rax, rax                                                       ; +0x62, 0x14022e9b2\njz      short loc_14022E9D5                                            ; +0x65, 0x14022e9b5\nmov     r8, [rax]                                                      ; +0x67, 0x14022e9b7\nlea     rdx, [rsp+58h+var_30]                                          ; +0x6a, 0x14022e9ba\nmov     rcx, rax                                                       ; +0x6f, 0x14022e9bf\ncall    qword ptr [r8+4A8h]                                            ; +0x72, 0x14022e9c2\nmov     r8, rax                                                        ; +0x79, 0x14022e9c9\nlea     rcx, [rbx+4D0h]                                                ; +0x7c, 0x14022e9cc\njmp     short loc_14022EA1A                                            ; +0x83, 0x14022e9d3\nmov     edx, [rsp+58h+arg_20]                                          ; +0x85, 0x14022e9d5\ntest    edx, edx                                                       ; +0x8c, 0x14022e9dc\njle     short loc_14022EA35                                            ; +0x8e, 0x14022e9de\nmov     rcx, rdi                                                       ; +0x90, 0x14022e9e0\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x93, 0x14022e9e3\ntest    rax, rax                                                       ; +0x98, 0x14022e9e8\njz      short loc_14022EA35                                            ; +0x9b, 0x14022e9eb\nmov     r8, [rax]                                                      ; +0x9d, 0x14022e9ed\nlea     rdx, [rsp+58h+var_30]                                          ; +0xa0, 0x14022e9f0\nmov     rcx, rax                                                       ; +0xa5, 0x14022e9f5\ncall    qword ptr [r8+4A8h]                                            ; +0xa8, 0x14022e9f8\nmov     r8, [r14]                                                      ; +0xaf, 0x14022e9ff\nlea     rdx, [rsp+58h+var_28]                                          ; +0xb2, 0x14022ea02\nmov     rcx, r14                                                       ; +0xb7, 0x14022ea07\nmov     rbx, rax                                                       ; +0xba, 0x14022ea0a\ncall    qword ptr [r8+4A8h]                                            ; +0xbd, 0x14022ea0d\nmov     rcx, rax                                                       ; +0xc4, 0x14022ea14\nmov     r8, rbx                                                        ; +0xc7, 0x14022ea17\nlea     rdx, [rsp+58h+var_38]                                          ; +0xca, 0x14022ea1a\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0xcf, 0x14022ea1f\nlea     rdx, [rsp+58h+var_38]                                          ; +0xd5, 0x14022ea25\nlea     rcx, [rsp+58h+X]                                               ; +0xda, 0x14022ea2a\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xdf, 0x14022ea2f\nmovss   xmm2, [rsp+58h+X]                                              ; +0xe5, 0x14022ea35\nxorps   xmm1, xmm1                                                     ; +0xeb, 0x14022ea3b\nucomiss xmm2, xmm1                                                     ; +0xee, 0x14022ea3e\nmovss   xmm0, [rsp+58h+Y]; Y                                           ; +0xf1, 0x14022ea41\njp      short loc_14022EA52                                            ; +0xf7, 0x14022ea47\njnz     short loc_14022EA52                                            ; +0xf9, 0x14022ea49\nucomiss xmm0, xmm1                                                     ; +0xfb, 0x14022ea4b\njp      short loc_14022EA52                                            ; +0xfe, 0x14022ea4e\njz      short loc_14022EA71                                            ; +0x100, 0x14022ea50\nmovaps  xmm1, xmm2; X                                                  ; +0x102, 0x14022ea52\ncall    atan2f                                                         ; +0x105, 0x14022ea55\nxorps   xmm2, xmm2                                                     ; +0x10a, 0x14022ea5a\ncvtss2sd xmm2, xmm0                                                    ; +0x10d, 0x14022ea5d\naddsd   xmm2, cs:qword_140622E50                                       ; +0x111, 0x14022ea61\ncvtpd2ps xmm0, xmm2                                                    ; +0x119, 0x14022ea69\naddss   xmm6, xmm0                                                     ; +0x11d, 0x14022ea6d\nmovaps  xmm1, xmm6                                                     ; +0x121, 0x14022ea71\nlea     rcx, [rsp+58h+var_28]                                          ; +0x124, 0x14022ea74\ncall    cs:?ccpForAngle@cocos2d@@YA?AVCCPoint@1@M@Z; cocos2d::ccpForAngle(float) ; +0x129, 0x14022ea79\nmovss   xmm2, [rsp+58h+arg_30]                                         ; +0x12f, 0x14022ea7f\nmov     rdx, rsi                                                       ; +0x138, 0x14022ea88\nmov     rcx, rax                                                       ; +0x13b, 0x14022ea8b\ncall    cs:??DCCPoint@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCPoint::operator*(float) ; +0x13e, 0x14022ea8e\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x144, 0x14022ea94\nmov     rax, rsi                                                       ; +0x149, 0x14022ea99\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x14c, 0x14022ea9c\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x151, 0x14022eaa1\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x156, 0x14022eaa6\nadd     rsp, 50h                                                       ; +0x15b, 0x14022eaab\npop     r14                                                            ; +0x15f, 0x14022eaaf\nretn                                                                   ; +0x161, 0x14022eab1", "xrefs": ["GJBaseGameLayer::modifyGroupPhysics @ 0x14022f060", "GJBaseGameLayer::processAdvancedFollowAction @ 0x14022f87f", "<???> @ 0x1406cdd88"], "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"}