{"type": "func", "start": 5373193312, "end": 5373193547, "name": "LevelPage::dialogClosed", "pseudocode": "// \n// LevelPage::dialogClosed from 0x140446c60 to 0x140446d4b (235 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407929f0\n// > <???> @ 0x140927218\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:23 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall LevelPage::dialogClosed(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rcx\n  __int64 v5; // rdx\n  __int64 v6; // rcx\n  __int64 *v7; // rdi\n  __int64 v8; // rdi\n  __int64 v9; // rbx\n  cocos2d::CCSpriteFrameCache *v10; // rax\n  struct cocos2d::CCSpriteFrame *v11; // rax\n  void *v12; // [rsp+38h] [rbp+10h]\n\n  if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) == 2 )\n  {\n    v4 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v12 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v4 = qword_14090BFD0;\n    }\n    GameManager::setUGV(v4, &word_14070D038, 1u);\n    v7 = *(__int64 **)(a1 + 160);\n    if ( v7 )\n    {\n      v8 = *v7;\n      v9 = *(_QWORD *)(a1 + 160);\n      v10 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6, v5);\n      v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v10, \"secretDoorBtn2_open_001.png\");\n      (*(void (__fastcall **)(__int64, struct cocos2d::CCSpriteFrame *))(v8 + 1008))(v9, v11);\n    }\n  }\n  else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) == 1 )\n  {\n    LevelPage::onTheTower(a1 - 408);\n  }\n}", "assembly": "; \n; LevelPage::dialogClosed from 0x140446c60 to 0x140446d4b (235 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407929f0\n; > <???> @ 0x140927218\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:23 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140446c60\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140446c65\npush    rdi                                                            ; +0xa, 0x140446c6a\nsub     rsp, 20h                                                       ; +0xb, 0x140446c6b\nmov     rbx, rdx                                                       ; +0xf, 0x140446c6f\nmov     rsi, rcx                                                       ; +0x12, 0x140446c72\nmov     rax, [rdx]                                                     ; +0x15, 0x140446c75\nmov     rcx, rdx                                                       ; +0x18, 0x140446c78\ncall    qword ptr [rax+38h]                                            ; +0x1b, 0x140446c7b\ncmp     eax, 2                                                         ; +0x1e, 0x140446c7e\njnz     loc_140446D1F                                                  ; +0x21, 0x140446c81\nmov     rcx, cs:qword_14090BFD0                                        ; +0x27, 0x140446c87\ntest    rcx, rcx                                                       ; +0x2e, 0x140446c8e\njnz     short loc_140446CC5                                            ; +0x31, 0x140446c91\nmov     ecx, 6E8h; Size                                                ; +0x33, 0x140446c93\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x38, 0x140446c98\nmov     [rsp+28h+arg_8], rax                                           ; +0x3d, 0x140446c9d\nmov     rcx, rax                                                       ; +0x42, 0x140446ca2\ncall    GameManager__GameManager                                       ; +0x45, 0x140446ca5\nnop                                                                    ; +0x4a, 0x140446caa\nmov     cs:qword_14090BFD0, rax                                        ; +0x4b, 0x140446cab\nmov     rcx, [rax]                                                     ; +0x52, 0x140446cb2\nmov     rdx, [rcx+48h]                                                 ; +0x55, 0x140446cb5\nmov     rcx, rax                                                       ; +0x59, 0x140446cb9\ncall    rdx                                                            ; +0x5c, 0x140446cbc\nmov     rcx, cs:qword_14090BFD0                                        ; +0x5e, 0x140446cbe\nmov     r8b, 1                                                         ; +0x65, 0x140446cc5\nlea     rdx, word_14070D038                                            ; +0x68, 0x140446cc8\ncall    GameManager__setUGV                                            ; +0x6f, 0x140446ccf\nmov     rdi, [rsi+0A0h]                                                ; +0x74, 0x140446cd4\ntest    rdi, rdi                                                       ; +0x7b, 0x140446cdb\njz      short loc_140446D3B                                            ; +0x7e, 0x140446cde\nmov     rdi, [rdi]                                                     ; +0x80, 0x140446ce0\nmov     rbx, [rsi+0A0h]                                                ; +0x83, 0x140446ce3\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x8a, 0x140446cea\nmov     rcx, rax                                                       ; +0x90, 0x140446cf0\nlea     rdx, aSecretdoorbtn2; \"secretDoorBtn2_open_001.png\"            ; +0x93, 0x140446cf3\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x9a, 0x140446cfa\nmov     rdx, rax                                                       ; +0xa0, 0x140446d00\nmov     rcx, rbx                                                       ; +0xa3, 0x140446d03\nmov     rax, [rdi+3F0h]                                                ; +0xa6, 0x140446d06\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xad, 0x140446d0d\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xb2, 0x140446d12\nadd     rsp, 20h                                                       ; +0xb7, 0x140446d17\npop     rdi                                                            ; +0xbb, 0x140446d1b\njmp     rax                                                            ; +0xbc, 0x140446d1c\nmov     rax, [rbx]                                                     ; +0xbf, 0x140446d1f\nmov     rcx, rbx                                                       ; +0xc2, 0x140446d22\ncall    qword ptr [rax+38h]                                            ; +0xc5, 0x140446d25\ncmp     eax, 1                                                         ; +0xc8, 0x140446d28\njnz     short loc_140446D3B                                            ; +0xcb, 0x140446d2b\nlea     rcx, [rsi-198h]                                                ; +0xcd, 0x140446d2d\nxor     edx, edx                                                       ; +0xd4, 0x140446d34\ncall    LevelPage__onTheTower                                          ; +0xd6, 0x140446d36\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xdb, 0x140446d3b\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xe0, 0x140446d40\nadd     rsp, 20h                                                       ; +0xe5, 0x140446d45\npop     rdi                                                            ; +0xe9, 0x140446d49\nretn                                                                   ; +0xea, 0x140446d4a", "xrefs": ["<???> @ 0x1407929f0", "<???> @ 0x140927218"], "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"}