{"type": "func", "start": 7915092, "end": 7915356, "name": "EditorWindowPopup::ccTouchEnded", "pseudocode": "// \n// EditorWindowPopup::ccTouchEnded from 0x78c654 to 0x78c75c (264 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'EditorWindowPopup::ccTouchEnded @ 0x78c764\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:59:37 +0000\n// \n\nclock_t __fastcall EditorWindowPopup::ccTouchEnded(int a1, cocos2d::CCTouch *a2)\n{\n  clock_t result; // r0\n  int v4; // r0\n  int v5; // r0\n  int v6; // r8\n  int v7; // r3\n  int (*v8)(void); // r3\n  _BYTE v9[8]; // [sp+4h] [bp-14h] BYREF\n  float v10[2]; // [sp+Ch] [bp-Ch] BYREF\n\n  result = *(_DWORD *)(a1 + 752);\n  if ( *((_DWORD *)a2 + 13) == result )\n  {\n    *(_DWORD *)(a1 + 752) = -1;\n    if ( *(_BYTE *)(a1 + 769) )\n    {\n      v4 = *(_DWORD *)(a1 + 444);\n      *(_BYTE *)(a1 + 769) = 0;\n      return (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 456))(v4);\n    }\n    else if ( *(_BYTE *)(a1 + 770) )\n    {\n      v5 = *(_DWORD *)(a1 + 720);\n      *(_BYTE *)(a1 + 770) = 0;\n      if ( v5 )\n        (*(void (__fastcall **)(int, int))(*(_DWORD *)v5 + 456))(v5, 255);\n      cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v10);\n      result = EditorWindowPopup::isInCloseButton(a1, (const cocos2d::CCPoint *)v10);\n      if ( result )\n        return (*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)a1 + 684))(a1, 0);\n    }\n    else if ( *(_DWORD *)(a1 + 772) )\n    {\n      *(_DWORD *)(a1 + 772) = *(unsigned __int8 *)(a1 + 770);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, (const cocos2d::CCPoint *)(a1 + 744));\n      EditorWindowPopup::clampWindowCenter((cocos2d::CCDirector *)v9, a1, v10);\n      return EditorWindowPopup::moveWindowTo((EditorWindowPopup *)a1, (int)v9);\n    }\n    else if ( *(_BYTE *)(a1 + 756) )\n    {\n      *(_BYTE *)(a1 + 756) = 0;\n    }\n    else\n    {\n      result = *(_DWORD *)(a1 + 724);\n      if ( result )\n      {\n        v6 = *(unsigned __int8 *)(result + 376);\n        result = ScrollableContentLayer::handleTouchEnded(result, a2);\n      }\n      else\n      {\n        v6 = 0;\n      }\n      if ( *(_BYTE *)(a1 + 768) )\n      {\n        result = *(_DWORD *)(a1 + 728);\n        if ( result )\n        {\n          v7 = *(_DWORD *)result;\n          if ( v6 )\n            v8 = *(int (**)(void))(v7 + 460);\n          else\n            v8 = *(int (**)(void))(v7 + 456);\n          result = v8();\n          *(_BYTE *)(a1 + 768) = 0;\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorWindowPopup::ccTouchEnded from 0x78c654 to 0x78c75c (264 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'EditorWindowPopup::ccTouchEnded @ 0x78c764\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:59:37 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x78C65E)                ; +0x0, 0x78c654\nPUSH.W          {R4-R8,LR}                                             ; +0x2, 0x78c656\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x78c65a\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x78c65c\nMOV             R4, R0                                                 ; +0xa, 0x78c65e\nSUB             SP, SP, #0x18                                          ; +0xc, 0x78c660\nLDR             R0, [R3]                                               ; +0xe, 0x78c662\nMOV             R5, R1                                                 ; +0x10, 0x78c664\nLDR             R6, [R1,#0x34]                                         ; +0x12, 0x78c666\nMOV             R7, R2                                                 ; +0x14, 0x78c668\nSTR             R0, [SP,#0x18+var_4]                                   ; +0x16, 0x78c66a\nLDR.W           R0, [R4,#0x2F0]                                        ; +0x18, 0x78c66c\nCMP             R6, R0                                                 ; +0x1c, 0x78c670\nMOV             R6, R3                                                 ; +0x1e, 0x78c672\nBNE             loc_78C74A                                             ; +0x20, 0x78c674\nMOV.W           R3, #0xFFFFFFFF                                        ; +0x22, 0x78c676\nSTR.W           R3, [R4,#0x2F0]                                        ; +0x26, 0x78c67a\nLDRB.W          R3, [R4,#0x301]                                        ; +0x2a, 0x78c67e\nCBZ             R3, loc_78C698                                         ; +0x2e, 0x78c682\nLDR.W           R0, [R4,#0x1BC]                                        ; +0x30, 0x78c684\nMOVS            R3, #0                                                 ; +0x34, 0x78c688\nSTRB.W          R3, [R4,#0x301]                                        ; +0x36, 0x78c68a\nLDR             R3, [R0]                                               ; +0x3a, 0x78c68e\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x3c, 0x78c690\nBLX             R3                                                     ; +0x40, 0x78c694\nB               loc_78C74A                                             ; +0x42, 0x78c696\nLDRB.W          R2, [R4,#0x302]                                        ; +0x44, 0x78c698\nCBZ             R2, loc_78C6D6                                         ; +0x48, 0x78c69c\nLDR.W           R0, [R4,#0x2D0]                                        ; +0x4a, 0x78c69e\nSTRB.W          R3, [R4,#0x302]                                        ; +0x4e, 0x78c6a2\nCBZ             R0, loc_78C6B2                                         ; +0x52, 0x78c6a6\nLDR             R3, [R0]                                               ; +0x54, 0x78c6a8\nMOVS            R1, #0xFF                                              ; +0x56, 0x78c6aa\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x58, 0x78c6ac\nBLX             R3                                                     ; +0x5c, 0x78c6b0\nADD             R7, SP, #0x18+var_C                                    ; +0x5e, 0x78c6b2\nMOV             R1, R5                                                 ; +0x60, 0x78c6b4\nMOV             R0, R7; this                                           ; +0x62, 0x78c6b6\nBL              _ZNK7cocos2d7CCTouch11getLocationEv; cocos2d::CCTouch::getLocation(void) ; +0x64, 0x78c6b8\nMOV             R0, R4                                                 ; +0x68, 0x78c6bc\nMOV             R1, R7                                                 ; +0x6a, 0x78c6be\nBL              _ZNK17EditorWindowPopup15isInCloseButtonEN7cocos2d7CCPointE; EditorWindowPopup::isInCloseButton(cocos2d::CCPoint) ; +0x6c, 0x78c6c0\nCMP             R0, #0                                                 ; +0x70, 0x78c6c4\nBEQ             loc_78C74A                                             ; +0x72, 0x78c6c6\nLDR             R3, [R4]                                               ; +0x74, 0x78c6c8\nMOV             R0, R4                                                 ; +0x76, 0x78c6ca\nMOVS            R1, #0                                                 ; +0x78, 0x78c6cc\nLDR.W           R3, [R3,#0x2AC]                                        ; +0x7a, 0x78c6ce\nBLX             R3                                                     ; +0x7e, 0x78c6d2\nB               loc_78C74A                                             ; +0x80, 0x78c6d4\nLDR.W           R3, [R4,#0x304]                                        ; +0x82, 0x78c6d6\nCBZ             R3, loc_78C702                                         ; +0x86, 0x78c6da\nADD             R7, SP, #0x18+var_C                                    ; +0x88, 0x78c6dc\nADD             R5, SP, #0x18+var_14                                   ; +0x8a, 0x78c6de\nSTR.W           R2, [R4,#0x304]                                        ; +0x8c, 0x78c6e0\nADD.W           R1, R4, #0x2E8; cocos2d::CCPoint *                     ; +0x90, 0x78c6e4\nMOV             R0, R7; this                                           ; +0x94, 0x78c6e8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x96, 0x78c6ea\nMOV             R0, R5                                                 ; +0x9a, 0x78c6ee\nMOV             R1, R4                                                 ; +0x9c, 0x78c6f0\nMOV             R2, R7                                                 ; +0x9e, 0x78c6f2\nBL              _ZNK17EditorWindowPopup17clampWindowCenterEN7cocos2d7CCPointE; EditorWindowPopup::clampWindowCenter(cocos2d::CCPoint) ; +0xa0, 0x78c6f4\nMOV             R0, R4                                                 ; +0xa4, 0x78c6f8\nMOV             R1, R5                                                 ; +0xa6, 0x78c6fa\nBL              _ZN17EditorWindowPopup12moveWindowToEN7cocos2d7CCPointE; EditorWindowPopup::moveWindowTo(cocos2d::CCPoint) ; +0xa8, 0x78c6fc\nB               loc_78C74A                                             ; +0xac, 0x78c700\nLDRB.W          R2, [R4,#0x2F4]                                        ; +0xae, 0x78c702\nCBZ             R2, loc_78C70E                                         ; +0xb2, 0x78c706\nSTRB.W          R3, [R4,#0x2F4]                                        ; +0xb4, 0x78c708\nB               loc_78C74A                                             ; +0xb8, 0x78c70c\nLDR.W           R0, [R4,#0x2D4]; this                                  ; +0xba, 0x78c70e\nCBZ             R0, loc_78C71E                                         ; +0xbe, 0x78c712\nLDRB.W          R8, [R0,#0x178]                                        ; +0xc0, 0x78c714\nBL              _ZN22ScrollableContentLayer16handleTouchEndedEPN7cocos2d7CCTouchE; ScrollableContentLayer::handleTouchEnded(cocos2d::CCTouch *) ; +0xc4, 0x78c718\nB               loc_78C720                                             ; +0xc8, 0x78c71c\nMOV             R8, R0                                                 ; +0xca, 0x78c71e\nLDRB.W          R3, [R4,#0x300]                                        ; +0xcc, 0x78c720\nCBZ             R3, loc_78C74A                                         ; +0xd0, 0x78c724\nLDR.W           R0, [R4,#0x2D8]                                        ; +0xd2, 0x78c726\nCBZ             R0, loc_78C74A                                         ; +0xd6, 0x78c72a\nLDR             R3, [R0]                                               ; +0xd8, 0x78c72c\nCMP.W           R8, #0                                                 ; +0xda, 0x78c72e\nBEQ             loc_78C73A                                             ; +0xde, 0x78c732\nLDR.W           R3, [R3,#0x1CC]                                        ; +0xe0, 0x78c734\nB               loc_78C73E                                             ; +0xe4, 0x78c738\nLDR.W           R3, [R3,#0x1C8]                                        ; +0xe6, 0x78c73a\nMOV             R1, R5                                                 ; +0xea, 0x78c73e\nMOV             R2, R7                                                 ; +0xec, 0x78c740\nBLX             R3                                                     ; +0xee, 0x78c742\nMOVS            R3, #0                                                 ; +0xf0, 0x78c744\nSTRB.W          R3, [R4,#0x300]                                        ; +0xf2, 0x78c746\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xf6, 0x78c74a\nLDR             R3, [R6]                                               ; +0xf8, 0x78c74c\nCMP             R2, R3                                                 ; +0xfa, 0x78c74e\nBEQ             loc_78C756                                             ; +0xfc, 0x78c750\nBLX             __stack_chk_fail                                       ; +0xfe, 0x78c752\nADD             SP, SP, #0x18                                          ; +0x102, 0x78c756\nPOP.W           {R4-R8,PC}                                             ; +0x104, 0x78c758", "xrefs": ["`non-virtual thunk to'EditorWindowPopup::ccTouchEnded @ 0x78c764"], "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"}