{"type": "func", "start": 5371978384, "end": 5371978833, "name": "LevelPage::ccTouchBegan", "pseudocode": "// \n// LevelPage::ccTouchBegan from 0x14031e290 to 0x14031e451 (449 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14058d1c0\n// > <???> @ 0x1406d4b74\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=3\nbool LevelPage::ccTouchBegan(LevelPage *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  __int64 v4; // r8\n  struct cocos2d::CCPoint v5; // rax\n  cocos2d *v6; // rax\n  const struct cocos2d::CCPoint *v7; // r8\n  bool v8; // r9\n  GameManager *v9; // rcx\n  GameStatsManager *v10; // rcx\n  GameStatsManager *v11; // rcx\n  struct cocos2d::CCPoint v13; // [rsp+30h] [rbp+8h] BYREF\n  struct cocos2d::CCPoint v14; // [rsp+48h] [rbp+20h] BYREF\n\n  v4 = *(_QWORD *)&a1->m_obAnchorPoint.y;\n  if ( !v4 || !a1->m_pShaderProgram || *(_DWORD *)(v4 + 328) - *(_DWORD *)(v4 + 332) != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2);\n  v5 = cocos2d::CCNode::convertToNodeSpace((LevelPage *)((char *)a1 - 320), &v14);\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v13, v5);\n  v6 = (cocos2d *)((__int64 (__fastcall *)(cocos2d::CCGLProgram *))a1->m_pShaderProgram->cocos2d::CCLayer::cocos2d::CCNode::__vftable[2].getTag)(a1->m_pShaderProgram);\n  if ( cocos2d::ccpDistance(v6, &v13, v7) <= 30.0 )\n  {\n    (*(void (__fastcall **)(cocos2d::CCScheduler **, _QWORD))&a1[-1].m_pScheduler[7].m_uID)(&a1[-1].m_pScheduler, 0);\n    LevelPage::playCoinEffect((LevelPage *)((char *)a1 - 320));\n    v9 = (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      v9 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::reportAchievementWithID(v9, \"geometry.ach.secret04\", 100, v8);\n    v10 = (GameStatsManager *)qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v14 = (struct cocos2d::CCPoint)operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0(*(_QWORD *)&v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v10 = (GameStatsManager *)qword_1406C2EE8;\n    }\n    GameStatsManager::storeSecretCoin(v10, \"secret04\");\n    v11 = (GameStatsManager *)qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v14 = (struct cocos2d::CCPoint)operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0(*(_QWORD *)&v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v11 = (GameStatsManager *)qword_1406C2EE8;\n    }\n    GameStatsManager::incrementStat(v11, \"8\", 1);\n  }\n  return 1;\n}", "assembly": "; \n; LevelPage::ccTouchBegan from 0x14031e290 to 0x14031e451 (449 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14058d1c0\n; > <???> @ 0x1406d4b74\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, 0x14031e290\npush    rdi                                                            ; +0x5, 0x14031e295\nsub     rsp, 20h                                                       ; +0x6, 0x14031e296\nmov     r9, rdx                                                        ; +0xa, 0x14031e29a\nmov     rdi, rcx                                                       ; +0xd, 0x14031e29d\nmov     r8, [rcx+68h]                                                  ; +0x10, 0x14031e2a0\ntest    r8, r8                                                         ; +0x14, 0x14031e2a4\njz      loc_14031E444                                                  ; +0x17, 0x14031e2a7\ncmp     qword ptr [rcx+0F0h], 0                                        ; +0x1d, 0x14031e2ad\njz      loc_14031E444                                                  ; +0x25, 0x14031e2b5\nmov     eax, [r8+148h]                                                 ; +0x2b, 0x14031e2bb\nsub     eax, [r8+14Ch]                                                 ; +0x32, 0x14031e2c2\ncmp     eax, 0FFFFFFFFh                                                ; +0x39, 0x14031e2c9\njnz     loc_14031E444                                                  ; +0x3c, 0x14031e2cc\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x42, 0x14031e2d2\nmov     rcx, r9                                                        ; +0x47, 0x14031e2d7\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x4a, 0x14031e2da\nlea     r8, [rsp+28h+arg_0]                                            ; +0x50, 0x14031e2e0\nlea     rdx, [rsp+28h+arg_18]                                          ; +0x55, 0x14031e2e5\nlea     rcx, [rdi-140h]                                                ; +0x5a, 0x14031e2ea\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x61, 0x14031e2f1\nmov     rdx, rax                                                       ; +0x67, 0x14031e2f7\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x6a, 0x14031e2fa\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x6f, 0x14031e2ff\nmov     rcx, [rdi+0F0h]                                                ; +0x75, 0x14031e305\nmov     rax, [rcx]                                                     ; +0x7c, 0x14031e30c\ncall    qword ptr [rax+0C8h]                                           ; +0x7f, 0x14031e30f\nmov     rcx, rax                                                       ; +0x85, 0x14031e315\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x88, 0x14031e318\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x8d, 0x14031e31d\nmovss   xmm1, cs:dword_140623164                                       ; +0x93, 0x14031e323\ncomiss  xmm1, xmm0                                                     ; +0x9b, 0x14031e32b\njb      loc_14031E437                                                  ; +0x9e, 0x14031e32e\nmov     rax, [rdi-140h]                                                ; +0xa4, 0x14031e334\nxor     edx, edx                                                       ; +0xab, 0x14031e33b\nlea     rcx, [rdi-140h]                                                ; +0xad, 0x14031e33d\ncall    qword ptr [rax+388h]                                           ; +0xb4, 0x14031e344\nlea     rcx, [rdi-140h]                                                ; +0xba, 0x14031e34a\ncall    LevelPage__playCoinEffect                                      ; +0xc1, 0x14031e351\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xc6, 0x14031e356\ntest    rcx, rcx                                                       ; +0xcd, 0x14031e35d\njnz     short loc_14031E391                                            ; +0xd0, 0x14031e360\nmov     ecx, 668h; Size                                                ; +0xd2, 0x14031e362\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xd7, 0x14031e367\nmov     [rsp+28h+arg_18], rax                                          ; +0xdc, 0x14031e36c\nmov     rcx, rax                                                       ; +0xe1, 0x14031e371\ncall    sub_14017AB00                                                  ; +0xe4, 0x14031e374\nnop                                                                    ; +0xe9, 0x14031e379\nmov     cs:qword_1406C2ED8, rax                                        ; +0xea, 0x14031e37a\nmov     rdx, [rax]                                                     ; +0xf1, 0x14031e381\nmov     rcx, rax                                                       ; +0xf4, 0x14031e384\ncall    qword ptr [rdx+48h]                                            ; +0xf7, 0x14031e387\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xfa, 0x14031e38a\nmov     r8d, 64h ; 'd'                                                 ; +0x101, 0x14031e391\nlea     rdx, aGeometryAchSec_4; \"geometry.ach.secret04\"                ; +0x107, 0x14031e397\ncall    GameManager__reportAchievementWithID                           ; +0x10e, 0x14031e39e\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x113, 0x14031e3a3\ntest    rcx, rcx                                                       ; +0x11a, 0x14031e3aa\njnz     short loc_14031E3DE                                            ; +0x11d, 0x14031e3ad\nmov     ecx, 3E0h; Size                                                ; +0x11f, 0x14031e3af\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x124, 0x14031e3b4\nmov     [rsp+28h+arg_18], rax                                          ; +0x129, 0x14031e3b9\nmov     rcx, rax                                                       ; +0x12e, 0x14031e3be\ncall    sub_1401D0AE0                                                  ; +0x131, 0x14031e3c1\nnop                                                                    ; +0x136, 0x14031e3c6\nmov     cs:qword_1406C2EE8, rax                                        ; +0x137, 0x14031e3c7\nmov     rdx, [rax]                                                     ; +0x13e, 0x14031e3ce\nmov     rcx, rax                                                       ; +0x141, 0x14031e3d1\ncall    qword ptr [rdx+48h]                                            ; +0x144, 0x14031e3d4\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x147, 0x14031e3d7\nlea     rdx, aSecret04; \"secret04\"                                     ; +0x14e, 0x14031e3de\ncall    GameStatsManager__storeSecretCoin                              ; +0x155, 0x14031e3e5\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x15a, 0x14031e3ea\ntest    rcx, rcx                                                       ; +0x161, 0x14031e3f1\njnz     short loc_14031E425                                            ; +0x164, 0x14031e3f4\nmov     ecx, 3E0h; Size                                                ; +0x166, 0x14031e3f6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x16b, 0x14031e3fb\nmov     [rsp+28h+arg_18], rax                                          ; +0x170, 0x14031e400\nmov     rcx, rax                                                       ; +0x175, 0x14031e405\ncall    sub_1401D0AE0                                                  ; +0x178, 0x14031e408\nnop                                                                    ; +0x17d, 0x14031e40d\nmov     cs:qword_1406C2EE8, rax                                        ; +0x17e, 0x14031e40e\nmov     rdx, [rax]                                                     ; +0x185, 0x14031e415\nmov     rcx, rax                                                       ; +0x188, 0x14031e418\ncall    qword ptr [rdx+48h]                                            ; +0x18b, 0x14031e41b\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x18e, 0x14031e41e\nmov     r8d, 1                                                         ; +0x195, 0x14031e425\nlea     rdx, a8; \"8\"                                                   ; +0x19b, 0x14031e42b\ncall    GameStatsManager__incrementStat                                ; +0x1a2, 0x14031e432\nmov     al, 1                                                          ; +0x1a7, 0x14031e437\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1a9, 0x14031e439\nadd     rsp, 20h                                                       ; +0x1ae, 0x14031e43e\npop     rdi                                                            ; +0x1b2, 0x14031e442\nretn                                                                   ; +0x1b3, 0x14031e443\nxor     al, al                                                         ; +0x1b4, 0x14031e444\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1b6, 0x14031e446\nadd     rsp, 20h                                                       ; +0x1bb, 0x14031e44b\npop     rdi                                                            ; +0x1bf, 0x14031e44f\nretn                                                                   ; +0x1c0, 0x14031e450", "xrefs": ["<???> @ 0x14058d1c0", "<???> @ 0x1406d4b74"], "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"}