{"type": "func", "start": 5373196320, "end": 5373197115, "name": "LevelPage::ccTouchBegan", "pseudocode": "// \n// LevelPage::ccTouchBegan from 0x140447820 to 0x140447b3b (795 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407928e0\n// > <???> @ 0x140927254\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:32:24 +0000\n// \n\n// Hidden C++ exception states: #wind=4\nchar __fastcall LevelPage::ccTouchBegan(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rdx\n  __int64 v5; // rax\n  cocos2d *v6; // rax\n  const struct cocos2d::CCPoint *v7; // r8\n  __int64 v8; // rdx\n  __int64 v9; // rcx\n  __int64 v10; // r8\n  __int64 v11; // rdi\n  __int64 v12; // rbx\n  cocos2d::CCString *v13; // rax\n  int v14; // ebx\n  void *v15; // r8\n  __int64 v16; // rdx\n  __int64 v17; // rcx\n  __int64 v18; // r8\n  __int64 v19; // rax\n  __int64 v20; // rcx\n  __int64 v21; // rcx\n  void *v23; // [rsp+30h] [rbp-19h] BYREF\n  _BYTE v24[8]; // [rsp+38h] [rbp-11h] BYREF\n  __int128 v25; // [rsp+40h] [rbp-9h] BYREF\n  __int64 v26; // [rsp+50h] [rbp+7h]\n  __int64 v27; // [rsp+58h] [rbp+Fh]\n  void *Block[2]; // [rsp+60h] [rbp+17h] BYREF\n  __int64 v29; // [rsp+70h] [rbp+27h]\n  unsigned __int64 v30; // [rsp+78h] [rbp+2Fh]\n\n  v4 = *(_QWORD *)(a1 + 104);\n  if ( !v4 || !*(_QWORD *)(a1 + 240) || *(_DWORD *)(v4 + 328) - *(_DWORD *)(v4 + 332) != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2, v24);\n  cocos2d::CCNode::convertToNodeSpace(a1 - 320, &v23, v24);\n  cocos2d::CCPoint::operator=(v24, v5);\n  v6 = (cocos2d *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 240) + 200LL))(*(_QWORD *)(a1 + 240));\n  if ( cocos2d::ccpDistance(v6, (const struct cocos2d::CCPoint *)v24, v7) <= 30.0 )\n  {\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 320) + 920LL))(a1 - 320, 0);\n    LevelPage::playCoinEffect((_QWORD **)(a1 - 320));\n    v11 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v23 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v23);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v11 = qword_14090BFD0;\n    }\n    v12 = AchievementManager::sharedState(v9, v8, v10);\n    *(_OWORD *)Block = 0;\n    v29 = 0;\n    v30 = 0;\n    Block[0] = sub_14003D460(0x20u);\n    v29 = 21;\n    v30 = 31;\n    strcpy((char *)Block[0], \"geometry.ach.secret04\");\n    v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v12 + 352), Block);\n    v14 = cocos2d::CCString::intValue(v13);\n    if ( v30 > 0xF )\n    {\n      v15 = Block[0];\n      if ( v30 + 1 >= 0x1000 )\n      {\n        v15 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v15);\n    }\n    v29 = 0;\n    v30 = 15;\n    LOBYTE(Block[0]) = 0;\n    if ( v14 < 100 )\n    {\n      v25 = 0;\n      v26 = 0;\n      v27 = 0;\n      *(_QWORD *)&v25 = sub_14003D460(0x20u);\n      v26 = 21;\n      v27 = 31;\n      strcpy((char *)v25, \"geometry.ach.secret04\");\n      GameManager::completedAchievement(v11, (__int64)&v25);\n      v19 = AchievementManager::sharedState(v17, v16, v18);\n      AchievementManager::reportAchievementWithID(v19, (__int64)\"geometry.ach.secret04\", 100);\n    }\n    v20 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v23 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480((__int64)v23);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v20 = qword_14090BFE0;\n    }\n    GameStatsManager::storeSecretCoin(v20, \"secret04\");\n    v21 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v23 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480((__int64)v23);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v21 = qword_14090BFE0;\n    }\n    GameStatsManager::incrementStat(v21, (const char *)&word_14070D038, 1u);\n  }\n  return 1;\n}", "assembly": "; \n; LevelPage::ccTouchBegan from 0x140447820 to 0x140447b3b (795 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407928e0\n; > <???> @ 0x140927254\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:32:24 +0000\n; \nmov     [rsp-8+arg_10], rbx                                            ; +0x0, 0x140447820\npush    rbp                                                            ; +0x5, 0x140447825\npush    rsi                                                            ; +0x6, 0x140447826\npush    rdi                                                            ; +0x7, 0x140447827\nlea     rbp, [rsp-47h]                                                 ; +0x8, 0x140447828\nsub     rsp, 90h                                                       ; +0xd, 0x14044782d\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x140447834\nxor     rax, rsp                                                       ; +0x1b, 0x14044783b\nmov     [rbp+57h+var_20], rax                                          ; +0x1e, 0x14044783e\nmov     r8, rdx                                                        ; +0x22, 0x140447842\nmov     rdi, rcx                                                       ; +0x25, 0x140447845\nmov     rdx, [rcx+68h]                                                 ; +0x28, 0x140447848\ntest    rdx, rdx                                                       ; +0x2c, 0x14044784c\njz      loc_140447B1A                                                  ; +0x2f, 0x14044784f\ncmp     qword ptr [rcx+0F0h], 0                                        ; +0x35, 0x140447855\njz      loc_140447B1A                                                  ; +0x3d, 0x14044785d\nmov     eax, [rdx+148h]                                                ; +0x43, 0x140447863\nsub     eax, [rdx+14Ch]                                                ; +0x49, 0x140447869\ncmp     eax, 0FFFFFFFFh                                                ; +0x4f, 0x14044786f\njnz     loc_140447B1A                                                  ; +0x52, 0x140447872\nlea     rdx, [rbp+57h+var_68]                                          ; +0x58, 0x140447878\nmov     rcx, r8                                                        ; +0x5c, 0x14044787c\ncall    cs:?getLocation@CCTouch@cocos2d@@QEBA?AVCCPoint@2@XZ; cocos2d::CCTouch::getLocation(void) ; +0x5f, 0x14044787f\nlea     r8, [rbp+57h+var_68]                                           ; +0x65, 0x140447885\nlea     rdx, [rbp+57h+var_70]                                          ; +0x69, 0x140447889\nlea     rcx, [rdi-140h]                                                ; +0x6d, 0x14044788d\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x74, 0x140447894\nmov     rdx, rax                                                       ; +0x7a, 0x14044789a\nlea     rcx, [rbp+57h+var_68]                                          ; +0x7d, 0x14044789d\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x81, 0x1404478a1\nmov     rcx, [rdi+0F0h]                                                ; +0x87, 0x1404478a7\nmov     rax, [rcx]                                                     ; +0x8e, 0x1404478ae\ncall    qword ptr [rax+0C8h]                                           ; +0x91, 0x1404478b1\nmov     rcx, rax                                                       ; +0x97, 0x1404478b7\nlea     rdx, [rbp+57h+var_68]                                          ; +0x9a, 0x1404478ba\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x9e, 0x1404478be\nmovss   xmm1, cs:dword_140835624                                       ; +0xa4, 0x1404478c4\ncomiss  xmm1, xmm0                                                     ; +0xac, 0x1404478cc\njb      loc_140447B16                                                  ; +0xaf, 0x1404478cf\nmov     rax, [rdi-140h]                                                ; +0xb5, 0x1404478d5\nxor     edx, edx                                                       ; +0xbc, 0x1404478dc\nlea     rcx, [rdi-140h]                                                ; +0xbe, 0x1404478de\ncall    qword ptr [rax+398h]                                           ; +0xc5, 0x1404478e5\nlea     rcx, [rdi-140h]                                                ; +0xcb, 0x1404478eb\ncall    LevelPage__playCoinEffect                                      ; +0xd2, 0x1404478f2\nmov     rdi, cs:qword_14090BFD0                                        ; +0xd7, 0x1404478f7\ntest    rdi, rdi                                                       ; +0xde, 0x1404478fe\njnz     short loc_140447934                                            ; +0xe1, 0x140447901\nmov     ecx, 6E8h; Size                                                ; +0xe3, 0x140447903\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe8, 0x140447908\nmov     [rbp+57h+var_70], rax                                          ; +0xed, 0x14044790d\nmov     rcx, rax                                                       ; +0xf1, 0x140447911\ncall    GameManager__GameManager                                       ; +0xf4, 0x140447914\nnop                                                                    ; +0xf9, 0x140447919\nmov     cs:qword_14090BFD0, rax                                        ; +0xfa, 0x14044791a\nmov     rcx, [rax]                                                     ; +0x101, 0x140447921\nmov     rdx, [rcx+48h]                                                 ; +0x104, 0x140447924\nmov     rcx, rax                                                       ; +0x108, 0x140447928\ncall    rdx                                                            ; +0x10b, 0x14044792b\nmov     rdi, cs:qword_14090BFD0                                        ; +0x10d, 0x14044792d\ncall    AchievementManager__sharedState                                ; +0x114, 0x140447934\nmov     rbx, rax                                                       ; +0x119, 0x140447939\nxorps   xmm0, xmm0                                                     ; +0x11c, 0x14044793c\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0x11f, 0x14044793f\nxor     esi, esi                                                       ; +0x123, 0x140447943\nmov     [rbp+57h+var_30], rsi                                          ; +0x125, 0x140447945\nmov     [rbp+57h+var_28], rsi                                          ; +0x129, 0x140447949\nmov     ecx, 20h ; ' '                                                 ; +0x12d, 0x14044794d\ncall    sub_14003D460                                                  ; +0x132, 0x140447952\nmov     [rbp+57h+Block], rax                                           ; +0x137, 0x140447957\nmov     [rbp+57h+var_30], 15h                                          ; +0x13b, 0x14044795b\nmov     [rbp+57h+var_28], 1Fh                                          ; +0x143, 0x140447963\nmovups  xmm0, xmmword ptr cs:aGeometryAchSec_4; \"geometry.ach.secret04\" ; +0x14b, 0x14044796b\nmovups  xmmword ptr [rax], xmm0                                        ; +0x152, 0x140447972\nmov     ecx, dword ptr cs:aGeometryAchSec_4+10h; \"ret04\"               ; +0x155, 0x140447975\nmov     [rax+10h], ecx                                                 ; +0x15b, 0x14044797b\nmovzx   ecx, byte ptr cs:aGeometryAchSec_4+14h; \"4\"                    ; +0x15e, 0x14044797e\nmov     [rax+14h], cl                                                  ; +0x165, 0x140447985\nmov     [rax+15h], sil                                                 ; +0x168, 0x140447988\nlea     rdx, [rbp+57h+Block]                                           ; +0x16c, 0x14044798c\nmov     rcx, [rbx+160h]                                                ; +0x170, 0x140447990\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x177, 0x140447997\nmov     rcx, rax                                                       ; +0x17d, 0x14044799d\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x180, 0x1404479a0\nmov     ebx, eax                                                       ; +0x186, 0x1404479a6\nmov     rdx, [rbp+57h+var_28]                                          ; +0x188, 0x1404479a8\ncmp     rdx, 0Fh                                                       ; +0x18c, 0x1404479ac\njbe     short loc_1404479F8                                            ; +0x190, 0x1404479b0\ninc     rdx                                                            ; +0x192, 0x1404479b2\nmov     r8, [rbp+57h+Block]                                            ; +0x195, 0x1404479b5\nmov     rcx, r8                                                        ; +0x199, 0x1404479b9\ncmp     rdx, 1000h                                                     ; +0x19c, 0x1404479bc\njb      short loc_1404479F0                                            ; +0x1a3, 0x1404479c3\nadd     rdx, 27h ; '''                                                 ; +0x1a5, 0x1404479c5\nmov     r8, [r8-8]                                                     ; +0x1a9, 0x1404479c9\nsub     rcx, r8                                                        ; +0x1ad, 0x1404479cd\nsub     rcx, 8                                                         ; +0x1b0, 0x1404479d0\ncmp     rcx, 1Fh                                                       ; +0x1b4, 0x1404479d4\njbe     short loc_1404479F0                                            ; +0x1b8, 0x1404479d8\nmov     [rsp+0A0h+Reserved], rsi; Reserved                             ; +0x1ba, 0x1404479da\nxor     r9d, r9d; LineNo                                               ; +0x1bf, 0x1404479df\nxor     r8d, r8d; FileName                                             ; +0x1c2, 0x1404479e2\nxor     edx, edx; FunctionName                                         ; +0x1c5, 0x1404479e5\nxor     ecx, ecx; Expression                                           ; +0x1c7, 0x1404479e7\ncall    cs:_invoke_watson                                              ; +0x1c9, 0x1404479e9\nalign 10h                                                              ; +0x1cf, 0x1404479ef\nmov     rcx, r8; Block                                                 ; +0x1d0, 0x1404479f0\ncall    j_j_free                                                       ; +0x1d3, 0x1404479f3\nmov     [rbp+57h+var_30], rsi                                          ; +0x1d8, 0x1404479f8\nmov     [rbp+57h+var_28], 0Fh                                          ; +0x1dc, 0x1404479fc\nmov     byte ptr [rbp+57h+Block], 0                                    ; +0x1e4, 0x140447a04\ncmp     ebx, 64h ; 'd'                                                 ; +0x1e8, 0x140447a08\njge     short loc_140447A81                                            ; +0x1eb, 0x140447a0b\nxorps   xmm0, xmm0                                                     ; +0x1ed, 0x140447a0d\nmovups  [rbp+57h+var_60], xmm0                                         ; +0x1f0, 0x140447a10\nmov     [rbp+57h+var_50], rsi                                          ; +0x1f4, 0x140447a14\nmov     [rbp+57h+var_48], rsi                                          ; +0x1f8, 0x140447a18\nmov     ecx, 20h ; ' '                                                 ; +0x1fc, 0x140447a1c\ncall    sub_14003D460                                                  ; +0x201, 0x140447a21\nmov     qword ptr [rbp+57h+var_60], rax                                ; +0x206, 0x140447a26\nmov     [rbp+57h+var_50], 15h                                          ; +0x20a, 0x140447a2a\nmov     [rbp+57h+var_48], 1Fh                                          ; +0x212, 0x140447a32\nmovups  xmm0, xmmword ptr cs:aGeometryAchSec_4; \"geometry.ach.secret04\" ; +0x21a, 0x140447a3a\nmovups  xmmword ptr [rax], xmm0                                        ; +0x221, 0x140447a41\nmov     edx, dword ptr cs:aGeometryAchSec_4+10h; \"ret04\"               ; +0x224, 0x140447a44\nmov     [rax+10h], edx                                                 ; +0x22a, 0x140447a4a\nmovzx   edx, byte ptr cs:aGeometryAchSec_4+14h; \"4\"                    ; +0x22d, 0x140447a4d\nmov     [rax+14h], dl                                                  ; +0x234, 0x140447a54\nmov     byte ptr [rax+15h], 0                                          ; +0x237, 0x140447a57\nlea     rdx, [rbp+57h+var_60]                                          ; +0x23b, 0x140447a5b\nmov     rcx, rdi                                                       ; +0x23f, 0x140447a5f\ncall    GameManager__completedAchievement                              ; +0x242, 0x140447a62\ncall    AchievementManager__sharedState                                ; +0x247, 0x140447a67\nmov     rcx, rax                                                       ; +0x24c, 0x140447a6c\nmov     r8d, 64h ; 'd'                                                 ; +0x24f, 0x140447a6f\nlea     rdx, aGeometryAchSec_4; \"geometry.ach.secret04\"                ; +0x255, 0x140447a75\ncall    AchievementManager__reportAchievementWithID                    ; +0x25c, 0x140447a7c\nmov     rcx, cs:qword_14090BFE0                                        ; +0x261, 0x140447a81\ntest    rcx, rcx                                                       ; +0x268, 0x140447a88\njnz     short loc_140447ABB                                            ; +0x26b, 0x140447a8b\nmov     ecx, 3E8h; Size                                                ; +0x26d, 0x140447a8d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x272, 0x140447a92\nmov     [rbp+57h+var_70], rax                                          ; +0x277, 0x140447a97\nmov     rcx, rax                                                       ; +0x27b, 0x140447a9b\ncall    sub_1402D6480                                                  ; +0x27e, 0x140447a9e\nnop                                                                    ; +0x283, 0x140447aa3\nmov     cs:qword_14090BFE0, rax                                        ; +0x284, 0x140447aa4\nmov     rdx, [rax]                                                     ; +0x28b, 0x140447aab\nmov     rcx, rax                                                       ; +0x28e, 0x140447aae\ncall    qword ptr [rdx+48h]                                            ; +0x291, 0x140447ab1\nmov     rcx, cs:qword_14090BFE0                                        ; +0x294, 0x140447ab4\nlea     rdx, aSecret04; \"secret04\"                                     ; +0x29b, 0x140447abb\ncall    GameStatsManager__storeSecretCoin                              ; +0x2a2, 0x140447ac2\nmov     rcx, cs:qword_14090BFE0                                        ; +0x2a7, 0x140447ac7\ntest    rcx, rcx                                                       ; +0x2ae, 0x140447ace\njnz     short loc_140447B04                                            ; +0x2b1, 0x140447ad1\nmov     ecx, 3E8h; Size                                                ; +0x2b3, 0x140447ad3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2b8, 0x140447ad8\nmov     [rbp+57h+var_70], rax                                          ; +0x2bd, 0x140447add\nmov     rcx, rax                                                       ; +0x2c1, 0x140447ae1\ncall    sub_1402D6480                                                  ; +0x2c4, 0x140447ae4\nnop                                                                    ; +0x2c9, 0x140447ae9\nmov     cs:qword_14090BFE0, rax                                        ; +0x2ca, 0x140447aea\nmov     rcx, [rax]                                                     ; +0x2d1, 0x140447af1\nmov     rdx, [rcx+48h]                                                 ; +0x2d4, 0x140447af4\nmov     rcx, rax                                                       ; +0x2d8, 0x140447af8\ncall    rdx                                                            ; +0x2db, 0x140447afb\nmov     rcx, cs:qword_14090BFE0                                        ; +0x2dd, 0x140447afd\nmov     r8d, 1                                                         ; +0x2e4, 0x140447b04\nlea     rdx, word_14070D038                                            ; +0x2ea, 0x140447b0a\ncall    GameStatsManager__incrementStat                                ; +0x2f1, 0x140447b11\nmov     al, 1                                                          ; +0x2f6, 0x140447b16\njmp     short loc_140447B1C                                            ; +0x2f8, 0x140447b18\nxor     al, al                                                         ; +0x2fa, 0x140447b1a\nmov     rcx, [rbp+57h+var_20]                                          ; +0x2fc, 0x140447b1c\nxor     rcx, rsp; StackCookie                                          ; +0x300, 0x140447b20\ncall    __security_check_cookie                                        ; +0x303, 0x140447b23\nmov     rbx, [rsp+0A0h+arg_10]                                         ; +0x308, 0x140447b28\nadd     rsp, 90h                                                       ; +0x310, 0x140447b30\npop     rdi                                                            ; +0x317, 0x140447b37\npop     rsi                                                            ; +0x318, 0x140447b38\npop     rbp                                                            ; +0x319, 0x140447b39\nretn                                                                   ; +0x31a, 0x140447b3a", "xrefs": ["<???> @ 0x1407928e0", "<???> @ 0x140927254"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}