{"type": "func", "start": 7296668, "end": 7296886, "name": "DpadMenu::ccTouchBegan", "pseudocode": "// \n// DpadMenu::ccTouchBegan from 0x6f569c to 0x6f5776 (218 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'DpadMenu::ccTouchBegan @ 0x6f5788\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:57:38 +0000\n// \n\nint __fastcall DpadMenu::ccTouchBegan(_DWORD *a1, cocos2d::CCTouch *a2)\n{\n  int v4; // r6\n  int i; // r5\n  const void *j; // r0\n  const void *v7; // r5\n  void *v8; // r0\n  int v9; // r0\n  _BYTE v11[8]; // [sp+4h] [bp-10h] BYREF\n\n  if ( a1[83] )\n    return 0;\n  if ( !*((_BYTE *)a1 + 238) )\n    return 0;\n  v4 = (*(int (__fastcall **)(_DWORD *))(*a1 + 632))(a1);\n  if ( !v4 )\n    return 0;\n  for ( i = a1[49]; i; i = (*(int (__fastcall **)(int))(*(_DWORD *)i + 256))(i) )\n  {\n    if ( !(*(int (__fastcall **)(int))(*(_DWORD *)i + 176))(i) )\n      return 0;\n  }\n  cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v11);\n  for ( j = (const void *)(*(int (__fastcall **)(_DWORD *))(*a1 + 256))(a1);\n        ;\n        j = (const void *)(*(int (__fastcall **)(const void *))(*(_DWORD *)v7 + 256))(v7) )\n  {\n    v7 = j;\n    if ( !j )\n      break;\n    v8 = _dynamic_cast(\n           j,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,\n           (const struct __class_type_info *)&`typeinfo for'cocos2d::CCTouchClipper,\n           -2);\n    if ( v8 && !(*(int (__fastcall **)(void *, _BYTE *))(*(_DWORD *)v8 + 8))(v8, v11) )\n    {\n      if ( v4 )\n        return 0;\n      break;\n    }\n  }\n  v9 = DpadMenu::arrowForTouch((DpadMenu *)a1, a2);\n  a1[84] = v9;\n  if ( !v9 )\n    return 0;\n  a1[83] = 1;\n  (*(void (__fastcall **)(int))(*(_DWORD *)v9 + 508))(v9);\n  CCMenuExtra::repeatSelectionChanged((CCMenuExtra *)a1);\n  return v4;\n}", "assembly": "; \n; DpadMenu::ccTouchBegan from 0x6f569c to 0x6f5776 (218 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'DpadMenu::ccTouchBegan @ 0x6f5788\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:57:38 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x6F56A6)                ; +0x0, 0x6f569c\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x6f569e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x6f56a2\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x6f56a4\nSUB             SP, SP, #0x14                                          ; +0xa, 0x6f56a6\nMOV             R4, R0                                                 ; +0xc, 0x6f56a8\nLDR             R2, [R3]                                               ; +0xe, 0x6f56aa\nMOV             R8, R1                                                 ; +0x10, 0x6f56ac\nMOV             R7, R3                                                 ; +0x12, 0x6f56ae\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x14, 0x6f56b0\nLDR.W           R2, [R0,#0x14C]                                        ; +0x16, 0x6f56b2\nCMP             R2, #0                                                 ; +0x1a, 0x6f56b6\nBNE             loc_6F576C                                             ; +0x1c, 0x6f56b8\nLDRB.W          R3, [R0,#0xEE]                                         ; +0x1e, 0x6f56ba\nCMP             R3, #0                                                 ; +0x22, 0x6f56be\nBEQ             loc_6F576C                                             ; +0x24, 0x6f56c0\nLDR             R3, [R0]                                               ; +0x26, 0x6f56c2\nLDR.W           R3, [R3,#0x278]                                        ; +0x28, 0x6f56c4\nBLX             R3                                                     ; +0x2c, 0x6f56c8\nMOV             R6, R0                                                 ; +0x2e, 0x6f56ca\nCMP             R0, #0                                                 ; +0x30, 0x6f56cc\nBEQ             loc_6F576C                                             ; +0x32, 0x6f56ce\nLDR.W           R5, [R4,#0xC4]                                         ; +0x34, 0x6f56d0\nCBZ             R5, loc_6F56F2                                         ; +0x38, 0x6f56d4\nLDR             R3, [R5]                                               ; +0x3a, 0x6f56d6\nMOV             R0, R5                                                 ; +0x3c, 0x6f56d8\nLDR.W           R3, [R3,#0xB0]                                         ; +0x3e, 0x6f56da\nBLX             R3                                                     ; +0x42, 0x6f56de\nCMP             R0, #0                                                 ; +0x44, 0x6f56e0\nBEQ             loc_6F576C                                             ; +0x46, 0x6f56e2\nLDR             R3, [R5]                                               ; +0x48, 0x6f56e4\nMOV             R0, R5                                                 ; +0x4a, 0x6f56e6\nLDR.W           R3, [R3,#0x100]                                        ; +0x4c, 0x6f56e8\nBLX             R3                                                     ; +0x50, 0x6f56ec\nMOV             R5, R0                                                 ; +0x52, 0x6f56ee\nB               loc_6F56D4                                             ; +0x54, 0x6f56f0\nADD.W           R9, SP, #0x14+var_10                                   ; +0x56, 0x6f56f2\nMOV             R1, R8                                                 ; +0x5a, 0x6f56f6\nMOV             R0, R9; this                                           ; +0x5c, 0x6f56f8\nBL              _ZNK7cocos2d7CCTouch11getLocationEv; cocos2d::CCTouch::getLocation(void) ; +0x5e, 0x6f56fa\nLDR             R3, [R4]                                               ; +0x62, 0x6f56fe\nMOV             R0, R4                                                 ; +0x64, 0x6f5700\nLDR.W           R3, [R3,#0x100]                                        ; +0x66, 0x6f5702\nBLX             R3                                                     ; +0x6a, 0x6f5706\nMOV             R5, R0                                                 ; +0x6c, 0x6f5708\nCBZ             R0, loc_6F573C                                         ; +0x6e, 0x6f570a\nLDR             R1, =(_ZTIN7cocos2d6CCNodeE_ptr - 0x6F571A)            ; +0x70, 0x6f570c\nMOV             R0, R5; lpsrc                                          ; +0x72, 0x6f570e\nLDR             R2, =(_ZTIN7cocos2d14CCTouchClipperE_ptr - 0x6F571E)   ; +0x74, 0x6f5710\nMOV             R3, #0xFFFFFFFE; s2d                                   ; +0x76, 0x6f5712\nADD             R1, PC; _ZTIN7cocos2d6CCNodeE_ptr                      ; +0x7a, 0x6f5716\nLDR             R1, [R1]; lpstype                                      ; +0x7c, 0x6f5718\nADD             R2, PC; _ZTIN7cocos2d14CCTouchClipperE_ptr             ; +0x7e, 0x6f571a\nLDR             R2, [R2]; lpdtype                                      ; +0x80, 0x6f571c\nBL              __dynamic_cast                                         ; +0x82, 0x6f571e\nCBZ             R0, loc_6F5732                                         ; +0x86, 0x6f5722\nLDR             R3, [R0]                                               ; +0x88, 0x6f5724\nMOV             R1, R9                                                 ; +0x8a, 0x6f5726\nLDR             R3, [R3,#8]                                            ; +0x8c, 0x6f5728\nBLX             R3                                                     ; +0x8e, 0x6f572a\nCBNZ            R0, loc_6F5732                                         ; +0x90, 0x6f572c\nCBNZ            R6, loc_6F576C                                         ; +0x92, 0x6f572e\nB               loc_6F573C                                             ; +0x94, 0x6f5730\nLDR             R3, [R5]                                               ; +0x96, 0x6f5732\nMOV             R0, R5                                                 ; +0x98, 0x6f5734\nLDR.W           R3, [R3,#0x100]                                        ; +0x9a, 0x6f5736\nB               loc_6F5706                                             ; +0x9e, 0x6f573a\nMOV             R0, R4; this                                           ; +0xa0, 0x6f573c\nMOV             R1, R8; cocos2d::CCTouch *                             ; +0xa2, 0x6f573e\nBL              _ZN8DpadMenu13arrowForTouchEPN7cocos2d7CCTouchE; DpadMenu::arrowForTouch(cocos2d::CCTouch *) ; +0xa4, 0x6f5740\nSTR.W           R0, [R4,#0x150]                                        ; +0xa8, 0x6f5744\nCBZ             R0, loc_6F576C                                         ; +0xac, 0x6f5748\nMOVS            R2, #1                                                 ; +0xae, 0x6f574a\nSTR.W           R2, [R4,#0x14C]                                        ; +0xb0, 0x6f574c\nLDR             R3, [R0]                                               ; +0xb4, 0x6f5750\nLDR.W           R3, [R3,#0x1FC]                                        ; +0xb6, 0x6f5752\nBLX             R3                                                     ; +0xba, 0x6f5756\nMOV             R0, R4; this                                           ; +0xbc, 0x6f5758\nBL              _ZN11CCMenuExtra22repeatSelectionChangedEv; CCMenuExtra::repeatSelectionChanged(void) ; +0xbe, 0x6f575a\nLDR             R2, [SP,#0x14+var_8]                                   ; +0xc2, 0x6f575e\nMOV             R0, R6                                                 ; +0xc4, 0x6f5760\nLDR             R3, [R7]                                               ; +0xc6, 0x6f5762\nCMP             R2, R3                                                 ; +0xc8, 0x6f5764\nBEQ             loc_6F5770                                             ; +0xca, 0x6f5766\nBLX             __stack_chk_fail                                       ; +0xcc, 0x6f5768\nMOVS            R6, #0                                                 ; +0xd0, 0x6f576c\nB               loc_6F575E                                             ; +0xd2, 0x6f576e\nADD             SP, SP, #0x14                                          ; +0xd4, 0x6f5770\nPOP.W           {R4-R9,PC}                                             ; +0xd6, 0x6f5772", "xrefs": ["`non-virtual thunk to'DpadMenu::ccTouchBegan @ 0x6f5788"], "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"}