{"type": "func", "start": 5369939168, "end": 5369939621, "name": "GJTransformControl::ccTouchBegan", "pseudocode": "// \n// GJTransformControl::ccTouchBegan from 0x14012c4e0 to 0x14012c6a5 (453 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x140552c60\n// > <???> @ 0x140670b6c\n// > <???> @ 0x140670b7c\n// > <???> @ 0x1406c9c00\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 GJTransformControl::ccTouchBegan(GJTransformControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  int v5; // ebx\n  cocos2d::CCNode *v6; // rax\n  cocos2d::CCRect *v7; // rax\n  unsigned int v8; // edx\n  cocos2d::CCArray *v9; // rcx\n  struct cocos2d::CCObject *v10; // rax\n  __int64 v11; // rax\n  struct cocos2d::CCObject *v12; // rax\n  __int64 v13; // rax\n  struct cocos2d::CCObject *v14; // rax\n  __int64 v15; // rax\n  __int64 v16; // rcx\n  cocos2d::CCPoint v18; // [rsp+20h] [rbp-38h] BYREF\n  struct cocos2d::CCPoint v19; // [rsp+28h] [rbp-30h] BYREF\n  struct cocos2d::CCPoint v20; // [rsp+30h] [rbp-28h] BYREF\n  struct cocos2d::CCRect v21; // [rsp+38h] [rbp-20h] BYREF\n  cocos2d::CCPoint v22; // [rsp+78h] [rbp+20h] BYREF\n\n  if ( LODWORD(a1->m_obContentSize.height) != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2);\n  cocos2d::CCNode::convertToNodeSpace(*(cocos2d::CCNode **)&a1->m_fSkewY, &v19);\n  cocos2d::CCNode::convertToNodeSpace((GJTransformControl *)((char *)a1 - 320), &v20);\n  cocos2d::CCPoint::CCPoint(&v18);\n  v5 = 1;\n  while ( 1 )\n  {\n    cocos2d::CCPoint::CCPoint(&v22);\n    v6 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)&a1->m_sInverse.ty, v5 - 1);\n    v7 = cocos2d::CCNode::boundingBox(v6, &v21);\n    if ( cocos2d::CCRect::containsPoint(v7, &v22) )\n      break;\n    if ( ++v5 >= 13 )\n      goto LABEL_7;\n  }\n  LOWORD(a1->m_sAdditionalTransform.a) = v5;\n  cocos2d::CCPoint::operator=(&v18, &v22);\nLABEL_7:\n  if ( !LOWORD(a1->m_sAdditionalTransform.a) )\n    return 0;\n  v8 = SLOWORD(a1->m_sAdditionalTransform.a) - 1;\n  v9 = *(cocos2d::CCArray **)&a1->m_sInverse.ty;\n  LODWORD(a1->m_obContentSize.height) = a2->m_nId;\n  v10 = cocos2d::CCArray::objectAtIndex(v9, v8);\n  v11 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v10->__vftable[2].getTag)(v10);\n  cocos2d::CCPoint::operator-(v11, &v22, &v18);\n  cocos2d::CCPoint::operator=(&a1->m_sAdditionalTransform.d, &v22);\n  v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)&a1->m_sInverse.ty, 6u);\n  v13 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v12->__vftable[2].getTag)(v12);\n  cocos2d::CCPoint::operator=(&a1->m_sTransform.d, v13);\n  v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)&a1->m_sInverse.ty, 7u);\n  v15 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v14->__vftable[2].getTag)(v14);\n  cocos2d::CCPoint::operator=(&a1->m_sTransform.ty, v15);\n  v16 = *(_QWORD *)&a1->m_sAdditionalTransform.b;\n  if ( v16 )\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 80LL))(v16);\n  if ( LOWORD(a1->m_sAdditionalTransform.a) == 12 )\n    HIDWORD(a1->m_pParent) = a1->m_pUserData;\n  return 1;\n}", "assembly": "; \n; GJTransformControl::ccTouchBegan from 0x14012c4e0 to 0x14012c6a5 (453 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x140552c60\n; > <???> @ 0x140670b6c\n; > <???> @ 0x140670b7c\n; > <???> @ 0x1406c9c00\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_10], rsi                                              ; +0x0, 0x14012c4e0\npush    rdi                                                            ; +0x5, 0x14012c4e5\nsub     rsp, 50h                                                       ; +0x6, 0x14012c4e6\ncmp     dword ptr [rcx+70h], 0FFFFFFFFh                                ; +0xa, 0x14012c4ea\nmov     rsi, rdx                                                       ; +0xe, 0x14012c4ee\nmov     rdi, rcx                                                       ; +0x11, 0x14012c4f1\njnz     loc_14012C698                                                  ; +0x14, 0x14012c4f4\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x1a, 0x14012c4fa\nmov     [rsp+58h+arg_8], rbx                                           ; +0x1f, 0x14012c4ff\nmov     rcx, rsi                                                       ; +0x24, 0x14012c504\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x27, 0x14012c507\nmov     rcx, [rdi+58h]                                                 ; +0x2d, 0x14012c50d\nlea     r8, [rsp+58h+arg_0]                                            ; +0x31, 0x14012c511\nlea     rdx, [rsp+58h+var_30]                                          ; +0x36, 0x14012c516\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x3b, 0x14012c51b\nlea     rcx, [rdi-140h]                                                ; +0x41, 0x14012c521\nlea     r8, [rsp+58h+arg_0]                                            ; +0x48, 0x14012c528\nlea     rdx, [rsp+58h+var_28]                                          ; +0x4d, 0x14012c52d\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x52, 0x14012c532\nlea     rcx, [rsp+58h+var_38]                                          ; +0x58, 0x14012c538\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x5d, 0x14012c53d\nmov     ebx, 1                                                         ; +0x63, 0x14012c543\ncmp     ebx, 0Ch                                                       ; +0x68, 0x14012c548\njz      short loc_14012C557                                            ; +0x6b, 0x14012c54b\nlea     rdx, [rsp+58h+var_30]                                          ; +0x6d, 0x14012c54d\ncmp     ebx, 1                                                         ; +0x72, 0x14012c552\njnz     short loc_14012C55C                                            ; +0x75, 0x14012c555\nlea     rdx, [rsp+58h+var_28]                                          ; +0x77, 0x14012c557\nlea     rcx, [rsp+58h+arg_18]                                          ; +0x7c, 0x14012c55c\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x81, 0x14012c561\nmov     rcx, [rdi+0B8h]                                                ; +0x87, 0x14012c567\nlea     edx, [rbx-1]                                                   ; +0x8e, 0x14012c56e\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x91, 0x14012c571\nmov     rcx, rax                                                       ; +0x97, 0x14012c577\nlea     rdx, [rsp+58h+var_20]                                          ; +0x9a, 0x14012c57a\ncall    cs:?boundingBox@CCNode@cocos2d@@QEAA?AVCCRect@2@XZ; cocos2d::CCNode::boundingBox(void) ; +0x9f, 0x14012c57f\nmov     rcx, rax                                                       ; +0xa5, 0x14012c585\nlea     rdx, [rsp+58h+arg_18]                                          ; +0xa8, 0x14012c588\ncall    cs:?containsPoint@CCRect@cocos2d@@QEBA_NAEBVCCPoint@2@@Z; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const &) ; +0xad, 0x14012c58d\ntest    al, al                                                         ; +0xb3, 0x14012c593\njnz     short loc_14012C5A0                                            ; +0xb5, 0x14012c595\ninc     ebx                                                            ; +0xb7, 0x14012c597\ncmp     ebx, 0Dh                                                       ; +0xb9, 0x14012c599\njl      short loc_14012C548                                            ; +0xbc, 0x14012c59c\njmp     short loc_14012C5B4                                            ; +0xbe, 0x14012c59e\nlea     rdx, [rsp+58h+arg_18]                                          ; +0xc0, 0x14012c5a0\nmov     [rdi+74h], bx                                                  ; +0xc5, 0x14012c5a5\nlea     rcx, [rsp+58h+var_38]                                          ; +0xc9, 0x14012c5a9\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xce, 0x14012c5ae\nmovsx   ecx, word ptr [rdi+74h]                                        ; +0xd4, 0x14012c5b4\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xd8, 0x14012c5b8\ntest    cx, cx                                                         ; +0xdd, 0x14012c5bd\njz      loc_14012C698                                                  ; +0xe0, 0x14012c5c0\nmov     eax, [rsi+38h]                                                 ; +0xe6, 0x14012c5c6\nlea     edx, [rcx-1]                                                   ; +0xe9, 0x14012c5c9\nmov     rcx, [rdi+0B8h]                                                ; +0xec, 0x14012c5cc\nmov     [rdi+70h], eax                                                 ; +0xf3, 0x14012c5d3\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xf6, 0x14012c5d6\nmov     rcx, rax                                                       ; +0xfc, 0x14012c5dc\nmov     rdx, [rax]                                                     ; +0xff, 0x14012c5df\ncall    qword ptr [rdx+0C8h]                                           ; +0x102, 0x14012c5e2\nmov     rcx, rax                                                       ; +0x108, 0x14012c5e8\nlea     r8, [rsp+58h+var_38]                                           ; +0x10b, 0x14012c5eb\nlea     rdx, [rsp+58h+arg_18]                                          ; +0x110, 0x14012c5f0\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x115, 0x14012c5f5\nlea     rcx, [rdi+80h]                                                 ; +0x11b, 0x14012c5fb\nlea     rdx, [rsp+58h+arg_18]                                          ; +0x122, 0x14012c602\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x127, 0x14012c607\nmov     rcx, [rdi+0B8h]                                                ; +0x12d, 0x14012c60d\nmov     edx, 6                                                         ; +0x134, 0x14012c614\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x139, 0x14012c619\nmov     rcx, rax                                                       ; +0x13f, 0x14012c61f\nmov     rdx, [rax]                                                     ; +0x142, 0x14012c622\ncall    qword ptr [rdx+0C8h]                                           ; +0x145, 0x14012c625\nmov     rdx, rax                                                       ; +0x14b, 0x14012c62b\nlea     rcx, [rdi+98h]                                                 ; +0x14e, 0x14012c62e\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x155, 0x14012c635\nmov     rcx, [rdi+0B8h]                                                ; +0x15b, 0x14012c63b\nmov     edx, 7                                                         ; +0x162, 0x14012c642\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x167, 0x14012c647\nmov     rcx, rax                                                       ; +0x16d, 0x14012c64d\nmov     rdx, [rax]                                                     ; +0x170, 0x14012c650\ncall    qword ptr [rdx+0C8h]                                           ; +0x173, 0x14012c653\nmov     rdx, rax                                                       ; +0x179, 0x14012c659\nlea     rcx, [rdi+0A0h]                                                ; +0x17c, 0x14012c65c\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x183, 0x14012c663\nmov     rcx, [rdi+78h]                                                 ; +0x189, 0x14012c669\ntest    rcx, rcx                                                       ; +0x18d, 0x14012c66d\njz      short loc_14012C678                                            ; +0x190, 0x14012c670\nmov     rax, [rcx]                                                     ; +0x192, 0x14012c672\ncall    qword ptr [rax+50h]                                            ; +0x195, 0x14012c675\ncmp     word ptr [rdi+74h], 0Ch                                        ; +0x198, 0x14012c678\njnz     short loc_14012C68B                                            ; +0x19d, 0x14012c67d\nmov     eax, [rdi+0E0h]                                                ; +0x19f, 0x14012c67f\nmov     [rdi+0DCh], eax                                                ; +0x1a5, 0x14012c685\nmov     al, 1                                                          ; +0x1ab, 0x14012c68b\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x1ad, 0x14012c68d\nadd     rsp, 50h                                                       ; +0x1b2, 0x14012c692\npop     rdi                                                            ; +0x1b6, 0x14012c696\nretn                                                                   ; +0x1b7, 0x14012c697\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x1b8, 0x14012c698\nxor     al, al                                                         ; +0x1bd, 0x14012c69d\nadd     rsp, 50h                                                       ; +0x1bf, 0x14012c69f\npop     rdi                                                            ; +0x1c3, 0x14012c6a3\nretn                                                                   ; +0x1c4, 0x14012c6a4", "xrefs": ["<???> @ 0x140552c60", "<???> @ 0x140670b6c", "<???> @ 0x140670b7c", "<???> @ 0x1406c9c00"], "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"}