{"type": "func", "start": 5372065280, "end": 5372065705, "name": "MenuGameLayer::ccTouchBegan", "pseudocode": "// \n// MenuGameLayer::ccTouchBegan from 0x140333600 to 0x1403337a9 (425 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405aa6e8\n// > <???> @ 0x1406d50cc\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\n// Hidden C++ exception states: #wind=2\nbool MenuGameLayer::ccTouchBegan(MenuGameLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  struct cocos2d::CCPoint v4; // rax\n  cocos2d *v5; // rax\n  const struct cocos2d::CCPoint *v6; // r8\n  bool v7; // r9\n  __int64 v8; // rax\n  int v9; // ecx\n  GameManager *v10; // rcx\n  const char *v11; // rdx\n  struct cocos2d::CCPoint v13; // [rsp+30h] [rbp+8h] BYREF\n  struct cocos2d::CCPoint v14; // [rsp+48h] [rbp+20h] BYREF\n\n  cocos2d::CCTouch::getLocation(a2);\n  v4 = cocos2d::CCNode::convertToNodeSpace((MenuGameLayer *)((char *)a1 - 320), &v14);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v13, v4);\n  if ( v13.x > 50.0 )\n  {\n    v5 = (cocos2d *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_obContentSize.height + 200LL))(*(_QWORD *)&a1->m_obContentSize.height);\n    if ( cocos2d::ccpDistance(v5, &v13, v6) <= 30.0 )\n    {\n      v8 = *(_QWORD *)&a1->m_obContentSize.height;\n      if ( *(_BYTE *)(v8 + 2489)\n        || *(_BYTE *)(v8 + 2490)\n        || *(_BYTE *)(v8 + 2492)\n        || *(_BYTE *)(v8 + 2500)\n        || *(_BYTE *)(v8 + 2491)\n        || *(_BYTE *)(v8 + 2493)\n        || *(float *)(v8 + 2544) != 1.0 )\n      {\n        goto LABEL_19;\n      }\n      v9 = *(_DWORD *)(v8 + 1568);\n      if ( v9 == 55 )\n      {\n        v10 = (GameManager *)qword_1406C2ED8;\n        if ( !qword_1406C2ED8 )\n        {\n          v14 = (struct cocos2d::CCPoint)operator new(0x668u);\n          qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v14);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n          v10 = (GameManager *)qword_1406C2ED8;\n        }\n        v11 = \"geometry.ach.secret11\";\n      }\n      else\n      {\n        if ( v9 != 50 )\n        {\nLABEL_19:\n          MenuGameLayer::destroyPlayer((MenuGameLayer *)((char *)a1 - 320));\n          return 1;\n        }\n        v10 = (GameManager *)qword_1406C2ED8;\n        if ( !qword_1406C2ED8 )\n        {\n          v14 = (struct cocos2d::CCPoint)operator new(0x668u);\n          qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v14);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n          v10 = (GameManager *)qword_1406C2ED8;\n        }\n        v11 = \"geometry.ach.secret12\";\n      }\n      GameManager::reportAchievementWithID(v10, v11, 100, v7);\n      goto LABEL_19;\n    }\n  }\n  return 1;\n}", "assembly": "; \n; MenuGameLayer::ccTouchBegan from 0x140333600 to 0x1403337a9 (425 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405aa6e8\n; > <???> @ 0x1406d50cc\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140333600\npush    rdi                                                            ; +0x5, 0x140333605\nsub     rsp, 20h                                                       ; +0x6, 0x140333606\nmov     rax, rdx                                                       ; +0xa, 0x14033360a\nmov     rbx, rcx                                                       ; +0xd, 0x14033360d\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x10, 0x140333610\nmov     rcx, rax                                                       ; +0x15, 0x140333615\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x18, 0x140333618\nlea     r8, [rsp+28h+arg_0]                                            ; +0x1e, 0x14033361e\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x23, 0x140333623\nlea     rcx, [rbx-140h]                                                ; +0x28, 0x140333628\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x2f, 0x14033362f\nmov     rdx, rax                                                       ; +0x35, 0x140333635\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x38, 0x140333638\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x3d, 0x14033363d\nmovss   xmm0, dword ptr [rsp+28h+arg_0]                                ; +0x43, 0x140333643\ncomiss  xmm0, cs:dword_1406231E0                                       ; +0x49, 0x140333649\njbe     loc_14033379C                                                  ; +0x50, 0x140333650\nmov     rcx, [rbx+70h]                                                 ; +0x56, 0x140333656\nmov     rax, [rcx]                                                     ; +0x5a, 0x14033365a\ncall    qword ptr [rax+0C8h]                                           ; +0x5d, 0x14033365d\nmov     rcx, rax                                                       ; +0x63, 0x140333663\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x66, 0x140333666\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x6b, 0x14033366b\nmovss   xmm1, cs:dword_140623164                                       ; +0x71, 0x140333671\ncomiss  xmm1, xmm0                                                     ; +0x79, 0x140333679\njb      loc_14033379C                                                  ; +0x7c, 0x14033367c\nmov     rax, [rbx+70h]                                                 ; +0x82, 0x140333682\ncmp     byte ptr [rax+9B9h], 0                                         ; +0x86, 0x140333686\njnz     loc_140333790                                                  ; +0x8d, 0x14033368d\ncmp     byte ptr [rax+9BAh], 0                                         ; +0x93, 0x140333693\njnz     loc_140333790                                                  ; +0x9a, 0x14033369a\ncmp     byte ptr [rax+9BCh], 0                                         ; +0xa0, 0x1403336a0\njnz     loc_140333790                                                  ; +0xa7, 0x1403336a7\ncmp     byte ptr [rax+9C4h], 0                                         ; +0xad, 0x1403336ad\njnz     loc_140333790                                                  ; +0xb4, 0x1403336b4\ncmp     byte ptr [rax+9BBh], 0                                         ; +0xba, 0x1403336ba\njnz     loc_140333790                                                  ; +0xc1, 0x1403336c1\ncmp     byte ptr [rax+9BDh], 0                                         ; +0xc7, 0x1403336c7\njnz     loc_140333790                                                  ; +0xce, 0x1403336ce\nmovss   xmm0, dword ptr [rax+9F0h]                                     ; +0xd4, 0x1403336d4\nucomiss xmm0, cs:flt_140622C24                                         ; +0xdc, 0x1403336dc\njp      loc_140333790                                                  ; +0xe3, 0x1403336e3\njnz     loc_140333790                                                  ; +0xe9, 0x1403336e9\nmov     ecx, [rax+620h]                                                ; +0xef, 0x1403336ef\ncmp     ecx, 37h ; '7'                                                 ; +0xf5, 0x1403336f5\njnz     short loc_14033373E                                            ; +0xf8, 0x1403336f8\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xfa, 0x1403336fa\ntest    rcx, rcx                                                       ; +0x101, 0x140333701\njnz     short loc_140333735                                            ; +0x104, 0x140333704\nmov     ecx, 668h; Size                                                ; +0x106, 0x140333706\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10b, 0x14033370b\nmov     [rsp+28h+arg_18], rax                                          ; +0x110, 0x140333710\nmov     rcx, rax                                                       ; +0x115, 0x140333715\ncall    sub_14017AB00                                                  ; +0x118, 0x140333718\nnop                                                                    ; +0x11d, 0x14033371d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x11e, 0x14033371e\nmov     rdx, [rax]                                                     ; +0x125, 0x140333725\nmov     rcx, rax                                                       ; +0x128, 0x140333728\ncall    qword ptr [rdx+48h]                                            ; +0x12b, 0x14033372b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x12e, 0x14033372e\nlea     rdx, aGeometryAchSec_11; \"geometry.ach.secret11\"               ; +0x135, 0x140333735\njmp     short loc_140333785                                            ; +0x13c, 0x14033373c\ncmp     ecx, 32h ; '2'                                                 ; +0x13e, 0x14033373e\njnz     short loc_140333790                                            ; +0x141, 0x140333741\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x143, 0x140333743\ntest    rcx, rcx                                                       ; +0x14a, 0x14033374a\njnz     short loc_14033377E                                            ; +0x14d, 0x14033374d\nmov     ecx, 668h; Size                                                ; +0x14f, 0x14033374f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x154, 0x140333754\nmov     [rsp+28h+arg_18], rax                                          ; +0x159, 0x140333759\nmov     rcx, rax                                                       ; +0x15e, 0x14033375e\ncall    sub_14017AB00                                                  ; +0x161, 0x140333761\nnop                                                                    ; +0x166, 0x140333766\nmov     cs:qword_1406C2ED8, rax                                        ; +0x167, 0x140333767\nmov     rdx, [rax]                                                     ; +0x16e, 0x14033376e\nmov     rcx, rax                                                       ; +0x171, 0x140333771\ncall    qword ptr [rdx+48h]                                            ; +0x174, 0x140333774\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x177, 0x140333777\nlea     rdx, aGeometryAchSec_12; \"geometry.ach.secret12\"               ; +0x17e, 0x14033377e\nmov     r8d, 64h ; 'd'                                                 ; +0x185, 0x140333785\ncall    GameManager__reportAchievementWithID                           ; +0x18b, 0x14033378b\nlea     rcx, [rbx-140h]                                                ; +0x190, 0x140333790\ncall    MenuGameLayer__destroyPlayer                                   ; +0x197, 0x140333797\nmov     al, 1                                                          ; +0x19c, 0x14033379c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x19e, 0x14033379e\nadd     rsp, 20h                                                       ; +0x1a3, 0x1403337a3\npop     rdi                                                            ; +0x1a7, 0x1403337a7\nretn                                                                   ; +0x1a8, 0x1403337a8", "xrefs": ["<???> @ 0x1405aa6e8", "<???> @ 0x1406d50cc"], "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"}