{"type": "func", "start": 5369927728, "end": 5369928136, "name": "GJRotationControl::ccTouchMoved", "pseudocode": "// \n// GJRotationControl::ccTouchMoved from 0x140129830 to 0x1401299c8 (408 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x140553e48\n// > <???> @ 0x14067087c\n// > <???> @ 0x140670894\n// > <???> @ 0x1406708a4\n// > <???> @ 0x1406c9a68\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\nvoid GJRotationControl::ccTouchMoved(GJRotationControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  struct cocos2d::CCPoint v4; // rax\n  float *v5; // rax\n  float v6; // xmm9_4\n  float v7; // xmm7_4\n  float v8; // xmm0_4\n  __int64 v9; // rax\n  float v10; // xmm9_4\n  float v11; // xmm0_4\n  float v12; // xmm0_4\n  float v13; // xmm0_4\n  void (__fastcall ***v14)(_QWORD); // rcx\n  char v15; // [rsp+70h] [rbp+8h] BYREF\n  cocos2d::CCPoint v16; // [rsp+78h] [rbp+10h] BYREF\n  cocos2d::CCPoint v17; // [rsp+88h] [rbp+20h] BYREF\n\n  if ( LODWORD(a1->m_sAdditionalTransform.b) == a2->m_nId )\n  {\n    cocos2d::CCTouch::getLocation(a2);\n    v4 = cocos2d::CCNode::convertToNodeSpace((GJRotationControl *)((char *)a1 - 320), &v16);\n    ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v15, v4);\n    cocos2d::CCPoint::CCPoint(&v16);\n    v6 = atan2f((float)(v5[1] - 0.0) - a1->m_obAnchorPointInPoints.x, (float)(*v5 - 0.0) - a1->m_fSkewY);\n    v7 = (float)(sinf(v6) * 60.0) + 0.0;\n    v8 = (float)(cosf(v6) * 60.0) + 0.0;\n    cocos2d::CCPoint::CCPoint(&v17, v8, v7);\n    cocos2d::CCPoint::operator=(&a1->m_obAnchorPointInPoints.y, v9);\n    (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)&a1->m_obAnchorPoint.y + 184LL))(\n      *(_QWORD *)&a1->m_obAnchorPoint.y,\n      &a1->m_obAnchorPointInPoints.y);\n    v10 = v6 * 57.29578;\n    v11 = (float)-v10 * 1000.0;\n    if ( v11 < 0.0 )\n      v12 = ceilf(v11 - 0.5);\n    else\n      v12 = floorf(0.5 - (float)(v10 * 1000.0));\n    v13 = v12 / 1000.0;\n    if ( v13 != a1->m_sAdditionalTransform.a )\n    {\n      v14 = *(void (__fastcall ****)(_QWORD))&a1->m_sAdditionalTransform.d;\n      a1->m_sAdditionalTransform.a = v13;\n      if ( v14 )\n        (**v14)(v14);\n    }\n  }\n}", "assembly": "; \n; GJRotationControl::ccTouchMoved from 0x140129830 to 0x1401299c8 (408 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x140553e48\n; > <???> @ 0x14067087c\n; > <???> @ 0x140670894\n; > <???> @ 0x1406708a4\n; > <???> @ 0x1406c9a68\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     r11, rsp                                                       ; +0x0, 0x140129830\npush    rdi                                                            ; +0x3, 0x140129833\nsub     rsp, 60h                                                       ; +0x4, 0x140129834\nmov     eax, [rdx+38h]                                                 ; +0x8, 0x140129838\nmov     r8, rdx                                                        ; +0xb, 0x14012983b\nmov     rdi, rcx                                                       ; +0xe, 0x14012983e\ncmp     [rcx+78h], eax                                                 ; +0x11, 0x140129841\njnz     loc_1401299C2                                                  ; +0x14, 0x140129844\nmov     [r11+18h], rbx                                                 ; +0x1a, 0x14012984a\nlea     rdx, [r11+8]                                                   ; +0x1e, 0x14012984e\nmovaps  [rsp+68h+var_18], xmm6                                         ; +0x22, 0x140129852\nmov     rcx, r8                                                        ; +0x27, 0x140129857\nmovaps  [rsp+68h+var_28], xmm7                                         ; +0x2a, 0x14012985a\nmovaps  xmmword ptr [r11-38h], xmm8                                    ; +0x2f, 0x14012985f\nmovaps  xmmword ptr [r11-48h], xmm9                                    ; +0x34, 0x140129864\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x39, 0x140129869\nlea     rcx, [rdi-140h]                                                ; +0x3f, 0x14012986f\nlea     r8, [rsp+68h+arg_0]                                            ; +0x46, 0x140129876\nlea     rdx, [rsp+68h+arg_8]                                           ; +0x4b, 0x14012987b\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x50, 0x140129880\nmov     rdx, rax                                                       ; +0x56, 0x140129886\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x59, 0x140129889\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x5e, 0x14012988e\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x64, 0x140129894\nlea     rcx, [rsp+68h+arg_8]                                           ; +0x69, 0x140129899\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x6e, 0x14012989e\nxorps   xmm8, xmm8                                                     ; +0x74, 0x1401298a4\nmovss   xmm0, dword ptr [rax+4]                                        ; +0x78, 0x1401298a8\nmovss   xmm1, dword ptr [rax]                                          ; +0x7d, 0x1401298ad\nsubss   xmm0, xmm8                                                     ; +0x81, 0x1401298b1\nsubss   xmm1, xmm8                                                     ; +0x86, 0x1401298b6\nsubss   xmm0, dword ptr [rdi+5Ch]; Y                                   ; +0x8b, 0x1401298bb\nsubss   xmm1, dword ptr [rdi+58h]; X                                   ; +0x90, 0x1401298c0\ncall    atan2f                                                         ; +0x95, 0x1401298c5\nmovaps  xmm9, xmm0                                                     ; +0x9a, 0x1401298ca\ncall    sinf                                                           ; +0x9e, 0x1401298ce\nmovaps  xmm7, xmm0                                                     ; +0xa3, 0x1401298d3\nmovaps  xmm0, xmm9; X                                                  ; +0xa6, 0x1401298d6\nmulss   xmm7, cs:dword_140623210                                       ; +0xaa, 0x1401298da\naddss   xmm7, xmm8                                                     ; +0xb2, 0x1401298e2\ncall    cosf                                                           ; +0xb7, 0x1401298e7\nmulss   xmm0, cs:dword_140623210                                       ; +0xbc, 0x1401298ec\nlea     rcx, [rsp+68h+arg_18]                                          ; +0xc4, 0x1401298f4\nmovaps  xmm2, xmm7                                                     ; +0xcc, 0x1401298fc\naddss   xmm0, xmm8                                                     ; +0xcf, 0x1401298ff\nmovaps  xmm1, xmm0                                                     ; +0xd4, 0x140129904\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd7, 0x140129907\nmov     rdx, rax                                                       ; +0xdd, 0x14012990d\nlea     rcx, [rdi+60h]                                                 ; +0xe0, 0x140129910\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xe4, 0x140129914\nmov     rcx, [rdi+68h]                                                 ; +0xea, 0x14012991a\nlea     rdx, [rdi+60h]                                                 ; +0xee, 0x14012991e\nmov     rax, [rcx]                                                     ; +0xf2, 0x140129922\ncall    qword ptr [rax+0B8h]                                           ; +0xf5, 0x140129925\nmulss   xmm9, cs:dword_140623200                                       ; +0xfb, 0x14012992b\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x104, 0x140129934\nmovss   xmm6, cs:dword_14062350C                                       ; +0x10c, 0x14012993c\nmovaps  xmm7, [rsp+68h+var_28]                                         ; +0x114, 0x140129944\nmovaps  xmm0, xmm9                                                     ; +0x119, 0x140129949\nxorps   xmm0, cs:xmmword_1406243F0                                     ; +0x11d, 0x14012994d\nmulss   xmm0, xmm6                                                     ; +0x124, 0x140129954\ncomiss  xmm0, xmm8                                                     ; +0x128, 0x140129958\nmovaps  xmm8, [rsp+68h+var_38]                                         ; +0x12c, 0x14012995c\njb      short loc_14012997D                                            ; +0x132, 0x140129962\nmovss   xmm0, cs:dword_140622B08                                       ; +0x134, 0x140129964\nmulss   xmm9, xmm6                                                     ; +0x13c, 0x14012996c\nsubss   xmm0, xmm9; X                                                  ; +0x141, 0x140129971\ncall    floorf                                                         ; +0x146, 0x140129976\njmp     short loc_14012998A                                            ; +0x14b, 0x14012997b\nsubss   xmm0, cs:dword_140622B08; X                                    ; +0x14d, 0x14012997d\ncall    ceilf                                                          ; +0x155, 0x140129985\nmovss   xmm1, dword ptr [rdi+74h]                                      ; +0x15a, 0x14012998a\nmovaps  xmm9, [rsp+68h+var_48]                                         ; +0x15f, 0x14012998f\ndivss   xmm0, xmm6                                                     ; +0x165, 0x140129995\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0x169, 0x140129999\nucomiss xmm0, xmm1                                                     ; +0x16e, 0x14012999e\njp      short loc_1401299A5                                            ; +0x171, 0x1401299a1\njz      short loc_1401299C2                                            ; +0x173, 0x1401299a3\nmov     rcx, [rdi+80h]                                                 ; +0x175, 0x1401299a5\nmovss   dword ptr [rdi+74h], xmm0                                      ; +0x17c, 0x1401299ac\ntest    rcx, rcx                                                       ; +0x181, 0x1401299b1\njz      short loc_1401299C2                                            ; +0x184, 0x1401299b4\nmov     rax, [rcx]                                                     ; +0x186, 0x1401299b6\nsubss   xmm0, xmm1                                                     ; +0x189, 0x1401299b9\nmovaps  xmm1, xmm0                                                     ; +0x18d, 0x1401299bd\ncall    qword ptr [rax]                                                ; +0x190, 0x1401299c0\nadd     rsp, 60h                                                       ; +0x192, 0x1401299c2\npop     rdi                                                            ; +0x196, 0x1401299c6\nretn                                                                   ; +0x197, 0x1401299c7", "xrefs": ["<???> @ 0x140553e48", "<???> @ 0x14067087c", "<???> @ 0x140670894", "<???> @ 0x1406708a4", "<???> @ 0x1406c9a68"], "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"}