{"type": "func", "start": 4299708400, "end": 4299708764, "name": "LevelPage::addSecretDoor", "pseudocode": "// \n// LevelPage::addSecretDoor from 0x1004857f0 to 0x10048595c (364 bytes)\n// \n// 1 xrefs:\n// > LevelPage::updateDynamicPage @ 0x100483c44\n// \n// This function is hookable on this platform (idp: arm, 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:05:48 +0000\n// \n\n__int64 __fastcall LevelPage::addSecretDoor(__int64 *a1)\n{\n  __int64 v2; // x0\n  __int64 result; // x0\n  __int64 v4; // x0\n  _BOOL4 UGV; // w20\n  __int64 v6; // x0\n  const char *v7; // x0\n  __int64 v8; // x0\n  __int64 v9; // x20\n  _WORD *v10; // x21\n  __n128 v11; // q0\n  float v12; // s2\n  bool v13; // cc\n  __n128 v14; // q1\n  __int64 v15; // [xsp+8h] [xbp-28h] BYREF\n\n  v2 = GameManager::sharedState();\n  result = GameManager::getUGV(v2, \"6\");\n  if ( (_DWORD)result )\n  {\n    v4 = GameManager::sharedState();\n    UGV = GameManager::getUGV(v4, \"8\");\n    v6 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::getWinSize(v6, &v15);\n    if ( UGV )\n      v7 = \"secretDoorBtn2_open_001.png\";\n    else\n      v7 = \"secretDoorBtn2_closed_001.png\";\n    a1[71] = (__int64)cocos2d::CCSprite::createWithSpriteFrameName((__int64)v7);\n    v8 = GameManager::sharedState();\n    if ( !GameManager::getUGV(v8, \"7\") )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1[71] + 912LL))(a1[71], 0);\n    v9 = cocos2d::CCMenu::create();\n    (*(void (__fastcall **)(__int64 *, __int64))(*a1 + 456))(a1, v9);\n    v10 = CCMenuItemSpriteExtra::create(a1[71], 0, (__int64)a1, (__int64)sub_100485D8C, 0);\n    v10[204] = 256;\n    (*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v9 + 456LL))(v9, v10);\n    v14.n128_f32[0] = (float)(*((float *)&v15 + 1) * 0.5) + -110.0;\n    v12 = v14.n128_f32[0] + 30.0;\n    v13 = v14.n128_f32[0] <= 128.0;\n    v14.n128_u32[0] = 1126039552;\n    if ( v13 )\n      v14.n128_f32[0] = v12;\n    v11.n128_f32[0] = *(float *)&v15 * 0.5;\n    (*(void (__fastcall **)(__int64, __n128, __n128))(*(_QWORD *)v9 + 200LL))(v9, v11, v14);\n    CCMenuItemSpriteExtra::setSizeMult((__int64)v10, 2.0);\n    sub_1002E74E0(a1[67]);\n    return sub_1002E74E0(a1[67]);\n  }\n  return result;\n}", "assembly": "; \n; LevelPage::addSecretDoor from 0x1004857f0 to 0x10048595c (364 bytes)\n; \n; 1 xrefs:\n; > LevelPage::updateDynamicPage @ 0x100483c44\n; \n; This function is hookable on this platform (idp: arm, 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:05:48 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x1004857f0\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1004857f4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1004857f8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1004857fc\nADD             X29, SP, #0x30                                         ; +0x10, 0x100485800\nMOV             X19, X0                                                ; +0x14, 0x100485804\nBL              GameManager__sharedState                               ; +0x18, 0x100485808\nADRL            X1, a6; \"6\"                                            ; +0x1c, 0x10048580c\nBL              GameManager__getUGV                                    ; +0x24, 0x100485814\nCBZ             W0, loc_100485948                                      ; +0x28, 0x100485818\nBL              GameManager__sharedState                               ; +0x2c, 0x10048581c\nADRL            X1, a8; \"8\"                                            ; +0x30, 0x100485820\nBL              GameManager__getUGV                                    ; +0x38, 0x100485828\nMOV             X20, X0                                                ; +0x3c, 0x10048582c\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x40, 0x100485830\nADD             X8, SP, #0x30+var_28                                   ; +0x44, 0x100485834\nBL              cocos2d__CCDirector__getWinSize                        ; +0x48, 0x100485838\nADRL            X8, aSecretdoorbtn2_0; \"secretDoorBtn2_closed_001.png\" ; +0x4c, 0x10048583c\nADRL            X9, aSecretdoorbtn2; \"secretDoorBtn2_open_001.png\"     ; +0x54, 0x100485844\nCMP             W20, #0                                                ; +0x5c, 0x10048584c\nCSEL            X0, X9, X8, NE                                         ; +0x60, 0x100485850\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x64, 0x100485854\nSTR             X0, [X19,#0x238]                                       ; +0x68, 0x100485858\nBL              GameManager__sharedState                               ; +0x6c, 0x10048585c\nADRL            X1, a7; \"7\"                                            ; +0x70, 0x100485860\nBL              GameManager__getUGV                                    ; +0x78, 0x100485868\nTBNZ            W0, #0, loc_100485884                                  ; +0x7c, 0x10048586c\nLDR             X0, [X19,#0x238]                                       ; +0x80, 0x100485870\nLDR             X8, [X0]                                               ; +0x84, 0x100485874\nLDR             X8, [X8,#0x390]                                        ; +0x88, 0x100485878\nMOV             W1, #0                                                 ; +0x8c, 0x10048587c\nBLR             X8                                                     ; +0x90, 0x100485880\nBL              cocos2d__CCMenu__create                                ; +0x94, 0x100485884\nMOV             X20, X0                                                ; +0x98, 0x100485888\nLDR             X8, [X19]                                              ; +0x9c, 0x10048588c\nLDR             X8, [X8,#0x1C8]                                        ; +0xa0, 0x100485890\nMOV             X0, X19                                                ; +0xa4, 0x100485894\nMOV             X1, X20                                                ; +0xa8, 0x100485898\nBLR             X8                                                     ; +0xac, 0x10048589c\nLDR             X0, [X19,#0x238]                                       ; +0xb0, 0x1004858a0\nADRL            X3, sub_100485D8C                                      ; +0xb4, 0x1004858a4\nMOV             X1, #0                                                 ; +0xbc, 0x1004858ac\nMOV             X2, X19                                                ; +0xc0, 0x1004858b0\nMOV             X4, #0                                                 ; +0xc4, 0x1004858b4\nBL              CCMenuItemSpriteExtra__create                          ; +0xc8, 0x1004858b8\nMOV             X21, X0                                                ; +0xcc, 0x1004858bc\nMOV             W8, #0x100                                             ; +0xd0, 0x1004858c0\nSTRH            W8, [X0,#0x198]                                        ; +0xd4, 0x1004858c4\nLDR             X8, [X20]                                              ; +0xd8, 0x1004858c8\nLDR             X8, [X8,#0x1C8]                                        ; +0xdc, 0x1004858cc\nMOV             X0, X20                                                ; +0xe0, 0x1004858d0\nMOV             X1, X21                                                ; +0xe4, 0x1004858d4\nBLR             X8                                                     ; +0xe8, 0x1004858d8\nFMOV            S1, #0.5                                               ; +0xec, 0x1004858dc\nLDP             S0, S2, [SP,#0x30+var_28]                              ; +0xf0, 0x1004858e0\nFMUL            S0, S0, S1                                             ; +0xf4, 0x1004858e4\nFMUL            S1, S2, S1                                             ; +0xf8, 0x1004858e8\nMOV             W8, #0xC2DC0000                                        ; +0xfc, 0x1004858ec\nFMOV            S2, W8                                                 ; +0x100, 0x1004858f0\nFADD            S1, S1, S2                                             ; +0x104, 0x1004858f4\nFMOV            S2, #30.0                                              ; +0x108, 0x1004858f8\nFADD            S2, S1, S2                                             ; +0x10c, 0x1004858fc\nMOVI            V3.2S, #0x43,LSL#24 ; 'C'                              ; +0x110, 0x100485900\nFCMP            S1, S3                                                 ; +0x114, 0x100485904\nMOV             W8, #0x431E0000                                        ; +0x118, 0x100485908\nFMOV            S1, W8                                                 ; +0x11c, 0x10048590c\nFCSEL           S1, S1, S2, GT                                         ; +0x120, 0x100485910\nLDR             X8, [X20]                                              ; +0x124, 0x100485914\nLDR             X8, [X8,#0xC8]                                         ; +0x128, 0x100485918\nMOV             X0, X20                                                ; +0x12c, 0x10048591c\nBLR             X8                                                     ; +0x130, 0x100485920\nFMOV            S0, #2.0                                               ; +0x134, 0x100485924\nMOV             X0, X21                                                ; +0x138, 0x100485928\nBL              CCMenuItemSpriteExtra__setSizeMult                     ; +0x13c, 0x10048592c\nLDR             X0, [X19,#0x218]                                       ; +0x140, 0x100485930\nMOV             X1, X21                                                ; +0x144, 0x100485934\nBL              sub_1002E74E0                                          ; +0x148, 0x100485938\nLDR             X0, [X19,#0x218]                                       ; +0x14c, 0x10048593c\nLDR             X1, [X19,#0x238]                                       ; +0x150, 0x100485940\nBL              sub_1002E74E0                                          ; +0x154, 0x100485944\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x158, 0x100485948\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x15c, 0x10048594c\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x160, 0x100485950\nADD             SP, SP, #0x40 ; '@'                                    ; +0x164, 0x100485954\nRET                                                                    ; +0x168, 0x100485958", "xrefs": ["LevelPage::updateDynamicPage @ 0x100483c44"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}