{"type": "func", "start": 3844616, "end": 3845032, "name": "CreatorLayer::onSecretVault", "pseudocode": "// \n// CreatorLayer::onSecretVault from 0x3aaa08 to 0x3aaba8 (416 bytes)\n// \n// 0 xrefs:\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\nvoid CreatorLayer::onSecretVault(CreatorLayer *a1, cocos2d::CCObject *a2)\n{\n  GameStatsManager *v3; // r0\n  cocos2d::CCDirector *v4; // r4\n  cocos2d::CCScene *v5; // r0\n  cocos2d::CCTransitionFade *v6; // r0\n  int m_vaultDialogIndex; // r6\n  char *v8; // r1\n  DialogObject *v9; // r0\n  DialogLayer *v10; // r9\n  _BYTE v11[4]; // [sp+10h] [bp-14h] BYREF\n  char v12; // [sp+14h] [bp-10h] BYREF\n  _BYTE v13[4]; // [sp+18h] [bp-Ch] BYREF\n\n  v3 = GameStatsManager::sharedState();\n  if ( GameStatsManager::getStat(v3, \"13\") <= 49 )\n  {\n    sub_776584((int)v11, \"zzz\");\n    m_vaultDialogIndex = a1->m_vaultDialogIndex;\n    if ( m_vaultDialogIndex >= 0 )\n    {\n      a1->m_vaultDialogIndex = m_vaultDialogIndex + 1;\n    }\n    else\n    {\n      rand();\n      a1->m_vaultDialogIndex = lroundf();\n    }\n    if ( a1->m_vaultDialogIndex > 10 )\n      a1->m_vaultDialogIndex = 0;\n    switch ( a1->m_vaultDialogIndex )\n    {\n      case 0:\n        v8 = \"You are not ready...\";\n        goto LABEL_20;\n      case 1:\n        v8 = \"I can't let you in.\";\n        goto LABEL_20;\n      case 2:\n        v8 = \"Player used knock.<d040>\\nIt's not very effective.\";\n        goto LABEL_20;\n      case 3:\n        v8 = \"Don't you have something better to do?\";\n        goto LABEL_20;\n      case 4:\n        v8 = \"That is a bad idea...\";\n        goto LABEL_20;\n      case 5:\n        v8 = \".<d030>.<d030>.\";\n        goto LABEL_20;\n      case 6:\n        v8 = \"I guess you don't like rules...\";\n        goto LABEL_20;\n      case 7:\n        v8 = \"RubRub told me not to let anyone in.\";\n        goto LABEL_20;\n      case 8:\n        v8 = \"This is not the door you are looking for.\";\n        goto LABEL_20;\n      case 9:\n        v8 = \"I don't understand why you keep clicking...\";\n        goto LABEL_20;\n      case 0xA:\n        v8 = \"Trust me,<d030> you don't want to come in here.\";\nLABEL_20:\n        sub_7753D4((int)v11, v8);\n        break;\n      default:\n        break;\n    }\n    sub_776584((int)&v12, \"The Keymaster\");\n    sub_775C20(v13, v11);\n    v9 = (DialogObject *)DialogObject::create(\n                           (DialogObject *)&v12,\n                           (std::string)v13,\n                           (std::string)2,\n                           1065353216,\n                           0.0,\n                           255);\n    v10 = DialogLayer::create(v9, (int)&dword_0 + 2);\n    sub_774008(v13);\n    sub_774008(&v12);\n    a1->addChild_0(a1, v10, 100);\n    DialogLayer::updateChatPlacement(v10, Center);\n    DialogLayer::animateInRandomSide(v10);\n    sub_774008(v11);\n  }\n  else\n  {\n    v4 = cocos2d::CCDirector::sharedDirector();\n    v5 = SecretLayer2::scene();\n    v6 = cocos2d::CCTransitionFade::create(0.5, v5);\n    cocos2d::CCDirector::replaceScene(v4, v6);\n  }\n}", "assembly": "; \n; CreatorLayer::onSecretVault from 0x3aaa08 to 0x3aaba8 (416 bytes)\n; \n; 0 xrefs:\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\nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x3aaa08\nSUB             SP, SP, #0x24                                          ; +0x4, 0x3aaa0c\nLDR             R7, =(__stack_chk_guard_ptr - 0x3AAA16)                ; +0x6, 0x3aaa0e\nMOV             R5, R0                                                 ; +0x8, 0x3aaa10\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3aaa12\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xc, 0x3aaa14\nLDR             R3, [R7]                                               ; +0xe, 0x3aaa16\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x10, 0x3aaa18\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x12, 0x3aaa1a\nLDR             R1, =(a13 - 0x3AAA24); \"13\"                            ; +0x16, 0x3aaa1e\nADD             R1, PC; \"13\"                                           ; +0x18, 0x3aaa20\nBL              _ZN16GameStatsManager7getStatEPKc; GameStatsManager::getStat(char const*) ; +0x1a, 0x3aaa22\nCMP             R0, #0x31 ; '1'                                        ; +0x1e, 0x3aaa26\nBLE             loc_3AAA48                                             ; +0x20, 0x3aaa28\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x22, 0x3aaa2a\nMOV             R4, R0                                                 ; +0x26, 0x3aaa2e\nBL              _ZN12SecretLayer25sceneEv; SecretLayer2::scene(void)   ; +0x28, 0x3aaa30\nMOV             R1, R0; float                                          ; +0x2c, 0x3aaa34\nMOV.W           R0, #0x3F000000; this                                  ; +0x2e, 0x3aaa36\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x32, 0x3aaa3a\nMOV             R1, R0; lpsrc                                          ; +0x36, 0x3aaa3e\nMOV             R0, R4; this                                           ; +0x38, 0x3aaa40\nBL              _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x3a, 0x3aaa42\nB               loc_3AAB96                                             ; +0x3e, 0x3aaa46\nADD             R4, SP, #0x24+var_14                                   ; +0x40, 0x3aaa48\nADD.W           R8, SP, #0x24+var_C                                    ; +0x42, 0x3aaa4a\nLDR             R1, =(aZzz - 0x3AAA58); \"zzz\"                          ; +0x46, 0x3aaa4e\nMOV             R0, R4; int                                            ; +0x48, 0x3aaa50\nMOV             R2, R8                                                 ; +0x4a, 0x3aaa52\nADD             R1, PC; \"zzz\"                                          ; +0x4c, 0x3aaa54\nBL              sub_776584                                             ; +0x4e, 0x3aaa56\nLDR.W           R6, [R5,#0x14C]                                        ; +0x52, 0x3aaa5a\nCMP             R6, #0                                                 ; +0x56, 0x3aaa5e\nBGE             loc_3AAA84                                             ; +0x58, 0x3aaa60\nBLX             rand                                                   ; +0x5a, 0x3aaa62\nVMOV.F32        S15, #10.0                                             ; +0x5e, 0x3aaa66\nVMOV            S14, R0                                                ; +0x62, 0x3aaa6a\nVCVT.F32.S32    S14, S14, #0x1F                                        ; +0x66, 0x3aaa6e\nVMUL.F32        S15, S14, S15                                          ; +0x6a, 0x3aaa72\nVMOV            R0, S15                                                ; +0x6e, 0x3aaa76\nBLX             lroundf                                                ; +0x72, 0x3aaa7a\nSTR.W           R0, [R5,#0x14C]                                        ; +0x76, 0x3aaa7e\nB               loc_3AAA8A                                             ; +0x7a, 0x3aaa82\nADDS            R6, #1                                                 ; +0x7c, 0x3aaa84\nSTR.W           R6, [R5,#0x14C]                                        ; +0x7e, 0x3aaa86\nLDR.W           R3, [R5,#0x14C]                                        ; +0x82, 0x3aaa8a\nCMP             R3, #0xA                                               ; +0x86, 0x3aaa8e\nITT GT                                                                 ; +0x88, 0x3aaa90\nMOVGT           R3, #0                                                 ; +0x8a, 0x3aaa92\nSTRGT.W         R3, [R5,#0x14C]                                        ; +0x8c, 0x3aaa94\nLDR.W           R3, [R5,#0x14C]                                        ; +0x90, 0x3aaa98\nCMP             R3, #0xA; switch 11 cases                              ; +0x94, 0x3aaa9c\nBHI             def_3AAAA0; jumptable 003AAAA0 default case            ; +0x96, 0x3aaa9e\nTBB.W           [PC,R3]; switch jump                                   ; +0x98, 0x3aaaa0\nDCB 6; jump table for switch statement                                 ; +0x9c, 0x3aaaa4\nDCB 0xA                                                                ; +0x9d, 0x3aaaa5\nDCB 0xE                                                                ; +0x9e, 0x3aaaa6\nDCB 0x12                                                               ; +0x9f, 0x3aaaa7\nDCB 0x16                                                               ; +0xa0, 0x3aaaa8\nDCB 0x1A                                                               ; +0xa1, 0x3aaaa9\nDCB 0x1E                                                               ; +0xa2, 0x3aaaaa\nDCB 0x22                                                               ; +0xa3, 0x3aaaab\nDCB 0x26                                                               ; +0xa4, 0x3aaaac\nDCB 0x2A                                                               ; +0xa5, 0x3aaaad\nDCB 0x2E                                                               ; +0xa6, 0x3aaaae\nALIGN 2                                                                ; +0xa7, 0x3aaaaf\nLDR             R1, =(aYouAreNotReady - 0x3AAAB8); jumptable 003AAAA0 case 0 ; +0xa8, 0x3aaab0\nMOV             R0, R4                                                 ; +0xaa, 0x3aaab2\nADD             R1, PC; \"You are not ready...\"                         ; +0xac, 0x3aaab4\nB               loc_3AAB06                                             ; +0xae, 0x3aaab6\nLDR             R1, =(aICanTLetYouIn - 0x3AAAC0); jumptable 003AAAA0 case 1 ; +0xb0, 0x3aaab8\nMOV             R0, R4                                                 ; +0xb2, 0x3aaaba\nADD             R1, PC; \"I can't let you in.\"                          ; +0xb4, 0x3aaabc\nB               loc_3AAB06                                             ; +0xb6, 0x3aaabe\nLDR             R1, =(aPlayerUsedKnoc - 0x3AAAC8); jumptable 003AAAA0 case 2 ; +0xb8, 0x3aaac0\nMOV             R0, R4                                                 ; +0xba, 0x3aaac2\nADD             R1, PC; \"Player used knock.<d040>\\nIt's not very\"...   ; +0xbc, 0x3aaac4\nB               loc_3AAB06                                             ; +0xbe, 0x3aaac6\nLDR             R1, =(aDonTYouHaveSom - 0x3AAAD0); jumptable 003AAAA0 case 3 ; +0xc0, 0x3aaac8\nMOV             R0, R4                                                 ; +0xc2, 0x3aaaca\nADD             R1, PC; \"Don't you have something better to do?\"       ; +0xc4, 0x3aaacc\nB               loc_3AAB06                                             ; +0xc6, 0x3aaace\nLDR             R1, =(aThatIsABadIdea - 0x3AAAD8); jumptable 003AAAA0 case 4 ; +0xc8, 0x3aaad0\nMOV             R0, R4                                                 ; +0xca, 0x3aaad2\nADD             R1, PC; \"That is a bad idea...\"                        ; +0xcc, 0x3aaad4\nB               loc_3AAB06                                             ; +0xce, 0x3aaad6\nLDR             R1, =(aD030D030 - 0x3AAAE0); jumptable 003AAAA0 case 5 ; +0xd0, 0x3aaad8\nMOV             R0, R4                                                 ; +0xd2, 0x3aaada\nADD             R1, PC; \".<d030>.<d030>.\"                              ; +0xd4, 0x3aaadc\nB               loc_3AAB06                                             ; +0xd6, 0x3aaade\nLDR             R1, =(aIGuessYouDonTL - 0x3AAAE8); jumptable 003AAAA0 case 6 ; +0xd8, 0x3aaae0\nMOV             R0, R4                                                 ; +0xda, 0x3aaae2\nADD             R1, PC; \"I guess you don't like rules...\"              ; +0xdc, 0x3aaae4\nB               loc_3AAB06                                             ; +0xde, 0x3aaae6\nLDR             R1, =(aRubrubToldMeNo - 0x3AAAF0); jumptable 003AAAA0 case 7 ; +0xe0, 0x3aaae8\nMOV             R0, R4                                                 ; +0xe2, 0x3aaaea\nADD             R1, PC; \"RubRub told me not to let anyone in.\"         ; +0xe4, 0x3aaaec\nB               loc_3AAB06                                             ; +0xe6, 0x3aaaee\nLDR             R1, =(aThisIsNotTheDo - 0x3AAAF8); jumptable 003AAAA0 case 8 ; +0xe8, 0x3aaaf0\nMOV             R0, R4                                                 ; +0xea, 0x3aaaf2\nADD             R1, PC; \"This is not the door you are looking fo\"...   ; +0xec, 0x3aaaf4\nB               loc_3AAB06                                             ; +0xee, 0x3aaaf6\nLDR             R1, =(aIDonTUnderstan - 0x3AAB00); jumptable 003AAAA0 case 9 ; +0xf0, 0x3aaaf8\nMOV             R0, R4                                                 ; +0xf2, 0x3aaafa\nADD             R1, PC; \"I don't understand why you keep clickin\"...   ; +0xf4, 0x3aaafc\nB               loc_3AAB06                                             ; +0xf6, 0x3aaafe\nLDR             R1, =(aTrustMeD030You - 0x3AAB08); jumptable 003AAAA0 case 10 ; +0xf8, 0x3aab00\nMOV             R0, R4; int                                            ; +0xfa, 0x3aab02\nADD             R1, PC; \"Trust me,<d030> you don't want to come \"...   ; +0xfc, 0x3aab04\nBL              sub_7753D4                                             ; +0xfe, 0x3aab06\nADD             R6, SP, #0x24+var_10; jumptable 003AAAA0 default case  ; +0x102, 0x3aab0a\nLDR             R1, =(aTheKeymaster - 0x3AAB16); \"The Keymaster\"       ; +0x104, 0x3aab0c\nADD             R2, SP, #0x24+var_18                                   ; +0x106, 0x3aab0e\nMOV             R0, R6; int                                            ; +0x108, 0x3aab10\nADD             R1, PC; \"The Keymaster\"                                ; +0x10a, 0x3aab12\nBL              sub_776584                                             ; +0x10c, 0x3aab14\nMOV             R0, R8                                                 ; +0x110, 0x3aab18\nMOV             R1, R4                                                 ; +0x112, 0x3aab1a\nBL              sub_775C20                                             ; +0x114, 0x3aab1c\nMOV             R3, SP                                                 ; +0x118, 0x3aab20\nMOVS            R2, #0                                                 ; +0x11a, 0x3aab22\nSTR.W           R2, [R3+0x24+var_24],#4                                ; +0x11c, 0x3aab24\nMOV             R0, R6                                                 ; +0x120, 0x3aab28\nLDR             R2, =(word_9AA930 - 0x3AAB30)                          ; +0x122, 0x3aab2a\nADD             R2, PC; word_9AA930                                    ; +0x124, 0x3aab2c\nLDRH            R1, [R2]                                               ; +0x126, 0x3aab2e\nLDRB            R2, [R2,#(byte_9AA932 - 0x9AA930)]                     ; +0x128, 0x3aab30\nSTRH.W          R1, [SP,#0x24+var_20]                                  ; +0x12a, 0x3aab32\nMOV             R1, R8                                                 ; +0x12e, 0x3aab36\nSTRB            R2, [R3,#2]                                            ; +0x130, 0x3aab38\nMOVS            R2, #2                                                 ; +0x132, 0x3aab3a\nMOV.W           R3, #0x3F800000                                        ; +0x134, 0x3aab3c\nBL              _ZN12DialogObject6createESsSsifbN7cocos2d10_ccColor3BE; DialogObject::create(std::string,std::string,int,float,bool,cocos2d::_ccColor3B) ; +0x138, 0x3aab40\nMOVS            R1, #(dword_0+2); DialogObject *                       ; +0x13c, 0x3aab44\nBL              _ZN11DialogLayer6createEP12DialogObjecti; DialogLayer::create(DialogObject *,int) ; +0x13e, 0x3aab46\nMOV             R9, R0                                                 ; +0x142, 0x3aab4a\nMOV             R0, R8                                                 ; +0x144, 0x3aab4c\nBL              sub_774008                                             ; +0x146, 0x3aab4e\nMOV             R0, R6                                                 ; +0x14a, 0x3aab52\nBL              sub_774008                                             ; +0x14c, 0x3aab54\nLDR             R3, [R5]                                               ; +0x150, 0x3aab58\nMOV             R0, R5                                                 ; +0x152, 0x3aab5a\nMOV             R1, R9                                                 ; +0x154, 0x3aab5c\nMOVS            R2, #0x64 ; 'd'                                        ; +0x156, 0x3aab5e\nLDR.W           R3, [R3,#0xE0]                                         ; +0x158, 0x3aab60\nBLX             R3                                                     ; +0x15c, 0x3aab64\nMOV             R0, R9                                                 ; +0x15e, 0x3aab66\nMOVS            R1, #0                                                 ; +0x160, 0x3aab68\nBL              _ZN11DialogLayer19updateChatPlacementE19DialogChatPlacement; DialogLayer::updateChatPlacement(DialogChatPlacement) ; +0x162, 0x3aab6a\nMOV             R0, R9; this                                           ; +0x166, 0x3aab6e\nBL              _ZN11DialogLayer19animateInRandomSideEv; DialogLayer::animateInRandomSide(void) ; +0x168, 0x3aab70\nMOV             R0, R4                                                 ; +0x16c, 0x3aab74\nBL              sub_774008                                             ; +0x16e, 0x3aab76\nB               loc_3AAB96                                             ; +0x172, 0x3aab7a\nMOV             R0, R8                                                 ; +0x174, 0x3aab7c\nBL              sub_774008                                             ; +0x176, 0x3aab7e\nB               loc_3AAB84                                             ; +0x17a, 0x3aab82\nMOV             R0, R6                                                 ; +0x17c, 0x3aab84\nBL              sub_774008                                             ; +0x17e, 0x3aab86\nB               loc_3AAB8C                                             ; +0x182, 0x3aab8a\nMOV             R0, R4                                                 ; +0x184, 0x3aab8c\nBL              sub_774008                                             ; +0x186, 0x3aab8e\nBL              __cxa_end_cleanup                                      ; +0x18a, 0x3aab92\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x18e, 0x3aab96\nLDR             R3, [R7]                                               ; +0x190, 0x3aab98\nCMP             R2, R3                                                 ; +0x192, 0x3aab9a\nBEQ             loc_3AABA2                                             ; +0x194, 0x3aab9c\nBLX             __stack_chk_fail                                       ; +0x196, 0x3aab9e\nADD             SP, SP, #0x24 ; '$'                                    ; +0x19a, 0x3aaba2\nPOP.W           {R4-R9,PC}                                             ; +0x19c, 0x3aaba4", "xrefs": [], "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"}