{"type": "func", "start": 5369927472, "end": 5369927725, "name": "GJRotationControl::ccTouchBegan", "pseudocode": "// \n// GJRotationControl::ccTouchBegan from 0x140129730 to 0x14012982d (253 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140553e40\n// > <???> @ 0x1406c9a5c\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\nbool GJRotationControl::ccTouchBegan(GJRotationControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  struct cocos2d::CCPoint v5; // rax\n  const struct cocos2d::CCPoint *v6; // r8\n  __int64 v7; // rcx\n  __int64 v8; // rbx\n  cocos2d::CCSpriteFrameCache *v9; // rax\n  struct cocos2d::CCSpriteFrame *v10; // rax\n  char v12; // [rsp+30h] [rbp+8h] BYREF\n  struct cocos2d::CCPoint v13; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( LODWORD(a1->m_sAdditionalTransform.b) != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2);\n  v5 = cocos2d::CCNode::convertToNodeSpace((GJRotationControl *)((char *)a1 - 320), &v13);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v12, v5);\n  if ( cocos2d::ccpDistance((cocos2d *)&v12, (const struct cocos2d::CCPoint *)&a1->m_obAnchorPointInPoints.y, v6) >= 24.0 )\n    return 0;\n  a1->m_obContentSize.height = a1->m_sAdditionalTransform.a;\n  cocos2d::CCPoint::operator-(&v12, &v13, &a1->m_obAnchorPointInPoints.y);\n  cocos2d::CCPoint::operator=(&a1->m_fSkewY, &v13);\n  v7 = *(_QWORD *)&a1->m_sAdditionalTransform.d;\n  LODWORD(a1->m_sAdditionalTransform.b) = a2->m_nId;\n  if ( v7 )\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 8LL))(v7);\n  v8 = **(_QWORD **)&a1->m_obAnchorPoint.y;\n  v9 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7);\n  v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, \"GJ_rotationControlBtn02_001.png\");\n  (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSpriteFrame *))(v8 + 992))(*(_QWORD *)&a1->m_obAnchorPoint.y, v10);\n  return 1;\n}", "assembly": "; \n; GJRotationControl::ccTouchBegan from 0x140129730 to 0x14012982d (253 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140553e40\n; > <???> @ 0x1406c9a5c\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_8], rbx                                               ; +0x0, 0x140129730\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140129735\npush    rdi                                                            ; +0xa, 0x14012973a\nsub     rsp, 20h                                                       ; +0xb, 0x14012973b\ncmp     dword ptr [rcx+78h], 0FFFFFFFFh                                ; +0xf, 0x14012973f\nmov     rbx, rdx                                                       ; +0x13, 0x140129743\nmov     rdi, rcx                                                       ; +0x16, 0x140129746\njnz     loc_14012981B                                                  ; +0x19, 0x140129749\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x1f, 0x14012974f\nmov     rcx, rbx                                                       ; +0x24, 0x140129754\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x27, 0x140129757\nlea     rcx, [rdi-140h]                                                ; +0x2d, 0x14012975d\nlea     r8, [rsp+28h+arg_0]                                            ; +0x34, 0x140129764\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x39, 0x140129769\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x3e, 0x14012976e\nmov     rdx, rax                                                       ; +0x44, 0x140129774\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x47, 0x140129777\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x4c, 0x14012977c\nlea     rdx, [rdi+60h]                                                 ; +0x52, 0x140129782\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x56, 0x140129786\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x5b, 0x14012978b\nmovss   xmm1, cs:dword_140623140                                       ; +0x61, 0x140129791\ncomiss  xmm1, xmm0                                                     ; +0x69, 0x140129799\njbe     short loc_14012981B                                            ; +0x6c, 0x14012979c\nmov     eax, [rdi+74h]                                                 ; +0x6e, 0x14012979e\nlea     r8, [rdi+60h]                                                  ; +0x71, 0x1401297a1\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x75, 0x1401297a5\nmov     [rdi+70h], eax                                                 ; +0x7a, 0x1401297aa\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x7d, 0x1401297ad\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x82, 0x1401297b2\nlea     rcx, [rdi+58h]                                                 ; +0x88, 0x1401297b8\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x8c, 0x1401297bc\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x91, 0x1401297c1\nmov     rcx, [rdi+80h]                                                 ; +0x97, 0x1401297c7\nmov     eax, [rbx+38h]                                                 ; +0x9e, 0x1401297ce\nmov     [rdi+78h], eax                                                 ; +0xa1, 0x1401297d1\ntest    rcx, rcx                                                       ; +0xa4, 0x1401297d4\njz      short loc_1401297DF                                            ; +0xa7, 0x1401297d7\nmov     rax, [rcx]                                                     ; +0xa9, 0x1401297d9\ncall    qword ptr [rax+8]                                              ; +0xac, 0x1401297dc\nmov     rax, [rdi+68h]                                                 ; +0xaf, 0x1401297df\nmov     rbx, [rax]                                                     ; +0xb3, 0x1401297e3\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0xb6, 0x1401297e6\nmov     rcx, rax                                                       ; +0xbc, 0x1401297ec\nlea     rdx, aGjRotationcont_0; \"GJ_rotationControlBtn02_001.png\"      ; +0xbf, 0x1401297ef\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0xc6, 0x1401297f6\nmov     rcx, [rdi+68h]                                                 ; +0xcc, 0x1401297fc\nmov     rdx, rax                                                       ; +0xd0, 0x140129800\ncall    qword ptr [rbx+3E0h]                                           ; +0xd3, 0x140129803\nmov     al, 1                                                          ; +0xd9, 0x140129809\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xdb, 0x14012980b\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xe0, 0x140129810\nadd     rsp, 20h                                                       ; +0xe5, 0x140129815\npop     rdi                                                            ; +0xe9, 0x140129819\nretn                                                                   ; +0xea, 0x14012981a\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xeb, 0x14012981b\nxor     al, al                                                         ; +0xf0, 0x140129820\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xf2, 0x140129822\nadd     rsp, 20h                                                       ; +0xf7, 0x140129827\npop     rdi                                                            ; +0xfb, 0x14012982b\nretn                                                                   ; +0xfc, 0x14012982c", "xrefs": ["<???> @ 0x140553e40", "<???> @ 0x1406c9a5c"], "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"}