{"type": "func", "start": 5371514224, "end": 5371514764, "name": "GJShopLayer::onBack", "pseudocode": "// \n// GJShopLayer::onBack from 0x1402acd70 to 0x1402acf8c (540 bytes)\n// \n// 3 xrefs:\n// > GJShopLayer::keyBackClicked @ 0x1402acf99\n// > GJShopLayer::init @ 0x1402aaa73\n// > <???> @ 0x1406d2264\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\nvoid GJShopLayer::onBack(GJShopLayer *a1, cocos2d::CCObject *a2)\n{\n  float v2; // xmm0_4\n  float v3; // xmm3_4\n  __int64 v5; // rax\n  cocos2d::CCTouchDispatcher *v6; // rax\n  cocos2d::CCScene *v7; // rax\n  __int64 v8; // rcx\n  struct cocos2d::CCScene *v9; // rbx\n  cocos2d::CCDirector *v10; // rax\n  __int64 v11; // rcx\n  cocos2d::CCDirector *v12; // rax\n  const struct cocos2d::CCPoint *v13; // rax\n  struct cocos2d::CCMoveTo *v14; // rax\n  struct cocos2d::CCEaseIn *v15; // rbx\n  __int64 v16; // rax\n  struct cocos2d::CCSequence *v17; // rax\n  cocos2d::ccColor3B *v18; // r8\n  __int64 v19; // rcx\n  GameManager *v20; // rcx\n  float v21[4]; // [rsp+20h] [rbp-28h] BYREF\n  __int64 v22; // [rsp+30h] [rbp-18h]\n  __int64 v23; // [rsp+38h] [rbp-10h]\n  void *v24; // [rsp+60h] [rbp+18h]\n  void *v25; // [rsp+68h] [rbp+20h]\n\n  if ( !a1->m_closing )\n  {\n    a1->m_closing = 1;\n    v5 = cocos2d::CCDirector::sharedDirector(a1);\n    v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);\n    cocos2d::CCObject::retain(a1);\n    a1->removeFromParent(a1);\n    v7 = a1->m_type ? SecretRewardsLayer::scene(1) : GJGarageLayer::scene();\n    v9 = v7;\n    if ( v7 )\n    {\n      v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);\n      if ( cocos2d::CCDirector::replaceScene(v10, v9) )\n      {\n        a1->setKeypadEnabled(a1, 0);\n        v9->addChild_0(v9, a1, 1000);\n        cocos2d::CCObject::release(a1);\n        v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);\n        cocos2d::CCDirector::getWinSize(v12);\n        cocos2d::CCPoint::CCPoint(v2, 0.0);\n        v14 = cocos2d::CCMoveTo::create(0.30000001, v13);\n        v15 = cocos2d::CCEaseIn::create(v14, 2.0);\n        v16 = cocos2d::CCCallFunc::create(a1, sub_14003BE70);\n        v17 = cocos2d::CCSequence::create(v15, v16, 0);\n        cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v17, v18, v3, v21[0]);\n        if ( a1->m_type )\n        {\n          HIBYTE(v21[3]) = 0;\n          v22 = 14;\n          v23 = 15;\n          strcpy((char *)v21, \"secretLoop.mp3\");\n          if ( !qword_1406C2ED8 )\n          {\n            v25 = operator new(0x668u);\n            qword_1406C2ED8 = sub_14017AB00((__int64)v25);\n            (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n          }\n          GameManager::fadeInMusic(v19, (__int64)v21);\n        }\n        else\n        {\n          v20 = (GameManager *)qword_1406C2ED8;\n          if ( !qword_1406C2ED8 )\n          {\n            v24 = operator new(0x668u);\n            qword_1406C2ED8 = sub_14017AB00((__int64)v24);\n            (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n            v20 = (GameManager *)qword_1406C2ED8;\n          }\n          GameManager::fadeInMenuMusic(v20);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJShopLayer::onBack from 0x1402acd70 to 0x1402acf8c (540 bytes)\n; \n; 3 xrefs:\n; > GJShopLayer::keyBackClicked @ 0x1402acf99\n; > GJShopLayer::init @ 0x1402aaa73\n; > <???> @ 0x1406d2264\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, 0x1402acd70\npush    rdi                                                            ; +0x5, 0x1402acd75\nsub     rsp, 40h                                                       ; +0x6, 0x1402acd76\nmov     rdi, rcx                                                       ; +0xa, 0x1402acd7a\ncmp     byte ptr [rcx+1B0h], 0                                         ; +0xd, 0x1402acd7d\njnz     loc_1402ACF81                                                  ; +0x14, 0x1402acd84\nmov     byte ptr [rcx+1B0h], 1                                         ; +0x1a, 0x1402acd8a\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x21, 0x1402acd91\nmov     rdx, [rax]                                                     ; +0x27, 0x1402acd97\nmov     rcx, rax                                                       ; +0x2a, 0x1402acd9a\ncall    qword ptr [rdx+90h]                                            ; +0x2d, 0x1402acd9d\nmov     rcx, rax                                                       ; +0x33, 0x1402acda3\nmov     rdx, rdi                                                       ; +0x36, 0x1402acda6\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x39, 0x1402acda9\nmov     rcx, rdi                                                       ; +0x3f, 0x1402acdaf\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x42, 0x1402acdb2\nmov     rax, [rdi]                                                     ; +0x48, 0x1402acdb8\nmov     rcx, rdi                                                       ; +0x4b, 0x1402acdbb\ncall    qword ptr [rax+1F0h]                                           ; +0x4e, 0x1402acdbe\ncmp     dword ptr [rdi+1C8h], 0                                        ; +0x54, 0x1402acdc4\njz      short loc_1402ACDD6                                            ; +0x5b, 0x1402acdcb\nmov     cl, 1                                                          ; +0x5d, 0x1402acdcd\ncall    SecretRewardsLayer__scene                                      ; +0x5f, 0x1402acdcf\njmp     short loc_1402ACDDB                                            ; +0x64, 0x1402acdd4\ncall    GJGarageLayer__scene                                           ; +0x66, 0x1402acdd6\nmov     rbx, rax                                                       ; +0x6b, 0x1402acddb\ntest    rax, rax                                                       ; +0x6e, 0x1402acdde\njz      loc_1402ACF81                                                  ; +0x71, 0x1402acde1\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x77, 0x1402acde7\nmov     rcx, rax                                                       ; +0x7d, 0x1402acded\nmov     rdx, rbx                                                       ; +0x80, 0x1402acdf0\ncall    cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x83, 0x1402acdf3\ntest    al, al                                                         ; +0x89, 0x1402acdf9\njz      loc_1402ACF81                                                  ; +0x8b, 0x1402acdfb\nmov     rax, [rdi]                                                     ; +0x91, 0x1402ace01\nxor     edx, edx                                                       ; +0x94, 0x1402ace04\nmov     rcx, rdi                                                       ; +0x96, 0x1402ace06\ncall    qword ptr [rax+3D0h]                                           ; +0x99, 0x1402ace09\nmov     rax, [rbx]                                                     ; +0x9f, 0x1402ace0f\nmov     r8d, 3E8h                                                      ; +0xa2, 0x1402ace12\nmov     rdx, rdi                                                       ; +0xa8, 0x1402ace18\nmov     rcx, rbx                                                       ; +0xab, 0x1402ace1b\ncall    qword ptr [rax+1B8h]                                           ; +0xae, 0x1402ace1e\nmov     rcx, rdi                                                       ; +0xb4, 0x1402ace24\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xb7, 0x1402ace27\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xbd, 0x1402ace2d\nmov     rcx, rax                                                       ; +0xc3, 0x1402ace33\nlea     rdx, [rsp+48h+arg_0]                                           ; +0xc6, 0x1402ace36\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xcb, 0x1402ace3b\nmovss   xmm2, [rsp+48h+arg_4]                                          ; +0xd1, 0x1402ace41\nxorps   xmm1, xmm1                                                     ; +0xd7, 0x1402ace47\nlea     rcx, [rsp+48h+arg_10]                                          ; +0xda, 0x1402ace4a\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xdf, 0x1402ace4f\nmov     rdx, rax                                                       ; +0xe5, 0x1402ace55\nmovss   xmm0, cs:dword_140622AA0                                       ; +0xe8, 0x1402ace58\ncall    cs:?create@CCMoveTo@cocos2d@@SAPEAV12@MAEBVCCPoint@2@@Z; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const &) ; +0xf0, 0x1402ace60\nmovss   xmm1, cs:width                                                 ; +0xf6, 0x1402ace66\nmov     rcx, rax                                                       ; +0xfe, 0x1402ace6e\ncall    cs:?create@CCEaseIn@cocos2d@@SAPEAV12@PEAVCCActionInterval@2@M@Z; cocos2d::CCEaseIn::create(cocos2d::CCActionInterval *,float) ; +0x101, 0x1402ace71\nmov     rbx, rax                                                       ; +0x107, 0x1402ace77\nlea     rdx, sub_14003BE70                                             ; +0x10a, 0x1402ace7a\nmov     rcx, rdi                                                       ; +0x111, 0x1402ace81\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x114, 0x1402ace84\nxor     r8d, r8d                                                       ; +0x11a, 0x1402ace8a\nmov     rdx, rax                                                       ; +0x11d, 0x1402ace8d\nmov     rcx, rbx                                                       ; +0x120, 0x1402ace90\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x123, 0x1402ace93\nmov     rdx, rax                                                       ; +0x129, 0x1402ace99\nmov     rcx, rdi                                                       ; +0x12c, 0x1402ace9c\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x12f, 0x1402ace9f\ncmp     dword ptr [rdi+1C8h], 0                                        ; +0x135, 0x1402acea5\njz      loc_1402ACF41                                                  ; +0x13c, 0x1402aceac\nlea     rax, [rsp+48h+var_28]                                          ; +0x142, 0x1402aceb2\nmov     [rsp+48h+arg_10], rax                                          ; +0x147, 0x1402aceb7\nmov     word ptr [rsp+48h+var_28+0Eh], 0                               ; +0x14c, 0x1402acebc\nmov     [rsp+48h+var_18], 0Eh                                          ; +0x153, 0x1402acec3\nmov     [rsp+48h+var_10], 0Fh                                          ; +0x15c, 0x1402acecc\nmovsd   xmm0, cs:qword_14057D7B0                                       ; +0x165, 0x1402aced5\nmovsd   qword ptr [rsp+48h+var_28], xmm0                               ; +0x16d, 0x1402acedd\nmov     eax, cs:dword_14057D7B8                                        ; +0x173, 0x1402acee3\nmov     dword ptr [rsp+48h+var_28+8], eax                              ; +0x179, 0x1402acee9\nmovzx   eax, cs:word_14057D7BC                                         ; +0x17d, 0x1402aceed\nmov     word ptr [rsp+48h+var_28+0Ch], ax                              ; +0x184, 0x1402acef4\ncmp     cs:qword_1406C2ED8, 0                                          ; +0x189, 0x1402acef9\njnz     short loc_1402ACF2C                                            ; +0x191, 0x1402acf01\nmov     ecx, 668h; Size                                                ; +0x193, 0x1402acf03\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x198, 0x1402acf08\nmov     [rsp+48h+arg_18], rax                                          ; +0x19d, 0x1402acf0d\nmov     rcx, rax                                                       ; +0x1a2, 0x1402acf12\ncall    sub_14017AB00                                                  ; +0x1a5, 0x1402acf15\nnop                                                                    ; +0x1aa, 0x1402acf1a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x1ab, 0x1402acf1b\nmov     rdx, [rax]                                                     ; +0x1b2, 0x1402acf22\nmov     rcx, rax                                                       ; +0x1b5, 0x1402acf25\ncall    qword ptr [rdx+48h]                                            ; +0x1b8, 0x1402acf28\nnop                                                                    ; +0x1bb, 0x1402acf2b\nlea     rdx, [rsp+48h+var_28]                                          ; +0x1bc, 0x1402acf2c\ncall    GameManager__fadeInMusic                                       ; +0x1c1, 0x1402acf31\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x1c6, 0x1402acf36\nadd     rsp, 40h                                                       ; +0x1cb, 0x1402acf3b\npop     rdi                                                            ; +0x1cf, 0x1402acf3f\nretn                                                                   ; +0x1d0, 0x1402acf40\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1d1, 0x1402acf41\ntest    rcx, rcx                                                       ; +0x1d8, 0x1402acf48\njnz     short loc_1402ACF7C                                            ; +0x1db, 0x1402acf4b\nmov     ecx, 668h; Size                                                ; +0x1dd, 0x1402acf4d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e2, 0x1402acf52\nmov     [rsp+48h+arg_10], rax                                          ; +0x1e7, 0x1402acf57\nmov     rcx, rax                                                       ; +0x1ec, 0x1402acf5c\ncall    sub_14017AB00                                                  ; +0x1ef, 0x1402acf5f\nnop                                                                    ; +0x1f4, 0x1402acf64\nmov     cs:qword_1406C2ED8, rax                                        ; +0x1f5, 0x1402acf65\nmov     rdx, [rax]                                                     ; +0x1fc, 0x1402acf6c\nmov     rcx, rax                                                       ; +0x1ff, 0x1402acf6f\ncall    qword ptr [rdx+48h]                                            ; +0x202, 0x1402acf72\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x205, 0x1402acf75\ncall    GameManager__fadeInMenuMusic                                   ; +0x20c, 0x1402acf7c\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x211, 0x1402acf81\nadd     rsp, 40h                                                       ; +0x216, 0x1402acf86\npop     rdi                                                            ; +0x21a, 0x1402acf8a\nretn                                                                   ; +0x21b, 0x1402acf8b", "xrefs": ["GJShopLayer::keyBackClicked @ 0x1402acf99", "GJShopLayer::init @ 0x1402aaa73", "<???> @ 0x1406d2264"], "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"}