{"type": "func", "start": 4799864, "end": 4800302, "name": "CreatorLayer::onSecretVault", "pseudocode": "// \n// CreatorLayer::onSecretVault from 0x493d78 to 0x493f2e (438 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:39 +0000\n// \n\nint __fastcall CreatorLayer::onSecretVault(CreatorLayer *this, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v3; // r0\n  cocos2d::CCDirector *Stat; // r0\n  SecretLayer2 *v5; // r4\n  float v6; // r0\n  cocos2d::CCScene *v7; // r2\n  cocos2d::CCScene *v8; // r0\n  int v10; // r6\n  char *v11; // r1\n  DialogLayer *v12; // r0\n  int v13; // r2\n  DialogLayer *v14; // r9\n  int v15; // [sp+4h] [bp-30h]\n  int v16[3]; // [sp+8h] [bp-2Ch] BYREF\n  int v17[3]; // [sp+14h] [bp-20h] BYREF\n  int v18[3]; // [sp+20h] [bp-14h] BYREF\n\n  v3 = (GameStatsManager *)GameStatsManager::sharedState(this);\n  Stat = (cocos2d::CCDirector *)GameStatsManager::getStat(v3, \"13\");\n  if ( (int)Stat <= 49 )\n  {\n    memset(v16, 0, sizeof(v16));\n    std::string::__init(v16, \"zzz\", 3u);\n    v10 = *((_DWORD *)this + 88);\n    if ( v10 >= 0 )\n    {\n      *((_DWORD *)this + 88) = v10 + 1;\n    }\n    else\n    {\n      rand();\n      *((_DWORD *)this + 88) = lroundf();\n    }\n    if ( *((int *)this + 88) > 10 )\n      *((_DWORD *)this + 88) = 0;\n    switch ( *((_DWORD *)this + 88) )\n    {\n      case 0:\n        v11 = \"You are not ready...\";\n        goto LABEL_20;\n      case 1:\n        v11 = \"I can't let you in.\";\n        goto LABEL_20;\n      case 2:\n        v11 = \"Player used knock.<d040>\\nIt's not very effective.\";\n        goto LABEL_20;\n      case 3:\n        v11 = \"Don't you have something better to do?\";\n        goto LABEL_20;\n      case 4:\n        v11 = \"That is a bad idea...\";\n        goto LABEL_20;\n      case 5:\n        v11 = \".<d030>.<d030>.\";\n        goto LABEL_20;\n      case 6:\n        v11 = \"I guess you don't like rules...\";\n        goto LABEL_20;\n      case 7:\n        v11 = \"RubRub told me not to let anyone in.\";\n        goto LABEL_20;\n      case 8:\n        v11 = \"This is not the door you are looking for.\";\n        goto LABEL_20;\n      case 9:\n        v11 = \"I don't understand why you keep clicking...\";\n        goto LABEL_20;\n      case 0xA:\n        v11 = \"Trust me,<d030> you don't want to come in here.\";\nLABEL_20:\n        std::string::assign(v16, v11);\n        break;\n      default:\n        break;\n    }\n    memset(v17, 0, sizeof(v17));\n    std::string::__init(v17, \"The Keymaster\", 0xDu);\n    std::string::basic_string(v18, (int)v16);\n    LOWORD(v15) = -1;\n    BYTE2(v15) = -1;\n    v12 = (DialogLayer *)DialogObject::create(v17, v18, 2, 1065353216, 0, v15);\n    v14 = (DialogLayer *)DialogLayer::create(v12, (DialogObject *)((char *)&dword_0 + 2), v13);\n    std::string::~string((int)v18);\n    std::string::~string((int)v17);\n    (*(void (__fastcall **)(CreatorLayer *, DialogLayer *, int))(*(_DWORD *)this + 232))(this, v14, 100);\n    DialogLayer::updateChatPlacement(v14, 0);\n    DialogLayer::animateInRandomSide(v14);\n    return std::string::~string((int)v16);\n  }\n  else\n  {\n    v5 = (SecretLayer2 *)cocos2d::CCDirector::sharedDirector(Stat);\n    v6 = COERCE_FLOAT(SecretLayer2::scene(v5));\n    v8 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create((cocos2d::CCTransitionFade *)0x3F000000, v6, v7);\n    return cocos2d::CCDirector::replaceScene(v5, v8);\n  }\n}", "assembly": "; \n; CreatorLayer::onSecretVault from 0x493d78 to 0x493f2e (438 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:39 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x493d78\nSUB             SP, SP, #0x34                                          ; +0x4, 0x493d7c\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x493D88)                ; +0x6, 0x493d7e\nMOV             R5, R0                                                 ; +0xa, 0x493d82\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0xc, 0x493d84\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0xe, 0x493d86\nLDR.W           R3, [R8]                                               ; +0x12, 0x493d8a\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x16, 0x493d8e\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x18, 0x493d90\nLDR             R1, =(a13 - 0x493D9A); \"13\"                            ; +0x1c, 0x493d94\nADD             R1, PC; \"13\"                                           ; +0x1e, 0x493d96\nBL              _ZN16GameStatsManager7getStatEPKc; GameStatsManager::getStat(char const*) ; +0x20, 0x493d98\nCMP             R0, #0x31 ; '1'                                        ; +0x24, 0x493d9c\nBLE             loc_493DBE                                             ; +0x26, 0x493d9e\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x28, 0x493da0\nMOV             R4, R0                                                 ; +0x2c, 0x493da4\nBL              _ZN12SecretLayer25sceneEv; SecretLayer2::scene(void)   ; +0x2e, 0x493da6\nMOV             R1, R0; float                                          ; +0x32, 0x493daa\nMOV.W           R0, #0x3F000000; this                                  ; +0x34, 0x493dac\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x38, 0x493db0\nMOV             R1, R0; lpsrc                                          ; +0x3c, 0x493db4\nMOV             R0, R4; this                                           ; +0x3e, 0x493db6\nBL              _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x40, 0x493db8\nB               loc_493F1A                                             ; +0x44, 0x493dbc\nADD             R4, SP, #0x34+var_2C                                   ; +0x46, 0x493dbe\nLDR             R1, =(aZzz - 0x493DCC); \"zzz\"                          ; +0x48, 0x493dc0\nMOVS            R2, #3                                                 ; +0x4a, 0x493dc2\nMOVS            R3, #0                                                 ; +0x4c, 0x493dc4\nMOV             R0, R4                                                 ; +0x4e, 0x493dc6\nADD             R1, PC; \"zzz\"                                          ; +0x50, 0x493dc8\nSTR             R3, [SP,#0x34+var_2C]                                  ; +0x52, 0x493dca\nSTR             R3, [SP,#0x34+var_28]                                  ; +0x54, 0x493dcc\nSTR             R3, [SP,#0x34+var_24]                                  ; +0x56, 0x493dce\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x58, 0x493dd0\nLDR.W           R6, [R5,#0x160]                                        ; +0x5c, 0x493dd4\nCMP             R6, #0                                                 ; +0x60, 0x493dd8\nBGE             loc_493DFE                                             ; +0x62, 0x493dda\nBLX             rand                                                   ; +0x64, 0x493ddc\nVMOV.F32        S15, #10.0                                             ; +0x68, 0x493de0\nVMOV            S14, R0                                                ; +0x6c, 0x493de4\nVCVT.F32.S32    S14, S14, #0x1F                                        ; +0x70, 0x493de8\nVMUL.F32        S15, S14, S15                                          ; +0x74, 0x493dec\nVMOV            R0, S15                                                ; +0x78, 0x493df0\nBLX             lroundf                                                ; +0x7c, 0x493df4\nSTR.W           R0, [R5,#0x160]                                        ; +0x80, 0x493df8\nB               loc_493E04                                             ; +0x84, 0x493dfc\nADDS            R6, #1                                                 ; +0x86, 0x493dfe\nSTR.W           R6, [R5,#0x160]                                        ; +0x88, 0x493e00\nLDR.W           R3, [R5,#0x160]                                        ; +0x8c, 0x493e04\nCMP             R3, #0xA                                               ; +0x90, 0x493e08\nITT GT                                                                 ; +0x92, 0x493e0a\nMOVGT           R3, #0                                                 ; +0x94, 0x493e0c\nSTRGT.W         R3, [R5,#0x160]                                        ; +0x96, 0x493e0e\nLDR.W           R3, [R5,#0x160]                                        ; +0x9a, 0x493e12\nCMP             R3, #0xA; switch 11 cases                              ; +0x9e, 0x493e16\nBHI             def_493E1A; jumptable 00493E1A default case            ; +0xa0, 0x493e18\nTBB.W           [PC,R3]; switch jump                                   ; +0xa2, 0x493e1a\nDCB 6; jump table for switch statement                                 ; +0xa6, 0x493e1e\nDCB 0xA                                                                ; +0xa7, 0x493e1f\nDCB 0xE                                                                ; +0xa8, 0x493e20\nDCB 0x12                                                               ; +0xa9, 0x493e21\nDCB 0x16                                                               ; +0xaa, 0x493e22\nDCB 0x1A                                                               ; +0xab, 0x493e23\nDCB 0x1E                                                               ; +0xac, 0x493e24\nDCB 0x22                                                               ; +0xad, 0x493e25\nDCB 0x26                                                               ; +0xae, 0x493e26\nDCB 0x2A                                                               ; +0xaf, 0x493e27\nDCB 0x2E                                                               ; +0xb0, 0x493e28\nALIGN 2                                                                ; +0xb1, 0x493e29\nLDR             R1, =(aYouAreNotReady - 0x493E32); jumptable 00493E1A case 0 ; +0xb2, 0x493e2a\nMOV             R0, R4                                                 ; +0xb4, 0x493e2c\nADD             R1, PC; \"You are not ready...\"                         ; +0xb6, 0x493e2e\nB               loc_493E80                                             ; +0xb8, 0x493e30\nLDR             R1, =(aICanTLetYouIn - 0x493E3A); jumptable 00493E1A case 1 ; +0xba, 0x493e32\nMOV             R0, R4                                                 ; +0xbc, 0x493e34\nADD             R1, PC; \"I can't let you in.\"                          ; +0xbe, 0x493e36\nB               loc_493E80                                             ; +0xc0, 0x493e38\nLDR             R1, =(aPlayerUsedKnoc - 0x493E42); jumptable 00493E1A case 2 ; +0xc2, 0x493e3a\nMOV             R0, R4                                                 ; +0xc4, 0x493e3c\nADD             R1, PC; \"Player used knock.<d040>\\nIt's not very\"...   ; +0xc6, 0x493e3e\nB               loc_493E80                                             ; +0xc8, 0x493e40\nLDR             R1, =(aDonTYouHaveSom - 0x493E4A); jumptable 00493E1A case 3 ; +0xca, 0x493e42\nMOV             R0, R4                                                 ; +0xcc, 0x493e44\nADD             R1, PC; \"Don't you have something better to do?\"       ; +0xce, 0x493e46\nB               loc_493E80                                             ; +0xd0, 0x493e48\nLDR             R1, =(aThatIsABadIdea - 0x493E52); jumptable 00493E1A case 4 ; +0xd2, 0x493e4a\nMOV             R0, R4                                                 ; +0xd4, 0x493e4c\nADD             R1, PC; \"That is a bad idea...\"                        ; +0xd6, 0x493e4e\nB               loc_493E80                                             ; +0xd8, 0x493e50\nLDR             R1, =(aD030D030 - 0x493E5A); jumptable 00493E1A case 5 ; +0xda, 0x493e52\nMOV             R0, R4                                                 ; +0xdc, 0x493e54\nADD             R1, PC; \".<d030>.<d030>.\"                              ; +0xde, 0x493e56\nB               loc_493E80                                             ; +0xe0, 0x493e58\nLDR             R1, =(aIGuessYouDonTL - 0x493E62); jumptable 00493E1A case 6 ; +0xe2, 0x493e5a\nMOV             R0, R4                                                 ; +0xe4, 0x493e5c\nADD             R1, PC; \"I guess you don't like rules...\"              ; +0xe6, 0x493e5e\nB               loc_493E80                                             ; +0xe8, 0x493e60\nLDR             R1, =(aRubrubToldMeNo - 0x493E6A); jumptable 00493E1A case 7 ; +0xea, 0x493e62\nMOV             R0, R4                                                 ; +0xec, 0x493e64\nADD             R1, PC; \"RubRub told me not to let anyone in.\"         ; +0xee, 0x493e66\nB               loc_493E80                                             ; +0xf0, 0x493e68\nLDR             R1, =(aThisIsNotTheDo - 0x493E72); jumptable 00493E1A case 8 ; +0xf2, 0x493e6a\nMOV             R0, R4                                                 ; +0xf4, 0x493e6c\nADD             R1, PC; \"This is not the door you are looking fo\"...   ; +0xf6, 0x493e6e\nB               loc_493E80                                             ; +0xf8, 0x493e70\nLDR             R1, =(aIDonTUnderstan - 0x493E7A); jumptable 00493E1A case 9 ; +0xfa, 0x493e72\nMOV             R0, R4                                                 ; +0xfc, 0x493e74\nADD             R1, PC; \"I don't understand why you keep clickin\"...   ; +0xfe, 0x493e76\nB               loc_493E80                                             ; +0x100, 0x493e78\nLDR             R1, =(aTrustMeD030You - 0x493E82); jumptable 00493E1A case 10 ; +0x102, 0x493e7a\nMOV             R0, R4; int                                            ; +0x104, 0x493e7c\nADD             R1, PC; \"Trust me,<d030> you don't want to come \"...   ; +0x106, 0x493e7e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x108, 0x493e80\nADD             R6, SP, #0x34+var_20; jumptable 00493E1A default case  ; +0x10c, 0x493e84\nLDR             R1, =(aTheKeymaster - 0x493E92); \"The Keymaster\"       ; +0x10e, 0x493e86\nMOVS            R2, #0xD                                               ; +0x110, 0x493e88\nMOVS            R3, #0                                                 ; +0x112, 0x493e8a\nMOV             R0, R6                                                 ; +0x114, 0x493e8c\nADD             R1, PC; \"The Keymaster\"                                ; +0x116, 0x493e8e\nSTR             R3, [SP,#0x34+var_20]                                  ; +0x118, 0x493e90\nSTR             R3, [SP,#0x34+var_1C]                                  ; +0x11a, 0x493e92\nSTR             R3, [SP,#0x34+var_18]                                  ; +0x11c, 0x493e94\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x11e, 0x493e96\nADD             R7, SP, #0x34+var_14                                   ; +0x122, 0x493e9a\nMOV             R1, R4                                                 ; +0x124, 0x493e9c\nMOV             R0, R7                                                 ; +0x126, 0x493e9e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x128, 0x493ea0\nMOV             R3, SP                                                 ; +0x12c, 0x493ea4\nMOVS            R2, #0                                                 ; +0x12e, 0x493ea6\nSTR.W           R2, [R3+0x34+var_34],#4                                ; +0x130, 0x493ea8\nMOV             R0, R6                                                 ; +0x134, 0x493eac\nLDR             R2, =(word_BEBFC0 - 0x493EB4)                          ; +0x136, 0x493eae\nADD             R2, PC; word_BEBFC0                                    ; +0x138, 0x493eb0\nLDRH            R1, [R2]                                               ; +0x13a, 0x493eb2\nLDRB            R2, [R2,#(byte_BEBFC2 - 0xBEBFC0)]                     ; +0x13c, 0x493eb4\nSTRH.W          R1, [SP,#0x34+var_30]                                  ; +0x13e, 0x493eb6\nMOV             R1, R7                                                 ; +0x142, 0x493eba\nSTRB            R2, [R3,#2]                                            ; +0x144, 0x493ebc\nMOVS            R2, #2                                                 ; +0x146, 0x493ebe\nMOV.W           R3, #0x3F800000                                        ; +0x148, 0x493ec0\nBL              _ZN12DialogObject6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES6_ifbN7cocos2d10_ccColor3BE; DialogObject::create(std::string,std::string,int,float,bool,cocos2d::_ccColor3B) ; +0x14c, 0x493ec4\nMOVS            R1, #(dword_0+2); DialogObject *                       ; +0x150, 0x493ec8\nBL              _ZN11DialogLayer6createEP12DialogObjecti; DialogLayer::create(DialogObject *,int) ; +0x152, 0x493eca\nMOV             R9, R0                                                 ; +0x156, 0x493ece\nMOV             R0, R7                                                 ; +0x158, 0x493ed0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x15a, 0x493ed2\nMOV             R0, R6                                                 ; +0x15e, 0x493ed6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x160, 0x493ed8\nLDR             R3, [R5]                                               ; +0x164, 0x493edc\nMOV             R0, R5                                                 ; +0x166, 0x493ede\nMOV             R1, R9                                                 ; +0x168, 0x493ee0\nMOVS            R2, #0x64 ; 'd'                                        ; +0x16a, 0x493ee2\nLDR.W           R3, [R3,#0xE8]                                         ; +0x16c, 0x493ee4\nBLX             R3                                                     ; +0x170, 0x493ee8\nMOV             R0, R9                                                 ; +0x172, 0x493eea\nMOVS            R1, #0                                                 ; +0x174, 0x493eec\nBL              _ZN11DialogLayer19updateChatPlacementE19DialogChatPlacement; DialogLayer::updateChatPlacement(DialogChatPlacement) ; +0x176, 0x493eee\nMOV             R0, R9; this                                           ; +0x17a, 0x493ef2\nBL              _ZN11DialogLayer19animateInRandomSideEv; DialogLayer::animateInRandomSide(void) ; +0x17c, 0x493ef4\nMOV             R0, R4                                                 ; +0x180, 0x493ef8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x182, 0x493efa\nB               loc_493F1A                                             ; +0x186, 0x493efe\nMOV             R0, R7                                                 ; +0x188, 0x493f00\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x18a, 0x493f02\nB               loc_493F08                                             ; +0x18e, 0x493f06\nMOV             R0, R6                                                 ; +0x190, 0x493f08\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x192, 0x493f0a\nB               loc_493F10                                             ; +0x196, 0x493f0e\nMOV             R0, R4                                                 ; +0x198, 0x493f10\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x19a, 0x493f12\nBL              __cxa_end_cleanup                                      ; +0x19e, 0x493f16\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x1a2, 0x493f1a\nLDR.W           R3, [R8]                                               ; +0x1a4, 0x493f1c\nCMP             R2, R3                                                 ; +0x1a8, 0x493f20\nBEQ             loc_493F28                                             ; +0x1aa, 0x493f22\nBLX             __stack_chk_fail                                       ; +0x1ac, 0x493f24\nADD             SP, SP, #0x34 ; '4'                                    ; +0x1b0, 0x493f28\nPOP.W           {R4-R9,PC}                                             ; +0x1b2, 0x493f2a", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}