{"type": "func", "start": 3126504, "end": 3126790, "name": "CCTextInputNode::ccTouchBegan", "pseudocode": "// \n// CCTextInputNode::ccTouchBegan from 0x2fb4e8 to 0x2fb606 (286 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'CCTextInputNode::ccTouchBegan @ 0x2fb610\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 CCTextInputNode::ccTouchBegan(CCTextInputNode *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  cocos2d::CCDirector *v4; // r0\n  const cocos2d::CCPoint *v5; // r0\n  cocos2d::CCNode *v6; // r0\n  const cocos2d::CCPoint *v7; // r0\n  int v8; // r9\n  TextInputDelegate *m_delegate; // r0\n  cocos2d::CCPoint v10; // r1\n  cocos2d::CCPoint v12; // [sp+Ch] [bp-34h] BYREF\n  cocos2d::CCPoint v13; // [sp+14h] [bp-2Ch] BYREF\n  cocos2d::CCRect v14; // [sp+1Ch] [bp-24h] BYREF\n  cocos2d::CCRect v15; // [sp+2Ch] [bp-14h] BYREF\n  cocos2d::CCRect v16; // 0:r3.4,4:^0.12 BYREF\n\n  cocos2d::CCTouch::getLocationInView((cocos2d::CCPoint *)&v16.size, a2);\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::convertToGL(&v15.origin, v4, (const cocos2d::CCPoint *)&v16.size);\n  cocos2d::CCPoint::operator=(&v16.size, &v15);\n  cocos2d::CCNode::convertToWorldSpace(&v15.origin, a1, (const cocos2d::CCPoint *)&v16.size);\n  cocos2d::CCPoint::operator=(&v16.size, &v15);\n  cocos2d::CCNode::convertToNodeSpace(&v15.origin, a1, (const cocos2d::CCPoint *)&v16.size);\n  cocos2d::CCPoint::operator=(&v16.size, &v15);\n  v5 = a1->m_textField->getAnchorPoint(a1->m_textField);\n  cocos2d::CCPoint::CCPoint(&v15.origin, v5);\n  sub_2F62CC(&v14, (int)a1, &v15.origin.x);\n  if ( a1->getParent(a1) )\n  {\n    v6 = a1->getParent(a1);\n    v7 = v6->getPosition(v6);\n    cocos2d::CCPoint::CCPoint(&v12, v7);\n  }\n  else\n  {\n    cocos2d::CCPoint::CCPoint(&v12, 0.0, 0.0);\n  }\n  cocos2d::CCPoint::operator+(&v15, &v14, &v12);\n  cocos2d::CCPoint::operator=(&v14, &v15);\n  v8 = cocos2d::CCRect::containsPoint(&v14, (const cocos2d::CCPoint *)&v16.size);\n  if ( v8\n    && ((m_delegate = a1->m_delegate) == nullptr\n     || ((int (__fastcall *)(TextInputDelegate *, CCTextInputNode *))m_delegate->allowTextInput)(m_delegate, a1)) )\n  {\n    a1->onClickTrackNode(a1, 1);\n    cocos2d::CCPoint::CCPoint(&v13, (const cocos2d::CCPoint *)&v16.size);\n    cocos2d::CCRect::CCRect(&v15, &v14);\n    LODWORD(v10.x) = &v13;\n    LODWORD(v10.y) = &v15;\n    CCTextInputNode::updateCursorPosition(a1, v10, v16);\n  }\n  else\n  {\n    LOBYTE(v8) = 0;\n  }\n  return v8;\n}", "assembly": "; \n; CCTextInputNode::ccTouchBegan from 0x2fb4e8 to 0x2fb606 (286 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'CCTextInputNode::ccTouchBegan @ 0x2fb610\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\nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x2fb4e8\nSUB             SP, SP, #0x40                                          ; +0x4, 0x2fb4ec\nLDR             R7, =(__stack_chk_guard_ptr - 0x2FB4FA)                ; +0x6, 0x2fb4ee\nADD             R6, SP, #0x40+var_3C                                   ; +0x8, 0x2fb4f0\nMOV             R4, R0                                                 ; +0xa, 0x2fb4f2\nADD             R5, SP, #0x40+var_14                                   ; +0xc, 0x2fb4f4\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x2fb4f6\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x2fb4f8\nMOV             R0, R6; this                                           ; +0x12, 0x2fb4fa\nADD.W           R8, SP, #0x40+var_24                                   ; +0x14, 0x2fb4fc\nADD.W           R9, SP, #0x40+var_34                                   ; +0x18, 0x2fb500\nLDR             R3, [R7]                                               ; +0x1c, 0x2fb504\nSTR             R3, [SP,#0x40+var_4]                                   ; +0x1e, 0x2fb506\nBL              _ZNK7cocos2d7CCTouch17getLocationInViewEv; cocos2d::CCTouch::getLocationInView(void) ; +0x20, 0x2fb508\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x24, 0x2fb50c\nMOV             R2, R6                                                 ; +0x28, 0x2fb510\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x2a, 0x2fb512\nMOV             R0, R5; this                                           ; +0x2c, 0x2fb514\nBL              _ZN7cocos2d10CCDirector11convertToGLERKNS_7CCPointE; cocos2d::CCDirector::convertToGL(cocos2d::CCPoint const&) ; +0x2e, 0x2fb516\nMOV             R1, R5                                                 ; +0x32, 0x2fb51a\nMOV             R0, R6                                                 ; +0x34, 0x2fb51c\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x36, 0x2fb51e\nMOV             R2, R6                                                 ; +0x3a, 0x2fb522\nMOV             R0, R5; this                                           ; +0x3c, 0x2fb524\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x3e, 0x2fb526\nBL              _ZN7cocos2d6CCNode19convertToWorldSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToWorldSpace(cocos2d::CCPoint const&) ; +0x40, 0x2fb528\nMOV             R1, R5                                                 ; +0x44, 0x2fb52c\nMOV             R0, R6                                                 ; +0x46, 0x2fb52e\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x48, 0x2fb530\nMOV             R2, R6                                                 ; +0x4c, 0x2fb534\nMOV             R0, R5; this                                           ; +0x4e, 0x2fb536\nMOV             R1, R4; cocos2d::CCPoint *                             ; +0x50, 0x2fb538\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x52, 0x2fb53a\nMOV             R1, R5                                                 ; +0x56, 0x2fb53e\nMOV             R0, R6                                                 ; +0x58, 0x2fb540\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x5a, 0x2fb542\nLDR.W           R0, [R4,#0x17C]                                        ; +0x5e, 0x2fb546\nLDR             R3, [R0]                                               ; +0x62, 0x2fb54a\nLDR.W           R3, [R3,#0x90]                                         ; +0x64, 0x2fb54c\nBLX             R3                                                     ; +0x68, 0x2fb550\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x6a, 0x2fb552\nMOV             R0, R5; this                                           ; +0x6c, 0x2fb554\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x6e, 0x2fb556\nMOV             R0, R8                                                 ; +0x72, 0x2fb55a\nMOV             R1, R4                                                 ; +0x74, 0x2fb55c\nMOV             R2, R5                                                 ; +0x76, 0x2fb55e\nBL              sub_2F62CC                                             ; +0x78, 0x2fb560\nLDR             R3, [R4]                                               ; +0x7c, 0x2fb564\nMOV             R0, R4                                                 ; +0x7e, 0x2fb566\nLDR.W           R3, [R3,#0xF8]                                         ; +0x80, 0x2fb568\nBLX             R3                                                     ; +0x84, 0x2fb56c\nCBZ             R0, loc_2FB58A                                         ; +0x86, 0x2fb56e\nLDR             R3, [R4]                                               ; +0x88, 0x2fb570\nMOV             R0, R4                                                 ; +0x8a, 0x2fb572\nLDR.W           R3, [R3,#0xF8]                                         ; +0x8c, 0x2fb574\nBLX             R3                                                     ; +0x90, 0x2fb578\nLDR             R3, [R0]                                               ; +0x92, 0x2fb57a\nLDR             R3, [R3,#0x60]                                         ; +0x94, 0x2fb57c\nBLX             R3                                                     ; +0x96, 0x2fb57e\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x98, 0x2fb580\nMOV             R0, R9; this                                           ; +0x9a, 0x2fb582\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x9c, 0x2fb584\nB               loc_2FB594                                             ; +0xa0, 0x2fb588\nMOVS            R1, #0; float                                          ; +0xa2, 0x2fb58a\nMOV             R0, R9; this                                           ; +0xa4, 0x2fb58c\nMOV             R2, R1; float                                          ; +0xa6, 0x2fb58e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xa8, 0x2fb590\nMOV             R2, R9                                                 ; +0xac, 0x2fb594\nMOV             R0, R5                                                 ; +0xae, 0x2fb596\nMOV             R1, R8                                                 ; +0xb0, 0x2fb598\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xb2, 0x2fb59a\nMOV             R1, R5                                                 ; +0xb6, 0x2fb59e\nMOV             R0, R8                                                 ; +0xb8, 0x2fb5a0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xba, 0x2fb5a2\nMOV             R0, R8; this                                           ; +0xbe, 0x2fb5a6\nMOV             R1, R6; cocos2d::CCPoint *                             ; +0xc0, 0x2fb5a8\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0xc2, 0x2fb5aa\nMOV             R9, R0                                                 ; +0xc6, 0x2fb5ae\nCBZ             R0, loc_2FB5FA                                         ; +0xc8, 0x2fb5b0\nLDR.W           R0, [R4,#0x180]                                        ; +0xca, 0x2fb5b2\nCBZ             R0, loc_2FB5C2                                         ; +0xce, 0x2fb5b6\nLDR             R3, [R0]                                               ; +0xd0, 0x2fb5b8\nMOV             R1, R4                                                 ; +0xd2, 0x2fb5ba\nLDR             R3, [R3,#0x14]                                         ; +0xd4, 0x2fb5bc\nBLX             R3                                                     ; +0xd6, 0x2fb5be\nCBZ             R0, loc_2FB5FA                                         ; +0xd8, 0x2fb5c0\nLDR             R3, [R4]                                               ; +0xda, 0x2fb5c2\nADD.W           R10, SP, #0x40+var_2C                                  ; +0xdc, 0x2fb5c4\nMOV             R0, R4                                                 ; +0xe0, 0x2fb5c8\nMOVS            R1, #1                                                 ; +0xe2, 0x2fb5ca\nLDR.W           R3, [R3,#0x23C]                                        ; +0xe4, 0x2fb5cc\nBLX             R3                                                     ; +0xe8, 0x2fb5d0\nMOV             R1, R6; cocos2d::CCPoint *                             ; +0xea, 0x2fb5d2\nMOV             R0, R10; this                                          ; +0xec, 0x2fb5d4\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xee, 0x2fb5d6\nMOV             R1, R8; cocos2d::CCRect *                              ; +0xf2, 0x2fb5da\nMOV             R0, R5; this                                           ; +0xf4, 0x2fb5dc\nBL              _ZN7cocos2d6CCRectC1ERKS0_; cocos2d::CCRect::CCRect(cocos2d::CCRect const&) ; +0xf6, 0x2fb5de\nMOV             R0, R4                                                 ; +0xfa, 0x2fb5e2\nMOV             R1, R10                                                ; +0xfc, 0x2fb5e4\nMOV             R2, R5                                                 ; +0xfe, 0x2fb5e6\nBL              _ZN15CCTextInputNode20updateCursorPositionEN7cocos2d7CCPointENS0_6CCRectE; CCTextInputNode::updateCursorPosition(cocos2d::CCPoint,cocos2d::CCRect) ; +0x100, 0x2fb5e8\nLDR             R2, [SP,#0x40+var_4]                                   ; +0x104, 0x2fb5ec\nMOV             R0, R9                                                 ; +0x106, 0x2fb5ee\nLDR             R3, [R7]                                               ; +0x108, 0x2fb5f0\nCMP             R2, R3                                                 ; +0x10a, 0x2fb5f2\nBEQ             loc_2FB600                                             ; +0x10c, 0x2fb5f4\nBLX             __stack_chk_fail                                       ; +0x10e, 0x2fb5f6\nMOV.W           R9, #0                                                 ; +0x112, 0x2fb5fa\nB               loc_2FB5EC                                             ; +0x116, 0x2fb5fe\nADD             SP, SP, #0x40 ; '@'                                    ; +0x118, 0x2fb600\nPOP.W           {R4-R10,PC}                                            ; +0x11a, 0x2fb602", "xrefs": ["`non-virtual thunk to'CCTextInputNode::ccTouchBegan @ 0x2fb610"], "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"}