{"type": "func", "start": 5372738592, "end": 5372739062, "name": "SecretRewardsLayer::onBack", "pseudocode": "// \n// SecretRewardsLayer::onBack from 0x1403d7c20 to 0x1403d7df6 (470 bytes)\n// \n// 3 xrefs:\n// > SecretRewardsLayer::keyBackClicked @ 0x1403d7e09\n// > SecretRewardsLayer::init @ 0x1403d2b7a\n// > <???> @ 0x1406d7dd8\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=1\nvoid SecretRewardsLayer::onBack(SecretRewardsLayer *a1, cocos2d::CCObject *a2)\n{\n  float v2; // xmm3_4\n  cocos2d::CCDirector *v4; // rax\n  __int64 v5; // rdx\n  float v6; // xmm0_4\n  const struct cocos2d::CCPoint *v7; // rax\n  struct cocos2d::CCMoveTo *v8; // rax\n  struct cocos2d::CCEaseInOut *v9; // rax\n  cocos2d::ccColor3B *v10; // r8\n  float v11; // xmm0_4\n  const struct cocos2d::CCPoint *v12; // rax\n  struct cocos2d::CCMoveTo *v13; // rax\n  struct cocos2d::CCEaseInOut *v14; // rbx\n  __int64 v15; // rax\n  struct cocos2d::CCSequence *v16; // rax\n  cocos2d::ccColor3B *v17; // r8\n  GameManager *v18; // rcx\n  struct cocos2d::CCScene *v19; // rax\n  struct cocos2d::CCTransitionFade *v20; // rbx\n  __int64 v21; // rcx\n  cocos2d::CCDirector *v22; // rax\n  float v23; // [rsp+20h] [rbp-8h]\n  float v24; // [rsp+20h] [rbp-8h]\n  void *v25; // [rsp+30h] [rbp+8h]\n\n  if ( a1->m_inMainLayer )\n  {\n    v18 = (GameManager *)qword_1406C2ED8;\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      v18 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::fadeInMenuMusic(v18);\n    a1->setKeypadEnabled(a1, 0);\n    v19 = CreatorLayer::scene();\n    v20 = cocos2d::CCTransitionFade::create(0.5, v19);\n    v22 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v21);\n    cocos2d::CCDirector::replaceScene(v22, v20);\n  }\n  else\n  {\n    a1->m_inMainLayer = 1;\n    v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n    cocos2d::CCDirector::getWinSize(v4);\n    LOBYTE(v5) = 1;\n    v6 = ((float (__fastcall *)(BoomScrollLayer *, __int64))a1->m_mainScrollLayer->setTouchEnabled)(\n           a1->m_mainScrollLayer,\n           v5);\n    cocos2d::CCPoint::CCPoint(v6, 0.0);\n    v8 = cocos2d::CCMoveTo::create(0.40000001, v7);\n    v9 = cocos2d::CCEaseInOut::create(v8, 2.0);\n    cocos2d::CCNode::runAction((CCLightFlash *)a1->m_mainLayer, (cocos2d::CCPoint)v9, v10, v2, v23);\n    if ( a1->m_secondaryLayer )\n    {\n      v11 = ((float (__fastcall *)(BoomScrollLayer *, _QWORD))a1->m_secondaryScrollLayer->setTouchEnabled)(\n              a1->m_secondaryScrollLayer,\n              0);\n      a1->m_secondaryScrollLayer = nullptr;\n      a1->m_chestCounter = nullptr;\n      cocos2d::CCPoint::CCPoint(v11, 0.0);\n      v13 = cocos2d::CCMoveTo::create(0.40000001, v12);\n      v14 = cocos2d::CCEaseInOut::create(v13, 2.0);\n      v15 = cocos2d::CCCallFunc::create(a1->m_secondaryLayer, sub_14003BE70);\n      v16 = cocos2d::CCSequence::create(v14, v15, 0);\n      cocos2d::CCNode::runAction((CCLightFlash *)a1->m_secondaryLayer, (cocos2d::CCPoint)v16, v17, v2, v24);\n      a1->m_secondaryLayer = nullptr;\n    }\n    SecretRewardsLayer::updateBackButton(a1);\n  }\n}", "assembly": "; \n; SecretRewardsLayer::onBack from 0x1403d7c20 to 0x1403d7df6 (470 bytes)\n; \n; 3 xrefs:\n; > SecretRewardsLayer::keyBackClicked @ 0x1403d7e09\n; > SecretRewardsLayer::init @ 0x1403d2b7a\n; > <???> @ 0x1406d7dd8\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, 0x1403d7c20\npush    rdi                                                            ; +0x5, 0x1403d7c25\nsub     rsp, 20h                                                       ; +0x6, 0x1403d7c26\nmov     rdi, rcx                                                       ; +0xa, 0x1403d7c2a\ncmp     byte ptr [rcx+248h], 0                                         ; +0xd, 0x1403d7c2d\njnz     loc_1403D7D72                                                  ; +0x14, 0x1403d7c34\nmov     byte ptr [rcx+248h], 1                                         ; +0x1a, 0x1403d7c3a\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x21, 0x1403d7c41\nmov     rcx, rax                                                       ; +0x27, 0x1403d7c47\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x2a, 0x1403d7c4a\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x2f, 0x1403d7c4f\nmov     rcx, [rdi+220h]                                                ; +0x35, 0x1403d7c55\nmov     rax, [rcx]                                                     ; +0x3c, 0x1403d7c5c\nmov     dl, 1                                                          ; +0x3f, 0x1403d7c5f\ncall    qword ptr [rax+388h]                                           ; +0x41, 0x1403d7c61\nxorps   xmm2, xmm2                                                     ; +0x47, 0x1403d7c67\nxorps   xmm1, xmm1                                                     ; +0x4a, 0x1403d7c6a\nlea     rcx, [rsp+28h+arg_10]                                          ; +0x4d, 0x1403d7c6d\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x52, 0x1403d7c72\nmov     rdx, rax                                                       ; +0x58, 0x1403d7c78\nmovss   xmm0, cs:dword_140622AD0                                       ; +0x5b, 0x1403d7c7b\ncall    cs:?create@CCMoveTo@cocos2d@@SAPEAV12@MAEBVCCPoint@2@@Z; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const &) ; +0x63, 0x1403d7c83\nmovss   xmm1, cs:width                                                 ; +0x69, 0x1403d7c89\nmov     rcx, rax                                                       ; +0x71, 0x1403d7c91\ncall    cs:?create@CCEaseInOut@cocos2d@@SAPEAV12@PEAVCCActionInterval@2@M@Z; cocos2d::CCEaseInOut::create(cocos2d::CCActionInterval *,float) ; +0x74, 0x1403d7c94\nmov     rdx, rax                                                       ; +0x7a, 0x1403d7c9a\nmov     rcx, [rdi+1A8h]                                                ; +0x7d, 0x1403d7c9d\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x84, 0x1403d7ca4\ncmp     qword ptr [rdi+1B0h], 0                                        ; +0x8a, 0x1403d7caa\njz      loc_1403D7D5F                                                  ; +0x92, 0x1403d7cb2\nmov     rcx, [rdi+228h]                                                ; +0x98, 0x1403d7cb8\nmov     rax, [rcx]                                                     ; +0x9f, 0x1403d7cbf\nxor     edx, edx                                                       ; +0xa2, 0x1403d7cc2\ncall    qword ptr [rax+388h]                                           ; +0xa4, 0x1403d7cc4\nmov     qword ptr [rdi+228h], 0                                        ; +0xaa, 0x1403d7cca\nmov     qword ptr [rdi+1C0h], 0                                        ; +0xb5, 0x1403d7cd5\nmovss   xmm2, dword ptr [rsp+28h+arg_0+4]                              ; +0xc0, 0x1403d7ce0\naddss   xmm2, cs:dword_1406231E0                                       ; +0xc6, 0x1403d7ce6\nxorps   xmm1, xmm1                                                     ; +0xce, 0x1403d7cee\nlea     rcx, [rsp+28h+arg_10]                                          ; +0xd1, 0x1403d7cf1\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd6, 0x1403d7cf6\nmov     rdx, rax                                                       ; +0xdc, 0x1403d7cfc\nmovss   xmm0, cs:dword_140622AD0                                       ; +0xdf, 0x1403d7cff\ncall    cs:?create@CCMoveTo@cocos2d@@SAPEAV12@MAEBVCCPoint@2@@Z; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const &) ; +0xe7, 0x1403d7d07\nmovss   xmm1, cs:width                                                 ; +0xed, 0x1403d7d0d\nmov     rcx, rax                                                       ; +0xf5, 0x1403d7d15\ncall    cs:?create@CCEaseInOut@cocos2d@@SAPEAV12@PEAVCCActionInterval@2@M@Z; cocos2d::CCEaseInOut::create(cocos2d::CCActionInterval *,float) ; +0xf8, 0x1403d7d18\nmov     rbx, rax                                                       ; +0xfe, 0x1403d7d1e\nlea     rdx, sub_14003BE70                                             ; +0x101, 0x1403d7d21\nmov     rcx, [rdi+1B0h]                                                ; +0x108, 0x1403d7d28\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x10f, 0x1403d7d2f\nxor     r8d, r8d                                                       ; +0x115, 0x1403d7d35\nmov     rdx, rax                                                       ; +0x118, 0x1403d7d38\nmov     rcx, rbx                                                       ; +0x11b, 0x1403d7d3b\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x11e, 0x1403d7d3e\nmov     rdx, rax                                                       ; +0x124, 0x1403d7d44\nmov     rcx, [rdi+1B0h]                                                ; +0x127, 0x1403d7d47\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x12e, 0x1403d7d4e\nmov     qword ptr [rdi+1B0h], 0                                        ; +0x134, 0x1403d7d54\nmov     rcx, rdi                                                       ; +0x13f, 0x1403d7d5f\ncall    SecretRewardsLayer__updateBackButton                           ; +0x142, 0x1403d7d62\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x147, 0x1403d7d67\nadd     rsp, 20h                                                       ; +0x14c, 0x1403d7d6c\npop     rdi                                                            ; +0x150, 0x1403d7d70\nretn                                                                   ; +0x151, 0x1403d7d71\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x152, 0x1403d7d72\ntest    rcx, rcx                                                       ; +0x159, 0x1403d7d79\njnz     short loc_1403D7DAD                                            ; +0x15c, 0x1403d7d7c\nmov     ecx, 668h; Size                                                ; +0x15e, 0x1403d7d7e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x163, 0x1403d7d83\nmov     [rsp+28h+arg_0], rax                                           ; +0x168, 0x1403d7d88\nmov     rcx, rax                                                       ; +0x16d, 0x1403d7d8d\ncall    sub_14017AB00                                                  ; +0x170, 0x1403d7d90\nnop                                                                    ; +0x175, 0x1403d7d95\nmov     cs:qword_1406C2ED8, rax                                        ; +0x176, 0x1403d7d96\nmov     rdx, [rax]                                                     ; +0x17d, 0x1403d7d9d\nmov     rcx, rax                                                       ; +0x180, 0x1403d7da0\ncall    qword ptr [rdx+48h]                                            ; +0x183, 0x1403d7da3\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x186, 0x1403d7da6\ncall    GameManager__fadeInMenuMusic                                   ; +0x18d, 0x1403d7dad\nmov     rax, [rdi]                                                     ; +0x192, 0x1403d7db2\nxor     edx, edx                                                       ; +0x195, 0x1403d7db5\nmov     rcx, rdi                                                       ; +0x197, 0x1403d7db7\ncall    qword ptr [rax+3D0h]                                           ; +0x19a, 0x1403d7dba\ncall    CreatorLayer__scene                                            ; +0x1a0, 0x1403d7dc0\nmov     rdx, rax                                                       ; +0x1a5, 0x1403d7dc5\nmovss   xmm0, cs:dword_140622B08                                       ; +0x1a8, 0x1403d7dc8\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x1b0, 0x1403d7dd0\nmov     rbx, rax                                                       ; +0x1b6, 0x1403d7dd6\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1b9, 0x1403d7dd9\nmov     rcx, rax                                                       ; +0x1bf, 0x1403d7ddf\nmov     rdx, rbx                                                       ; +0x1c2, 0x1403d7de2\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x1c5, 0x1403d7de5\nadd     rsp, 20h                                                       ; +0x1ca, 0x1403d7dea\npop     rdi                                                            ; +0x1ce, 0x1403d7dee\njmp     cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x1cf, 0x1403d7def", "xrefs": ["SecretRewardsLayer::keyBackClicked @ 0x1403d7e09", "SecretRewardsLayer::init @ 0x1403d2b7a", "<???> @ 0x1406d7dd8"], "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"}