{"type": "func", "start": 3966156, "end": 3966430, "name": "CCScrollLayerExt::ccTouchBegan", "pseudocode": "// \n// CCScrollLayerExt::ccTouchBegan from 0x3c84cc to 0x3c85de (274 bytes)\n// \n// 2 xrefs:\n// > `non-virtual thunk to'CCScrollLayerExt::ccTouchBegan @ 0x3c85f4\n// > TableView::ccTouchBegan @ 0x3ca94e\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:35 +0000\n// \n\nint __fastcall CCScrollLayerExt::ccTouchBegan(int a1, int a2)\n{\n  int v2; // r8\n  const void *i; // r0\n  const void *v6; // r9\n  void *v7; // r0\n  cocos2d::CCDirector *LocationInView; // r0\n  const cocos2d::CCPoint *v9; // r0\n  int v10; // r0\n  int v11; // r0\n  int v12; // r8\n  _BYTE v14[8]; // [sp+4h] [bp-1Ch] BYREF\n  _BYTE v15[8]; // [sp+Ch] [bp-14h] BYREF\n  _BYTE v16[8]; // [sp+14h] [bp-Ch] BYREF\n\n  v2 = *(unsigned __int8 *)(a1 + 373);\n  if ( *(_BYTE *)(a1 + 373) )\n    return 0;\n  cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v15);\n  for ( i = (const void *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 256))(a1);\n        ;\n        i = (const void *)(*(int (__fastcall **)(const void *))(*(_DWORD *)v6 + 256))(v6) )\n  {\n    v6 = i;\n    if ( !i )\n      break;\n    v7 = _dynamic_cast(\n           i,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,\n           -2);\n    if ( v7 && !(*(int (__fastcall **)(void *, _BYTE *))(*(_DWORD *)v7 + 8))(v7, v15) )\n      return v2;\n  }\n  *(_DWORD *)(a1 + 320) = a2;\n  LocationInView = (cocos2d::CCDirector *)cocos2d::CCTouch::getLocationInView((cocos2d::CCTouch *)v14);\n  v9 = (const cocos2d::CCPoint *)cocos2d::CCDirector::sharedDirector(LocationInView);\n  cocos2d::CCDirector::convertToGL((cocos2d::CCDirector *)v15, v9);\n  v10 = cocos2d::CCPoint::operator=(a1 + 324, v15);\n  cocos2d::CCPoint::operator=(a1 + 332, v10);\n  cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v15, (const cocos2d::CCPoint *)a1);\n  cocos2d::CCPoint::operator=(v14, v15);\n  cocos2d::CCRect::CCRect((cocos2d::CCRect *)v15);\n  cocos2d::CCPoint::operator=(v15, &unk_D2A5A4);\n  v11 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 164))(a1);\n  cocos2d::CCSize::operator=(v16, v11);\n  if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v15, (const cocos2d::CCPoint *)v14) )\n  {\n    cocos2d::CCNode::stopAllActions(*(cocos2d::CCNode **)(a1 + 364));\n    cocos2d::CCTime::gettimeofdayCocos2d(a1 + 340, 0);\n    v12 = *(unsigned __int8 *)(a1 + 373);\n    *(_BYTE *)(a1 + 348) = 1;\n    return v12 ^ 1;\n  }\n  return v2;\n}", "assembly": "; \n; CCScrollLayerExt::ccTouchBegan from 0x3c84cc to 0x3c85de (274 bytes)\n; \n; 2 xrefs:\n; > `non-virtual thunk to'CCScrollLayerExt::ccTouchBegan @ 0x3c85f4\n; > TableView::ccTouchBegan @ 0x3ca94e\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:35 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x3C84D6)                ; +0x0, 0x3c84cc\nPUSH.W          {R4-R10,LR}                                            ; +0x2, 0x3c84ce\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x3c84d2\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x3c84d4\nSUB             SP, SP, #0x20                                          ; +0xa, 0x3c84d6\nLDRB.W          R8, [R0,#0x175]                                        ; +0xc, 0x3c84d8\nLDR             R2, [R3]                                               ; +0x10, 0x3c84dc\nMOV             R4, R0                                                 ; +0x12, 0x3c84de\nMOV             R6, R1                                                 ; +0x14, 0x3c84e0\nMOV             R7, R3                                                 ; +0x16, 0x3c84e2\nSTR             R2, [SP,#0x20+var_4]                                   ; +0x18, 0x3c84e4\nCMP.W           R8, #0                                                 ; +0x1a, 0x3c84e6\nBNE             loc_3C85C6                                             ; +0x1e, 0x3c84ea\nADD             R5, SP, #0x20+var_14                                   ; +0x20, 0x3c84ec\nMOV             R0, R5; this                                           ; +0x22, 0x3c84ee\nBL              _ZNK7cocos2d7CCTouch11getLocationEv; cocos2d::CCTouch::getLocation(void) ; +0x24, 0x3c84f0\nLDR             R3, [R4]                                               ; +0x28, 0x3c84f4\nMOV             R0, R4                                                 ; +0x2a, 0x3c84f6\nLDR.W           R3, [R3,#0x100]                                        ; +0x2c, 0x3c84f8\nBLX             R3                                                     ; +0x30, 0x3c84fc\nMOV             R9, R0                                                 ; +0x32, 0x3c84fe\nCBZ             R0, loc_3C8532                                         ; +0x34, 0x3c8500\nLDR             R1, =(_ZTIN7cocos2d6CCNodeE_ptr - 0x3C8510)            ; +0x36, 0x3c8502\nMOV             R0, R9; lpsrc                                          ; +0x38, 0x3c8504\nLDR             R2, =(_ZTIN7cocos2d14CCTouchClipperE_ptr - 0x3C8514)   ; +0x3a, 0x3c8506\nMOV             R3, #0xFFFFFFFE; s2d                                   ; +0x3c, 0x3c8508\nADD             R1, PC; _ZTIN7cocos2d6CCNodeE_ptr                      ; +0x40, 0x3c850c\nLDR             R1, [R1]; lpstype                                      ; +0x42, 0x3c850e\nADD             R2, PC; _ZTIN7cocos2d14CCTouchClipperE_ptr             ; +0x44, 0x3c8510\nLDR             R2, [R2]; lpdtype                                      ; +0x46, 0x3c8512\nBL              __dynamic_cast                                         ; +0x48, 0x3c8514\nCBZ             R0, loc_3C8526                                         ; +0x4c, 0x3c8518\nLDR             R3, [R0]                                               ; +0x4e, 0x3c851a\nMOV             R1, R5                                                 ; +0x50, 0x3c851c\nLDR             R3, [R3,#8]                                            ; +0x52, 0x3c851e\nBLX             R3                                                     ; +0x54, 0x3c8520\nCMP             R0, #0                                                 ; +0x56, 0x3c8522\nBEQ             loc_3C85CA                                             ; +0x58, 0x3c8524\nLDR.W           R3, [R9]                                               ; +0x5a, 0x3c8526\nMOV             R0, R9                                                 ; +0x5e, 0x3c852a\nLDR.W           R3, [R3,#0x100]                                        ; +0x60, 0x3c852c\nB               loc_3C84FC                                             ; +0x64, 0x3c8530\nADD.W           R10, SP, #0x20+var_1C                                  ; +0x66, 0x3c8532\nMOV             R1, R6                                                 ; +0x6a, 0x3c8536\nSTR.W           R6, [R4,#0x140]                                        ; +0x6c, 0x3c8538\nADD.W           R6, R4, #0x144                                         ; +0x70, 0x3c853c\nMOV             R0, R10; this                                          ; +0x74, 0x3c8540\nBL              _ZNK7cocos2d7CCTouch17getLocationInViewEv; cocos2d::CCTouch::getLocationInView(void) ; +0x76, 0x3c8542\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x7a, 0x3c8546\nMOV             R2, R10                                                ; +0x7e, 0x3c854a\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x80, 0x3c854c\nMOV             R0, R5; this                                           ; +0x82, 0x3c854e\nBL              _ZN7cocos2d10CCDirector11convertToGLERKNS_7CCPointE; cocos2d::CCDirector::convertToGL(cocos2d::CCPoint const&) ; +0x84, 0x3c8550\nMOV             R1, R5                                                 ; +0x88, 0x3c8554\nMOV             R0, R6                                                 ; +0x8a, 0x3c8556\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x8c, 0x3c8558\nMOV             R1, R0                                                 ; +0x90, 0x3c855c\nADD.W           R0, R4, #0x14C                                         ; +0x92, 0x3c855e\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x96, 0x3c8562\nMOV             R2, R6                                                 ; +0x9a, 0x3c8566\nMOV             R0, R5; this                                           ; +0x9c, 0x3c8568\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x9e, 0x3c856a\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0xa0, 0x3c856c\nMOV             R1, R5                                                 ; +0xa4, 0x3c8570\nMOV             R0, R10                                                ; +0xa6, 0x3c8572\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xa8, 0x3c8574\nMOV             R0, R5; this                                           ; +0xac, 0x3c8578\nBL              _ZN7cocos2d6CCRectC1Ev; cocos2d::CCRect::CCRect(void)  ; +0xae, 0x3c857a\nLDR             R1, =(unk_D2A5A4 - 0x3C8586)                           ; +0xb2, 0x3c857e\nMOV             R0, R5                                                 ; +0xb4, 0x3c8580\nADD             R1, PC; unk_D2A5A4                                     ; +0xb6, 0x3c8582\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xb8, 0x3c8584\nLDR             R3, [R4]                                               ; +0xbc, 0x3c8588\nMOV             R0, R4                                                 ; +0xbe, 0x3c858a\nLDR.W           R3, [R3,#0xA4]                                         ; +0xc0, 0x3c858c\nBLX             R3                                                     ; +0xc4, 0x3c8590\nMOV             R1, R0                                                 ; +0xc6, 0x3c8592\nADD             R0, SP, #0x20+var_C                                    ; +0xc8, 0x3c8594\nBL              _ZN7cocos2d6CCSizeaSERKS0_; cocos2d::CCSize::operator=(cocos2d::CCSize const&) ; +0xca, 0x3c8596\nMOV             R0, R5; this                                           ; +0xce, 0x3c859a\nMOV             R1, R10; cocos2d::CCPoint *                            ; +0xd0, 0x3c859c\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0xd2, 0x3c859e\nCBZ             R0, loc_3C85CA                                         ; +0xd6, 0x3c85a2\nLDR.W           R0, [R4,#0x16C]; this                                  ; +0xd8, 0x3c85a4\nBL              _ZN7cocos2d6CCNode14stopAllActionsEv; cocos2d::CCNode::stopAllActions(void) ; +0xdc, 0x3c85a8\nADD.W           R0, R4, #0x154                                         ; +0xe0, 0x3c85ac\nMOV             R1, R9                                                 ; +0xe4, 0x3c85b0\nBL              _ZN7cocos2d6CCTime19gettimeofdayCocos2dEPNS_10cc_timevalEPv; cocos2d::CCTime::gettimeofdayCocos2d(cocos2d::cc_timeval *,void *) ; +0xe6, 0x3c85b2\nLDRB.W          R8, [R4,#0x175]                                        ; +0xea, 0x3c85b6\nMOVS            R3, #1                                                 ; +0xee, 0x3c85ba\nSTRB.W          R3, [R4,#0x15C]                                        ; +0xf0, 0x3c85bc\nEOR.W           R8, R8, R3                                             ; +0xf4, 0x3c85c0\nB               loc_3C85CA                                             ; +0xf8, 0x3c85c4\nMOV.W           R8, #0                                                 ; +0xfa, 0x3c85c6\nLDR             R2, [SP,#0x20+var_4]                                   ; +0xfe, 0x3c85ca\nMOV             R0, R8                                                 ; +0x100, 0x3c85cc\nLDR             R3, [R7]                                               ; +0x102, 0x3c85ce\nCMP             R2, R3                                                 ; +0x104, 0x3c85d0\nBEQ             loc_3C85D8                                             ; +0x106, 0x3c85d2\nBLX             __stack_chk_fail                                       ; +0x108, 0x3c85d4\nADD             SP, SP, #0x20 ; ' '                                    ; +0x10c, 0x3c85d8\nPOP.W           {R4-R10,PC}                                            ; +0x10e, 0x3c85da", "xrefs": ["`non-virtual thunk to'CCScrollLayerExt::ccTouchBegan @ 0x3c85f4", "TableView::ccTouchBegan @ 0x3ca94e"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}