{"type": "func", "start": 5689808, "end": 5690052, "name": "BoomScrollLayer::ccTouchBegan", "pseudocode": "// \n// BoomScrollLayer::ccTouchBegan from 0x56d1d0 to 0x56d2c4 (244 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'BoomScrollLayer::ccTouchBegan @ 0x56d2d4\n// > <???> @ 0x80ad8\n// > <???> @ 0x1135760\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 BoomScrollLayer::ccTouchBegan(BoomScrollLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  char v4; // w20\n  cocos2d::CCDirector *v7; // x0\n  char v8; // w0\n  __int64 v9; // x0\n  double v10; // d1\n  cocos2d::CCPoint v11; // [xsp+40h] [xbp+40h] BYREF\n  _QWORD v12[2]; // [xsp+48h] [xbp+48h] BYREF\n  cocos2d::CCPoint v13; // 0:kr08_8.8\n\n  v4 = *((_BYTE *)&a1->m_clippingRect + 16);\n  if ( v4 )\n    return 0;\n  cocos2d::CCTouch::getLocationInView(a2);\n  v7 = cocos2d::CCDirector::sharedDirector();\n  v13 = cocos2d::CCDirector::convertToGL(v7, &v11);\n  cocos2d::CCPoint::operator=(&v11, v12, v13.x, v13.y);\n  v8 = cocos2d::CCRect::containsPoint(&a1->m_rect, &v11);\n  if ( v8 && !a1->m_touch )\n  {\n    a1->m_touch = a2;\n    v4 = v8;\n    clock_gettime(0, (struct timespec *)v12);\n    a1->m_touchType = 0;\n    v9 = v12[1];\n    v10 = (double)v12[0];\n    a1->m_touchX = v11.x;\n    a1->m_touchTime = v10 + (double)v9 / 1000000000.0;\n  }\n  return v4;\n}", "assembly": "; \n; BoomScrollLayer::ccTouchBegan from 0x56d1d0 to 0x56d2c4 (244 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'BoomScrollLayer::ccTouchBegan @ 0x56d2d4\n; > <???> @ 0x80ad8\n; > <???> @ 0x1135760\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x56d1d0\nMOV             X29, SP                                                ; +0x4, 0x56d1d4\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x56d1d8\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x56d1dc\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x10, 0x56d1e0\nMOV             X21, X0                                                ; +0x14, 0x56d1e4\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x56d1e8\nSTP             X23, X24, [SP,#0x60+var_30]                            ; +0x1c, 0x56d1ec\nLDRB            W20, [X21,#0x26C]                                      ; +0x20, 0x56d1f0\nMOV             X23, X1                                                ; +0x24, 0x56d1f4\nLDR             X0, [X0]                                               ; +0x28, 0x56d1f8\nSTR             X0, [X29,#0x60+var_8]                                  ; +0x2c, 0x56d1fc\nCBZ             W20, loc_56D234                                        ; +0x30, 0x56d200\nMOV             W20, #0                                                ; +0x34, 0x56d204\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x38, 0x56d208\nMOV             W0, W20                                                ; +0x3c, 0x56d20c\nLDR             X2, [X29,#0x60+var_8]                                  ; +0x40, 0x56d210\nLDR             X1, [X19]                                              ; +0x44, 0x56d214\nCMP             X2, X1                                                 ; +0x48, 0x56d218\nB.NE            loc_56D2C0                                             ; +0x4c, 0x56d21c\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0x50, 0x56d220\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0x54, 0x56d224\nLDP             X23, X24, [SP,#0x60+var_30]                            ; +0x58, 0x56d228\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0x5c, 0x56d22c\nRET                                                                    ; +0x60, 0x56d230\nADD             X22, X29, #0x60+var_20                                 ; +0x64, 0x56d234\nMOV             X0, X1; this                                           ; +0x68, 0x56d238\nMOV             X8, X22                                                ; +0x6c, 0x56d23c\nADD             X24, X29, #0x60+var_18                                 ; +0x70, 0x56d240\nBL              _ZNK7cocos2d7CCTouch17getLocationInViewEv; cocos2d::CCTouch::getLocationInView(void) ; +0x74, 0x56d244\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x78, 0x56d248\nMOV             X8, X24                                                ; +0x7c, 0x56d24c\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0x80, 0x56d250\nBL              _ZN7cocos2d10CCDirector11convertToGLERKNS_7CCPointE; cocos2d::CCDirector::convertToGL(cocos2d::CCPoint const&) ; +0x84, 0x56d254\nMOV             X1, X24                                                ; +0x88, 0x56d258\nMOV             X0, X22                                                ; +0x8c, 0x56d25c\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x90, 0x56d260\nADD             X0, X21, #0x1F8; this                                  ; +0x94, 0x56d264\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0x98, 0x56d268\nBL              _ZNK7cocos2d6CCRect13containsPointERKNS_7CCPointE; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const&) ; +0x9c, 0x56d26c\nUXTB            W2, W0                                                 ; +0xa0, 0x56d270\nCBZ             W2, loc_56D208                                         ; +0xa4, 0x56d274\nLDR             X0, [X21,#0x1D0]; clock_id                             ; +0xa8, 0x56d278\nCBNZ            X0, loc_56D208                                         ; +0xac, 0x56d27c\nMOV             X1, X24; tp                                            ; +0xb0, 0x56d280\nSTR             X23, [X21,#0x1D0]                                      ; +0xb4, 0x56d284\nMOV             W20, W2                                                ; +0xb8, 0x56d288\nBL              .clock_gettime                                         ; +0xbc, 0x56d28c\nSTR             WZR, [X21,#0x1C4]                                      ; +0xc0, 0x56d290\nLDR             X0, [X24,#8]                                           ; +0xc4, 0x56d294\nLDR             D2, =0x41CDCD6500000000                                ; +0xc8, 0x56d298\nLDR             X24, [X24]                                             ; +0xcc, 0x56d29c\nLDR             W1, [X22]                                              ; +0xd0, 0x56d2a0\nSCVTF           D0, X0                                                 ; +0xd4, 0x56d2a4\nSCVTF           D1, X24                                                ; +0xd8, 0x56d2a8\nSTR             W1, [X21,#0x1A4]                                       ; +0xdc, 0x56d2ac\nFDIV            D0, D0, D2                                             ; +0xe0, 0x56d2b0\nFADD            D0, D1, D0                                             ; +0xe4, 0x56d2b4\nSTR             D0, [X21,#0x1E0]                                       ; +0xe8, 0x56d2b8\nB               loc_56D208                                             ; +0xec, 0x56d2bc\nBL              .__stack_chk_fail                                      ; +0xf0, 0x56d2c0", "xrefs": ["`non-virtual thunk to'BoomScrollLayer::ccTouchBegan @ 0x56d2d4", "<???> @ 0x80ad8", "<???> @ 0x1135760"], "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"}