{"type": "func", "start": 3180460, "end": 3180570, "name": "CreateGuidelinesLayer::ccTouchBegan", "pseudocode": "// \n// CreateGuidelinesLayer::ccTouchBegan from 0x3087ac to 0x30881a (110 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'CreateGuidelinesLayer::ccTouchBegan @ 0x308828\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 CreateGuidelinesLayer::ccTouchBegan(CreateGuidelinesLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  cocos2d::CCSprite *m_circleSprite; // r0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2\n  _DWORD v7[3]; // [sp+0h] [bp-Ch] BYREF\n\n  v7[0] = a1;\n  v7[1] = a2;\n  v7[2] = a3;\n  if ( a1->m_recording && a1->m_guidelines <= 1000 )\n  {\n    a1->registerTouch(a1);\n    m_circleSprite = a1->m_circleSprite;\n    setColor = m_circleSprite->setColor;\n    LOWORD(v7[0]) = -1;\n    BYTE2(v7[0]) = 0;\n    setColor(m_circleSprite, (const cocos2d::ccColor3B *)v7);\n    ((void (__fastcall *)(cocos2d::CCSprite *, int))a1->m_circleSprite->setScale)(a1->m_circleSprite, 1063675494);\n    ++a1->m_guidelines;\n  }\n  return 1;\n}", "assembly": "; \n; CreateGuidelinesLayer::ccTouchBegan from 0x3087ac to 0x30881a (110 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'CreateGuidelinesLayer::ccTouchBegan @ 0x308828\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x3087B4)                ; +0x0, 0x3087ac\nPUSH            {R0-R2,R4,R5,LR}                                       ; +0x2, 0x3087ae\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x3087b0\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x3087b2\nMOV             R4, R0                                                 ; +0x8, 0x3087b4\nLDR             R2, [R3]                                               ; +0xa, 0x3087b6\nMOV             R5, R3                                                 ; +0xc, 0x3087b8\nSTR             R2, [SP,#0xC+var_8]                                    ; +0xe, 0x3087ba\nLDRB.W          R2, [R0,#0x210]                                        ; +0x10, 0x3087bc\nCBZ             R2, loc_308808                                         ; +0x14, 0x3087c0\nLDR.W           R3, [R0,#0x214]                                        ; +0x16, 0x3087c2\nCMP.W           R3, #0x3E8                                             ; +0x1a, 0x3087c6\nBGT             loc_308808                                             ; +0x1e, 0x3087ca\nLDR             R3, [R0]                                               ; +0x20, 0x3087cc\nLDR.W           R3, [R3,#0x298]                                        ; +0x22, 0x3087ce\nBLX             R3                                                     ; +0x26, 0x3087d2\nLDR.W           R0, [R4,#0x208]                                        ; +0x28, 0x3087d4\nMOV             R1, SP                                                 ; +0x2c, 0x3087d8\nLDR             R3, [R0]                                               ; +0x2e, 0x3087da\nLDR.W           R2, [R3,#0x1D8]                                        ; +0x30, 0x3087dc\nMOVS            R3, #0xFF                                              ; +0x34, 0x3087e0\nSTRB.W          R3, [SP,#0xC+var_C]                                    ; +0x36, 0x3087e2\nSTRB.W          R3, [SP,#0xC+var_B]                                    ; +0x3a, 0x3087e6\nMOVS            R3, #0                                                 ; +0x3e, 0x3087ea\nSTRB.W          R3, [SP,#0xC+var_A]                                    ; +0x40, 0x3087ec\nBLX             R2                                                     ; +0x44, 0x3087f0\nLDR.W           R0, [R4,#0x208]                                        ; +0x46, 0x3087f2\nLDR             R1, =0x3F666666                                        ; +0x4a, 0x3087f6\nLDR             R3, [R0]                                               ; +0x4c, 0x3087f8\nLDR             R3, [R3,#0x50]                                         ; +0x4e, 0x3087fa\nBLX             R3                                                     ; +0x50, 0x3087fc\nLDR.W           R3, [R4,#0x214]                                        ; +0x52, 0x3087fe\nADDS            R3, #1                                                 ; +0x56, 0x308802\nSTR.W           R3, [R4,#0x214]                                        ; +0x58, 0x308804\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x5c, 0x308808\nMOVS            R0, #1                                                 ; +0x5e, 0x30880a\nLDR             R3, [R5]                                               ; +0x60, 0x30880c\nCMP             R2, R3                                                 ; +0x62, 0x30880e\nBEQ             loc_308816                                             ; +0x64, 0x308810\nBLX             __stack_chk_fail                                       ; +0x66, 0x308812\nADD             SP, SP, #0xC                                           ; +0x6a, 0x308816\nPOP             {R4,R5,PC}                                             ; +0x6c, 0x308818", "xrefs": ["`non-virtual thunk to'CreateGuidelinesLayer::ccTouchBegan @ 0x308828"], "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"}