{"type": "func", "start": 5372733664, "end": 5372734148, "name": "SecretRewardsLayer::dialogClosed", "pseudocode": "// \n// SecretRewardsLayer::dialogClosed from 0x1403d68e0 to 0x1403d6ac4 (484 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405cf7c0\n// > <???> @ 0x1406d7d54\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=4\nvoid SecretRewardsLayer::dialogClosed(SecretRewardsLayer *a1, DialogLayer *a2)\n{\n  GameManager *v4; // rcx\n  ShopType v5; // ecx\n  GameManager *v6; // rcx\n  GameManager *v7; // rcx\n  GameManager *v8; // rcx\n  struct cocos2d::CCScene *v9; // rax\n  struct cocos2d::CCTransitionMoveInT *v10; // rbx\n  __int64 v11; // rcx\n  cocos2d::CCDirector *v12; // rax\n  char v13; // al\n  void *v14; // [rsp+38h] [rbp+10h]\n  void *v15; // [rsp+38h] [rbp+10h]\n  void *v16; // [rsp+38h] [rbp+10h]\n  void *v17; // [rsp+38h] [rbp+10h]\n\n  if ( a2->getTag(a2) == 2 )\n  {\n    v4 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v14 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::setUGV(v4, (const char *)&word_140544448, 1);\n    v5 = Community;\n  }\n  else if ( a2->getTag(a2) == 1 )\n  {\n    v6 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v15 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v6 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::setUGV(v6, \"11\", 1);\n    v5 = Secret;\n  }\n  else if ( a2->getTag(a2) == 3 )\n  {\n    v7 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v16 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v16);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v7 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::setUGV(v7, \"34\", 1);\n    v5 = Diamond;\n  }\n  else\n  {\n    if ( a2->getTag(a2) != 4 )\n      return;\n    v8 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v17 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v8 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::setUGV(v8, (const char *)&word_14055A64C, 1);\n    v5 = Mechanic;\n  }\n  v9 = GJShopLayer::scene(v5);\n  v10 = cocos2d::CCTransitionMoveInT::create(0.5, v9);\n  v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);\n  cocos2d::CCDirector::replaceScene(v12, v10);\n  if ( v13 )\n    (*(void (__fastcall **)(cocos2d::CCCamera **, _QWORD))&a1[-1].m_pCamera[6].m_nTag)(&a1[-1].m_pCamera, 0);\n}", "assembly": "; \n; SecretRewardsLayer::dialogClosed from 0x1403d68e0 to 0x1403d6ac4 (484 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405cf7c0\n; > <???> @ 0x1406d7d54\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_0], rbx                                               ; +0x0, 0x1403d68e0\npush    rdi                                                            ; +0x5, 0x1403d68e5\nsub     rsp, 20h                                                       ; +0x6, 0x1403d68e6\nmov     rbx, rdx                                                       ; +0xa, 0x1403d68ea\nmov     rdi, rcx                                                       ; +0xd, 0x1403d68ed\nmov     rax, [rdx]                                                     ; +0x10, 0x1403d68f0\nmov     rcx, rdx                                                       ; +0x13, 0x1403d68f3\ncall    qword ptr [rax+38h]                                            ; +0x16, 0x1403d68f6\ncmp     eax, 2                                                         ; +0x19, 0x1403d68f9\njnz     short loc_1403D6952                                            ; +0x1c, 0x1403d68fc\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1e, 0x1403d68fe\ntest    rcx, rcx                                                       ; +0x25, 0x1403d6905\njnz     short loc_1403D6939                                            ; +0x28, 0x1403d6908\nmov     ecx, 668h; Size                                                ; +0x2a, 0x1403d690a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2f, 0x1403d690f\nmov     [rsp+28h+arg_8], rax                                           ; +0x34, 0x1403d6914\nmov     rcx, rax                                                       ; +0x39, 0x1403d6919\ncall    sub_14017AB00                                                  ; +0x3c, 0x1403d691c\nnop                                                                    ; +0x41, 0x1403d6921\nmov     cs:qword_1406C2ED8, rax                                        ; +0x42, 0x1403d6922\nmov     rdx, [rax]                                                     ; +0x49, 0x1403d6929\nmov     rcx, rax                                                       ; +0x4c, 0x1403d692c\ncall    qword ptr [rdx+48h]                                            ; +0x4f, 0x1403d692f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x52, 0x1403d6932\nmov     r8b, 1                                                         ; +0x59, 0x1403d6939\nlea     rdx, word_140544448                                            ; +0x5c, 0x1403d693c\ncall    GameManager__setUGV                                            ; +0x63, 0x1403d6943\nmov     ecx, 2                                                         ; +0x68, 0x1403d6948\njmp     loc_1403D6A74                                                  ; +0x6d, 0x1403d694d\nmov     rax, [rbx]                                                     ; +0x72, 0x1403d6952\nmov     rcx, rbx                                                       ; +0x75, 0x1403d6955\ncall    qword ptr [rax+38h]                                            ; +0x78, 0x1403d6958\ncmp     eax, 1                                                         ; +0x7b, 0x1403d695b\njnz     short loc_1403D69B4                                            ; +0x7e, 0x1403d695e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x80, 0x1403d6960\ntest    rcx, rcx                                                       ; +0x87, 0x1403d6967\njnz     short loc_1403D699B                                            ; +0x8a, 0x1403d696a\nmov     ecx, 668h; Size                                                ; +0x8c, 0x1403d696c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x91, 0x1403d6971\nmov     [rsp+28h+arg_8], rax                                           ; +0x96, 0x1403d6976\nmov     rcx, rax                                                       ; +0x9b, 0x1403d697b\ncall    sub_14017AB00                                                  ; +0x9e, 0x1403d697e\nnop                                                                    ; +0xa3, 0x1403d6983\nmov     cs:qword_1406C2ED8, rax                                        ; +0xa4, 0x1403d6984\nmov     rdx, [rax]                                                     ; +0xab, 0x1403d698b\nmov     rcx, rax                                                       ; +0xae, 0x1403d698e\ncall    qword ptr [rdx+48h]                                            ; +0xb1, 0x1403d6991\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb4, 0x1403d6994\nmov     r8b, 1                                                         ; +0xbb, 0x1403d699b\nlea     rdx, a11; \"11\"                                                 ; +0xbe, 0x1403d699e\ncall    GameManager__setUGV                                            ; +0xc5, 0x1403d69a5\nmov     ecx, 1                                                         ; +0xca, 0x1403d69aa\njmp     loc_1403D6A74                                                  ; +0xcf, 0x1403d69af\nmov     rax, [rbx]                                                     ; +0xd4, 0x1403d69b4\nmov     rcx, rbx                                                       ; +0xd7, 0x1403d69b7\ncall    qword ptr [rax+38h]                                            ; +0xda, 0x1403d69ba\ncmp     eax, 3                                                         ; +0xdd, 0x1403d69bd\njnz     short loc_1403D6A13                                            ; +0xe0, 0x1403d69c0\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xe2, 0x1403d69c2\ntest    rcx, rcx                                                       ; +0xe9, 0x1403d69c9\njnz     short loc_1403D69FD                                            ; +0xec, 0x1403d69cc\nmov     ecx, 668h; Size                                                ; +0xee, 0x1403d69ce\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xf3, 0x1403d69d3\nmov     [rsp+28h+arg_8], rax                                           ; +0xf8, 0x1403d69d8\nmov     rcx, rax                                                       ; +0xfd, 0x1403d69dd\ncall    sub_14017AB00                                                  ; +0x100, 0x1403d69e0\nnop                                                                    ; +0x105, 0x1403d69e5\nmov     cs:qword_1406C2ED8, rax                                        ; +0x106, 0x1403d69e6\nmov     rdx, [rax]                                                     ; +0x10d, 0x1403d69ed\nmov     rcx, rax                                                       ; +0x110, 0x1403d69f0\ncall    qword ptr [rdx+48h]                                            ; +0x113, 0x1403d69f3\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x116, 0x1403d69f6\nmov     r8b, 1                                                         ; +0x11d, 0x1403d69fd\nlea     rdx, a34; \"34\"                                                 ; +0x120, 0x1403d6a00\ncall    GameManager__setUGV                                            ; +0x127, 0x1403d6a07\nmov     ecx, 4                                                         ; +0x12c, 0x1403d6a0c\njmp     short loc_1403D6A74                                            ; +0x131, 0x1403d6a11\nmov     rax, [rbx]                                                     ; +0x133, 0x1403d6a13\nmov     rcx, rbx                                                       ; +0x136, 0x1403d6a16\ncall    qword ptr [rax+38h]                                            ; +0x139, 0x1403d6a19\ncmp     eax, 4                                                         ; +0x13c, 0x1403d6a1c\njnz     loc_1403D6AB9                                                  ; +0x13f, 0x1403d6a1f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x145, 0x1403d6a25\ntest    rcx, rcx                                                       ; +0x14c, 0x1403d6a2c\njnz     short loc_1403D6A60                                            ; +0x14f, 0x1403d6a2f\nmov     ecx, 668h; Size                                                ; +0x151, 0x1403d6a31\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x156, 0x1403d6a36\nmov     [rsp+28h+arg_8], rax                                           ; +0x15b, 0x1403d6a3b\nmov     rcx, rax                                                       ; +0x160, 0x1403d6a40\ncall    sub_14017AB00                                                  ; +0x163, 0x1403d6a43\nnop                                                                    ; +0x168, 0x1403d6a48\nmov     cs:qword_1406C2ED8, rax                                        ; +0x169, 0x1403d6a49\nmov     rdx, [rax]                                                     ; +0x170, 0x1403d6a50\nmov     rcx, rax                                                       ; +0x173, 0x1403d6a53\ncall    qword ptr [rdx+48h]                                            ; +0x176, 0x1403d6a56\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x179, 0x1403d6a59\nmov     r8b, 1                                                         ; +0x180, 0x1403d6a60\nlea     rdx, word_14055A64C                                            ; +0x183, 0x1403d6a63\ncall    GameManager__setUGV                                            ; +0x18a, 0x1403d6a6a\nmov     ecx, 3                                                         ; +0x18f, 0x1403d6a6f\ncall    GJShopLayer__scene                                             ; +0x194, 0x1403d6a74\nmov     rdx, rax                                                       ; +0x199, 0x1403d6a79\nmovss   xmm0, cs:dword_140622B08                                       ; +0x19c, 0x1403d6a7c\ncall    cs:?create@CCTransitionMoveInT@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionMoveInT::create(float,cocos2d::CCScene *) ; +0x1a4, 0x1403d6a84\nmov     rbx, rax                                                       ; +0x1aa, 0x1403d6a8a\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1ad, 0x1403d6a8d\nmov     rdx, rbx                                                       ; +0x1b3, 0x1403d6a93\nmov     rcx, rax                                                       ; +0x1b6, 0x1403d6a96\ncall    cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x1b9, 0x1403d6a99\ntest    al, al                                                         ; +0x1bf, 0x1403d6a9f\njz      short loc_1403D6AB9                                            ; +0x1c1, 0x1403d6aa1\nmov     rax, [rdi-198h]                                                ; +0x1c3, 0x1403d6aa3\nxor     edx, edx                                                       ; +0x1ca, 0x1403d6aaa\nlea     rcx, [rdi-198h]                                                ; +0x1cc, 0x1403d6aac\ncall    qword ptr [rax+3D0h]                                           ; +0x1d3, 0x1403d6ab3\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1d9, 0x1403d6ab9\nadd     rsp, 20h                                                       ; +0x1de, 0x1403d6abe\npop     rdi                                                            ; +0x1e2, 0x1403d6ac2\nretn                                                                   ; +0x1e3, 0x1403d6ac3", "xrefs": ["<???> @ 0x1405cf7c0", "<???> @ 0x1406d7d54"], "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"}