{"type": "func", "start": 5371972272, "end": 5371972796, "name": "LevelPage::addSecretDoor", "pseudocode": "// \n// LevelPage::addSecretDoor from 0x14031cab0 to 0x14031ccbc (524 bytes)\n// \n// 2 xrefs:\n// > LevelPage::updateDynamicPage @ 0x14031bc4c\n// > <???> @ 0x1406d4b20\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 LevelPage::addSecretDoor(LevelPage *a1)\n{\n  GameManager *v2; // rcx\n  GameManager *v3; // rcx\n  bool UGV; // bl\n  __int64 v5; // rcx\n  cocos2d::CCDirector *v6; // rax\n  const char *v7; // rcx\n  GameManager *v8; // rcx\n  __int64 v9; // rcx\n  cocos2d::CCNode *v10; // rdi\n  CCMenuItemSpriteExtra *v11; // rbx\n  void *v12; // [rsp+40h] [rbp+18h]\n  void *v13; // [rsp+40h] [rbp+18h]\n  void *v14; // [rsp+40h] [rbp+18h]\n\n  v2 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v12 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = (GameManager *)qword_1406C2ED8;\n  }\n  if ( GameManager::getUGV(v2, \"6\") )\n  {\n    v3 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v13 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = (GameManager *)qword_1406C2ED8;\n    }\n    UGV = GameManager::getUGV(v3, \"8\");\n    v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);\n    cocos2d::CCDirector::getWinSize(v6);\n    v7 = \"secretDoorBtn2_closed_001.png\";\n    if ( UGV )\n      v7 = \"secretDoorBtn2_open_001.png\";\n    a1->m_secretDoor = cocos2d::CCSprite::createWithSpriteFrameName(v7);\n    v8 = (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      v8 = (GameManager *)qword_1406C2ED8;\n    }\n    if ( !GameManager::getUGV(v8, (const char *)&word_140531E88) )\n      a1->m_secretDoor->setOpacity(&a1->m_secretDoor->cocos2d::CCRGBAProtocol, 0);\n    v10 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v9);\n    a1->addChild_1(a1, v10);\n    v11 = CCMenuItemSpriteExtra::create(\n            a1->m_secretDoor,\n            nullptr,\n            a1,\n            (cocos2d::SEL_MenuHandler *)LevelPage::onSecretDoor);\n    LOWORD(v11->m_scaleMultiplier) = 256;\n    v10->addChild_1(v10, v11);\n    ((void (__fastcall *)(cocos2d::CCNode *))v10->setPosition)(v10);\n    HIDWORD(v11->m_pfnSelector.adj) = 0x40000000;\n    cocos2d::CCArray::addObject(a1->m_dynamicObjects, v11);\n    cocos2d::CCArray::addObject(a1->m_dynamicObjects, a1->m_secretDoor);\n  }\n}", "assembly": "; \n; LevelPage::addSecretDoor from 0x14031cab0 to 0x14031ccbc (524 bytes)\n; \n; 2 xrefs:\n; > LevelPage::updateDynamicPage @ 0x14031bc4c\n; > <???> @ 0x1406d4b20\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, 0x14031cab0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x14031cab5\npush    rdi                                                            ; +0xa, 0x14031caba\nsub     rsp, 20h                                                       ; +0xb, 0x14031cabb\nmov     rsi, rcx                                                       ; +0xf, 0x14031cabf\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x12, 0x14031cac2\ntest    rcx, rcx                                                       ; +0x19, 0x14031cac9\njnz     short loc_14031CAFD                                            ; +0x1c, 0x14031cacc\nmov     ecx, 668h; Size                                                ; +0x1e, 0x14031cace\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x23, 0x14031cad3\nmov     [rsp+28h+arg_10], rax                                          ; +0x28, 0x14031cad8\nmov     rcx, rax                                                       ; +0x2d, 0x14031cadd\ncall    sub_14017AB00                                                  ; +0x30, 0x14031cae0\nnop                                                                    ; +0x35, 0x14031cae5\nmov     cs:qword_1406C2ED8, rax                                        ; +0x36, 0x14031cae6\nmov     rdx, [rax]                                                     ; +0x3d, 0x14031caed\nmov     rcx, rax                                                       ; +0x40, 0x14031caf0\ncall    qword ptr [rdx+48h]                                            ; +0x43, 0x14031caf3\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x46, 0x14031caf6\nlea     rdx, a6; \"6\"                                                   ; +0x4d, 0x14031cafd\ncall    GameManager__getUGV                                            ; +0x54, 0x14031cb04\ntest    al, al                                                         ; +0x59, 0x14031cb09\njz      loc_14031CCAC                                                  ; +0x5b, 0x14031cb0b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x61, 0x14031cb11\ntest    rcx, rcx                                                       ; +0x68, 0x14031cb18\njnz     short loc_14031CB4C                                            ; +0x6b, 0x14031cb1b\nmov     ecx, 668h; Size                                                ; +0x6d, 0x14031cb1d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x72, 0x14031cb22\nmov     [rsp+28h+arg_10], rax                                          ; +0x77, 0x14031cb27\nmov     rcx, rax                                                       ; +0x7c, 0x14031cb2c\ncall    sub_14017AB00                                                  ; +0x7f, 0x14031cb2f\nnop                                                                    ; +0x84, 0x14031cb34\nmov     cs:qword_1406C2ED8, rax                                        ; +0x85, 0x14031cb35\nmov     rdx, [rax]                                                     ; +0x8c, 0x14031cb3c\nmov     rcx, rax                                                       ; +0x8f, 0x14031cb3f\ncall    qword ptr [rdx+48h]                                            ; +0x92, 0x14031cb42\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x95, 0x14031cb45\nlea     rdx, a8; \"8\"                                                   ; +0x9c, 0x14031cb4c\ncall    GameManager__getUGV                                            ; +0xa3, 0x14031cb53\nmovzx   ebx, al                                                        ; +0xa8, 0x14031cb58\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xab, 0x14031cb5b\nmov     rcx, rax                                                       ; +0xb1, 0x14031cb61\nlea     rdx, [rsp+28h+arg_8]                                           ; +0xb4, 0x14031cb64\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xb9, 0x14031cb69\nlea     rax, aSecretdoorbtn2; \"secretDoorBtn2_open_001.png\"            ; +0xbf, 0x14031cb6f\nlea     rcx, aSecretdoorbtn2_0; \"secretDoorBtn2_closed_001.png\"        ; +0xc6, 0x14031cb76\ntest    bl, bl                                                         ; +0xcd, 0x14031cb7d\ncmovnz  rcx, rax                                                       ; +0xcf, 0x14031cb7f\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xd3, 0x14031cb83\nmov     [rsi+238h], rax                                                ; +0xd9, 0x14031cb89\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xe0, 0x14031cb90\ntest    rcx, rcx                                                       ; +0xe7, 0x14031cb97\njnz     short loc_14031CBCB                                            ; +0xea, 0x14031cb9a\nmov     ecx, 668h; Size                                                ; +0xec, 0x14031cb9c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xf1, 0x14031cba1\nmov     [rsp+28h+arg_10], rax                                          ; +0xf6, 0x14031cba6\nmov     rcx, rax                                                       ; +0xfb, 0x14031cbab\ncall    sub_14017AB00                                                  ; +0xfe, 0x14031cbae\nnop                                                                    ; +0x103, 0x14031cbb3\nmov     cs:qword_1406C2ED8, rax                                        ; +0x104, 0x14031cbb4\nmov     rdx, [rax]                                                     ; +0x10b, 0x14031cbbb\nmov     rcx, rax                                                       ; +0x10e, 0x14031cbbe\ncall    qword ptr [rdx+48h]                                            ; +0x111, 0x14031cbc1\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x114, 0x14031cbc4\nlea     rdx, word_140531E88                                            ; +0x11b, 0x14031cbcb\ncall    GameManager__getUGV                                            ; +0x122, 0x14031cbd2\ntest    al, al                                                         ; +0x127, 0x14031cbd7\njnz     short loc_14031CBF1                                            ; +0x129, 0x14031cbd9\nmov     rcx, [rsi+238h]                                                ; +0x12b, 0x14031cbdb\nadd     rcx, 140h                                                      ; +0x132, 0x14031cbe2\nmov     rax, [rcx]                                                     ; +0x139, 0x14031cbe9\nxor     edx, edx                                                       ; +0x13c, 0x14031cbec\ncall    qword ptr [rax+28h]                                            ; +0x13e, 0x14031cbee\ncall    cs:?create@CCMenu@cocos2d@@SAPEAV12@XZ; cocos2d::CCMenu::create(void) ; +0x141, 0x14031cbf1\nmov     rdi, rax                                                       ; +0x147, 0x14031cbf7\nmov     r8, [rsi]                                                      ; +0x14a, 0x14031cbfa\nmov     rdx, rax                                                       ; +0x14d, 0x14031cbfd\nmov     rcx, rsi                                                       ; +0x150, 0x14031cc00\ncall    qword ptr [r8+1C0h]                                            ; +0x153, 0x14031cc03\nlea     r9, LevelPage__onSecretDoor                                    ; +0x15a, 0x14031cc0a\nmov     r8, rsi                                                        ; +0x161, 0x14031cc11\nxor     edx, edx                                                       ; +0x164, 0x14031cc14\nmov     rcx, [rsi+238h]                                                ; +0x166, 0x14031cc16\ncall    CCMenuItemSpriteExtra__create                                  ; +0x16d, 0x14031cc1d\nmov     rbx, rax                                                       ; +0x172, 0x14031cc22\nmov     word ptr [rax+198h], 100h                                      ; +0x175, 0x14031cc25\nmov     r8, [rdi]                                                      ; +0x17e, 0x14031cc2e\nmov     rdx, rax                                                       ; +0x181, 0x14031cc31\nmov     rcx, rdi                                                       ; +0x184, 0x14031cc34\ncall    qword ptr [r8+1C0h]                                            ; +0x187, 0x14031cc37\nmov     rdx, [rdi]                                                     ; +0x18e, 0x14031cc3e\nmovss   xmm2, [rsp+28h+arg_C]                                          ; +0x191, 0x14031cc41\nmulss   xmm2, cs:dword_140622B08                                       ; +0x197, 0x14031cc47\nsubss   xmm2, cs:dword_1406232D8                                       ; +0x19f, 0x14031cc4f\nminss   xmm2, cs:dword_140623318                                       ; +0x1a7, 0x14031cc57\naddss   xmm2, cs:dword_140623164                                       ; +0x1af, 0x14031cc5f\nmovss   xmm1, [rsp+28h+arg_8]                                          ; +0x1b7, 0x14031cc67\nmulss   xmm1, cs:dword_140622B08                                       ; +0x1bd, 0x14031cc6d\nmov     rcx, rdi                                                       ; +0x1c5, 0x14031cc75\ncall    qword ptr [rdx+0B0h]                                           ; +0x1c8, 0x14031cc78\nmov     dword ptr [rbx+174h], 40000000h                                ; +0x1ce, 0x14031cc7e\nmov     rdx, rbx                                                       ; +0x1d8, 0x14031cc88\nmov     rcx, [rsi+218h]                                                ; +0x1db, 0x14031cc8b\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1e2, 0x14031cc92\nmov     rdx, [rsi+238h]                                                ; +0x1e8, 0x14031cc98\nmov     rcx, [rsi+218h]                                                ; +0x1ef, 0x14031cc9f\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1f6, 0x14031cca6\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1fc, 0x14031ccac\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x201, 0x14031ccb1\nadd     rsp, 20h                                                       ; +0x206, 0x14031ccb6\npop     rdi                                                            ; +0x20a, 0x14031ccba\nretn                                                                   ; +0x20b, 0x14031ccbb", "xrefs": ["LevelPage::updateDynamicPage @ 0x14031bc4c", "<???> @ 0x1406d4b20"], "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"}