{"type": "func", "start": 4296332732, "end": 4296333120, "name": "GJShopLayer::dialogClosed", "pseudocode": "// \n// GJShopLayer::dialogClosed from 0x10014d5bc to 0x10014d740 (388 bytes)\n// \n// 2 xrefs:\n// > sub_10014D774 @ 0x10014d778\n// > <???> @ 0x100798d28\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\nvoid __fastcall GJShopLayer::dialogClosed(GJShopLayer *a1, DialogLayer *a2)\n{\n  FMODAudioEngine *v4; // x20\n  cocos2d::CCLayerColor *v5; // x0\n  FMODAudioEngine *v6; // x0\n  cocos2d::CCDirector *v7; // x0\n  cocos2d::CCTouchDispatcher *v8; // x0\n  cocos2d::CCDirector *v9; // x19\n  cocos2d::CCScene *v10; // x0\n  cocos2d::CCTransitionFade *v11; // x0\n  GameStatsManager *v12; // x20\n  __int64 v13; // x20\n  RewardUnlockLayer *v14; // x21\n  void *v15[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v16; // [xsp+1Fh] [xbp-41h]\n  int v17; // [xsp+24h] [xbp-3Ch] BYREF\n  void *__p[2]; // [xsp+28h] [xbp-38h] BYREF\n  char v19; // [xsp+3Fh] [xbp-21h]\n\n  if ( ((unsigned int (__fastcall *)(DialogLayer *))a2->getTag)(a2) == 1 )\n  {\n    v4 = FMODAudioEngine::sharedEngine();\n    sub_100009900(__p, \"door001.ogg\");\n    FMODAudioEngine::playEffect((__int64)v4, (__int64)__p, 1.0, 0.0, 0.8);\n    if ( v19 < 0 )\n      operator delete(__p[0]);\n    v17 = -16777216;\n    v5 = cocos2d::CCLayerColor::create_1((const cocos2d::ccColor4B *)&v17);\n    ((void (__fastcall *)(GJShopLayer *, cocos2d::CCLayerColor *, __int64))a1->addChild_0)(a1, v5, 1000);\n    v6 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::stopAllMusic(v6, 1);\n    v7 = cocos2d::CCDirector::sharedDirector();\n    v8 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v7->getTouchDispatcher)(v7);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v8, a1);\n    v9 = cocos2d::CCDirector::sharedDirector();\n    v10 = GJGarageLayer::scene();\n    v11 = cocos2d::CCTransitionFade::create_1(1.0, v10);\n    cocos2d::CCDirector::replaceScene(v9, v11);\n  }\n  else if ( ((unsigned int (__fastcall *)(DialogLayer *))a2->getTag)(a2) == 2 )\n  {\n    v12 = GameStatsManager::sharedState();\n    sub_100009900(v15, \"0022\");\n    v13 = GameStatsManager::unlockSpecialChest(v12, v15);\n    if ( v16 < 0 )\n      operator delete(v15[0]);\n    if ( v13 )\n    {\n      v14 = RewardUnlockLayer::create(*(_DWORD *)(v13 + 64), nullptr);\n      ((void (__fastcall *)(GJShopLayer *, RewardUnlockLayer *, __int64))a1->addChild_0)(a1, v14, 100);\n      RewardUnlockLayer::showCollectReward(v14, (GJRewardItem *)v13);\n    }\n  }\n}", "assembly": "; \n; GJShopLayer::dialogClosed from 0x10014d5bc to 0x10014d740 (388 bytes)\n; \n; 2 xrefs:\n; > sub_10014D774 @ 0x10014d778\n; > <???> @ 0x100798d28\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x10014d5bc\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x10014d5c0\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x10014d5c4\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x10014d5c8\nADD             X29, SP, #0x60                                         ; +0x10, 0x10014d5cc\nMOV             X20, X1                                                ; +0x14, 0x10014d5d0\nMOV             X19, X0                                                ; +0x18, 0x10014d5d4\nLDR             X8, [X1]                                               ; +0x1c, 0x10014d5d8\nLDR             X8, [X8,#0x40]                                         ; +0x20, 0x10014d5dc\nMOV             X0, X1                                                 ; +0x24, 0x10014d5e0\nBLR             X8                                                     ; +0x28, 0x10014d5e4\nCMP             W0, #1                                                 ; +0x2c, 0x10014d5e8\nB.NE            loc_10014D6A4                                          ; +0x30, 0x10014d5ec\nBL              FMODAudioEngine__sharedEngine                          ; +0x34, 0x10014d5f0\nMOV             X20, X0                                                ; +0x38, 0x10014d5f4\nADRL            X1, aDoor001Ogg; \"door001.ogg\"                         ; +0x3c, 0x10014d5f8\nADD             X0, SP, #0x60+__p; int                                 ; +0x44, 0x10014d600\nBL              sub_100009900                                          ; +0x48, 0x10014d604\nADRP            X8, #dword_100635340@PAGE                              ; +0x4c, 0x10014d608\nLDR             S2, [X8,#dword_100635340@PAGEOFF]                      ; +0x50, 0x10014d60c\nADD             X1, SP, #0x60+__p                                      ; +0x54, 0x10014d610\nFMOV            S0, #1.0                                               ; +0x58, 0x10014d614\nFMOV            S1, WZR                                                ; +0x5c, 0x10014d618\nMOV             X0, X20                                                ; +0x60, 0x10014d61c\nBL              FMODAudioEngine__playEffect                            ; +0x64, 0x10014d620\nLDRSB           W8, [SP,#0x60+var_21]                                  ; +0x68, 0x10014d624\nTBZ             W8, #0x1F, loc_10014D634                               ; +0x6c, 0x10014d628\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x70, 0x10014d62c\nBL              __ZdlPv; operator delete(void *)                       ; +0x74, 0x10014d630\nMOV             W8, #0xFF000000                                        ; +0x78, 0x10014d634\nSTR             W8, [SP,#0x60+var_3C]                                  ; +0x7c, 0x10014d638\nADD             X0, SP, #0x60+var_3C                                   ; +0x80, 0x10014d63c\nBL              cocos2d__CCLayerColor__create_1                        ; +0x84, 0x10014d640\nMOV             X1, X0                                                 ; +0x88, 0x10014d644\nLDR             X8, [X19]                                              ; +0x8c, 0x10014d648\nLDR             X8, [X8,#0x1C0]                                        ; +0x90, 0x10014d64c\nMOV             X0, X19                                                ; +0x94, 0x10014d650\nMOV             W2, #0x3E8                                             ; +0x98, 0x10014d654\nBLR             X8                                                     ; +0x9c, 0x10014d658\nBL              FMODAudioEngine__sharedEngine                          ; +0xa0, 0x10014d65c\nMOV             W1, #1                                                 ; +0xa4, 0x10014d660\nBL              FMODAudioEngine__stopAllMusic                          ; +0xa8, 0x10014d664\nBL              cocos2d__CCDirector__sharedDirector                    ; +0xac, 0x10014d668\nLDR             X8, [X0]                                               ; +0xb0, 0x10014d66c\nLDR             X8, [X8,#0xA0]                                         ; +0xb4, 0x10014d670\nBLR             X8                                                     ; +0xb8, 0x10014d674\nMOV             X1, X19                                                ; +0xbc, 0x10014d678\nBL              cocos2d__CCTouchDispatcher__unregisterForcePrio        ; +0xc0, 0x10014d67c\nBL              cocos2d__CCDirector__sharedDirector                    ; +0xc4, 0x10014d680\nMOV             X19, X0                                                ; +0xc8, 0x10014d684\nBL              GJGarageLayer__scene                                   ; +0xcc, 0x10014d688\nFMOV            S0, #1.0                                               ; +0xd0, 0x10014d68c\nBL              cocos2d__CCTransitionFade__create_1                    ; +0xd4, 0x10014d690\nMOV             X1, X0; lpsrc                                          ; +0xd8, 0x10014d694\nMOV             X0, X19; int                                           ; +0xdc, 0x10014d698\nBL              cocos2d__CCDirector__replaceScene                      ; +0xe0, 0x10014d69c\nB               loc_10014D72C                                          ; +0xe4, 0x10014d6a0\nLDR             X8, [X20]                                              ; +0xe8, 0x10014d6a4\nLDR             X8, [X8,#0x40]                                         ; +0xec, 0x10014d6a8\nMOV             X0, X20                                                ; +0xf0, 0x10014d6ac\nBLR             X8                                                     ; +0xf4, 0x10014d6b0\nCMP             W0, #2                                                 ; +0xf8, 0x10014d6b4\nB.NE            loc_10014D72C                                          ; +0xfc, 0x10014d6b8\nBL              GameStatsManager__sharedState                          ; +0x100, 0x10014d6bc\nMOV             X20, X0                                                ; +0x104, 0x10014d6c0\nADRL            X1, a0022; \"0022\"                                      ; +0x108, 0x10014d6c4\nADD             X0, SP, #0x60+var_58; int                              ; +0x110, 0x10014d6cc\nBL              sub_100009900                                          ; +0x114, 0x10014d6d0\nADD             X1, SP, #0x60+var_58                                   ; +0x118, 0x10014d6d4\nMOV             X0, X20                                                ; +0x11c, 0x10014d6d8\nBL              GameStatsManager__unlockSpecialChest                   ; +0x120, 0x10014d6dc\nMOV             X20, X0                                                ; +0x124, 0x10014d6e0\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x128, 0x10014d6e4\nTBZ             W8, #0x1F, loc_10014D6F4                               ; +0x12c, 0x10014d6e8\nLDR             X0, [SP,#0x60+var_58]; __p                             ; +0x130, 0x10014d6ec\nBL              __ZdlPv; operator delete(void *)                       ; +0x134, 0x10014d6f0\nCBZ             X20, loc_10014D72C                                     ; +0x138, 0x10014d6f4\nLDR             W0, [X20,#0x40]                                        ; +0x13c, 0x10014d6f8\nMOV             X1, #0                                                 ; +0x140, 0x10014d6fc\nBL              RewardUnlockLayer__create                              ; +0x144, 0x10014d700\nMOV             X21, X0                                                ; +0x148, 0x10014d704\nLDR             X8, [X19]                                              ; +0x14c, 0x10014d708\nLDR             X8, [X8,#0x1C0]                                        ; +0x150, 0x10014d70c\nMOV             X0, X19                                                ; +0x154, 0x10014d710\nMOV             X1, X21                                                ; +0x158, 0x10014d714\nMOV             W2, #0x64 ; 'd'                                        ; +0x15c, 0x10014d718\nBLR             X8                                                     ; +0x160, 0x10014d71c\nMOV             X0, X21                                                ; +0x164, 0x10014d720\nMOV             X1, X20                                                ; +0x168, 0x10014d724\nBL              RewardUnlockLayer__showCollectReward                   ; +0x16c, 0x10014d728\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x170, 0x10014d72c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x174, 0x10014d730\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x178, 0x10014d734\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x17c, 0x10014d738\nRET                                                                    ; +0x180, 0x10014d73c", "xrefs": ["sub_10014D774 @ 0x10014d778", "<???> @ 0x100798d28"], "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"}