{"type": "func", "start": 4297989476, "end": 4297990104, "name": "GameOptionsLayer::showPracticeMusicSyncUnlockInfo", "pseudocode": "// \n// GameOptionsLayer::showPracticeMusicSyncUnlockInfo from 0x1002e1d64 to 0x1002e1fd8 (628 bytes)\n// \n// 1 xrefs:\n// > GameOptionsLayer::onPracticeMusicSync @ 0x1002e1d24\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 __fastcall GameOptionsLayer::showPracticeMusicSyncUnlockInfo(GameOptionsLayer *a1)\n{\n  int m_practiceDialogIndex; // w8\n  int v3; // w20\n  int v4; // w21\n  const std::string::value_type *v5; // x1\n  char *v6; // x0\n  DialogLayer *v7; // x20\n  int v8; // w8\n  int v9; // w8\n  std::string __p; // [xsp+0h] [xbp-90h] BYREF\n  std::string __dst; // [xsp+20h] [xbp-70h] BYREF\n  std::string v12; // [xsp+40h] [xbp-50h] BYREF\n  std::string v13; // [xsp+58h] [xbp-38h] BYREF\n\n  sub_100009900(&v13, \"\");\n  sub_100009900(&v12, \"Scratch\");\n  m_practiceDialogIndex = a1->m_practiceDialogIndex;\n  v3 = 10;\n  v4 = 2;\n  if ( m_practiceDialogIndex > 3 )\n  {\n    if ( m_practiceDialogIndex > 5 )\n    {\n      if ( m_practiceDialogIndex != 6 )\n      {\n        if ( m_practiceDialogIndex != 7 )\n          goto LABEL_20;\n        v5 = \".<d010>.<d010>.<d010>\";\n        goto LABEL_14;\n      }\n      std::string::assign(\n        &v13,\n        \"<cl>ShiMmer.<d010>.<d010>.<d010> sHim.<d010>.<d010>.<d010> bLiNg<d020> sNap.<d010>.<d010>.<d010> <i050><s260>HA!</s></i></c>\");\n      std::string::assign(&v12, \"Diamond Shopkeeper\");\n      v3 = 42;\n    }\n    else\n    {\n      if ( m_practiceDialogIndex != 4 )\n      {\n        std::string::assign(&v13, \"Looks to me like you had enough <cy>shiny</c>.<d010>.<d010>.<d010>\");\n        v3 = 11;\n        goto LABEL_20;\n      }\n      std::string::assign(\n        &v13,\n        \"<cl>ShiM gNaw glEaM.<d010>.<d010>.<d010></c> <cy><i050><s260>bRinG</s> <s260>ShiNy!</c></s></i>\");\n      std::string::assign(&v12, \"Diamond Shopkeeper\");\n      v3 = 41;\n    }\nLABEL_19:\n    v4 = 4;\n    goto LABEL_20;\n  }\n  if ( m_practiceDialogIndex > 1 )\n  {\n    if ( m_practiceDialogIndex != 2 )\n    {\n      v5 = \"See what I mean?.<d010>.<d010>.<d010>\";\nLABEL_14:\n      std::string::assign(&v13, v5);\n      v3 = 12;\n      goto LABEL_20;\n    }\n    std::string::assign(&v13, \"<cl>SpaRkle gnAsH Glorp sHiMmerRr crUnCHle bLinGz...</c>\");\n    std::string::assign(&v12, \"Diamond Shopkeeper\");\n    v3 = 40;\n    goto LABEL_19;\n  }\n  if ( m_practiceDialogIndex )\n  {\n    if ( m_practiceDialogIndex == 1 )\n    {\n      std::string::assign(&v13, \"I think the <cl>Diamond Shopkeeper</c> has one, <d030><co>weird guy</c>...\");\n      v3 = 26;\n    }\n  }\n  else\n  {\n    std::string::assign(\n      &v13,\n      \"You need a <cg>Music Unlocker</c> to play <cy>normal music</c> in <cl>practice mode</c>.\");\n  }\nLABEL_20:\n  if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )\n    sub_1000097D0(&__dst, v12.__r_.__value_.__l.__data_, v12.__r_.__value_.__l.__size_);\n  else\n    __dst = v12;\n  if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )\n    sub_1000097D0(&__p, v13.__r_.__value_.__l.__data_, v13.__r_.__value_.__l.__size_);\n  else\n    __p = v13;\n  v6 = DialogObject::create((__int64)&__dst, (__int64)&__p, v3, 0, 0xFFFFFF, 1.0);\n  v7 = DialogLayer::create((DialogObject *)v6, v4);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n  if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__dst.__r_.__value_.__l.__data_);\n  DialogLayer::addToMainScene(v7);\n  DialogLayer::updateChatPlacement(v7, Center);\n  DialogLayer::animateIn(v7, FromCenter);\n  v8 = a1->m_practiceDialogIndex;\n  if ( v8 <= 6 )\n    v9 = v8 + 1;\n  else\n    v9 = 0;\n  a1->m_practiceDialogIndex = v9;\n  if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v12.__r_.__value_.__l.__data_);\n  if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v13.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; GameOptionsLayer::showPracticeMusicSyncUnlockInfo from 0x1002e1d64 to 0x1002e1fd8 (628 bytes)\n; \n; 1 xrefs:\n; > GameOptionsLayer::onPracticeMusicSync @ 0x1002e1d24\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\nSUB             SP, SP, #0xA0                                          ; +0x0, 0x1002e1d64\nSTP             X22, X21, [SP,#0x90+var_20]                            ; +0x4, 0x1002e1d68\nSTP             X20, X19, [SP,#0x90+var_10]                            ; +0x8, 0x1002e1d6c\nSTP             X29, X30, [SP,#0x90+var_s0]                            ; +0xc, 0x1002e1d70\nADD             X29, SP, #0x90                                         ; +0x10, 0x1002e1d74\nMOV             X19, X0                                                ; +0x14, 0x1002e1d78\nADRL            X1, asc_100746688; \"\"                                  ; +0x18, 0x1002e1d7c\nSUB             X0, X29, #-var_38; int                                 ; +0x20, 0x1002e1d84\nBL              sub_100009900                                          ; +0x24, 0x1002e1d88\nADRL            X1, aScratch; \"Scratch\"                                ; +0x28, 0x1002e1d8c\nADD             X0, SP, #0x90+var_50; int                              ; +0x30, 0x1002e1d94\nBL              sub_100009900                                          ; +0x34, 0x1002e1d98\nLDR             W8, [X19,#0x420]                                       ; +0x38, 0x1002e1d9c\nMOV             W20, #0xA                                              ; +0x3c, 0x1002e1da0\nMOV             W21, #2                                                ; +0x40, 0x1002e1da4\nCMP             W8, #3                                                 ; +0x44, 0x1002e1da8\nB.GT            loc_1002E1DDC                                          ; +0x48, 0x1002e1dac\nCMP             W8, #1                                                 ; +0x4c, 0x1002e1db0\nB.GT            loc_1002E1E0C                                          ; +0x50, 0x1002e1db4\nCBZ             W8, loc_1002E1E50                                      ; +0x54, 0x1002e1db8\nCMP             W8, #1                                                 ; +0x58, 0x1002e1dbc\nB.NE            loc_1002E1EDC                                          ; +0x5c, 0x1002e1dc0\nADRL            X1, aIThinkTheClDia; \"I think the <cl>Diamond Shopkeeper</c> \"... ; +0x60, 0x1002e1dc4\nSUB             X0, X29, #-var_38; this                                ; +0x68, 0x1002e1dcc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x6c, 0x1002e1dd0\nMOV             W20, #0x1A                                             ; +0x70, 0x1002e1dd4\nB               loc_1002E1EDC                                          ; +0x74, 0x1002e1dd8\nCMP             W8, #5                                                 ; +0x78, 0x1002e1ddc\nB.GT            loc_1002E1E28                                          ; +0x7c, 0x1002e1de0\nCMP             W8, #4                                                 ; +0x80, 0x1002e1de4\nB.EQ            loc_1002E1E64                                          ; +0x84, 0x1002e1de8\nCMP             W8, #5                                                 ; +0x88, 0x1002e1dec\nB.NE            loc_1002E1EDC                                          ; +0x8c, 0x1002e1df0\nADRL            X1, aLooksToMeLikeY; \"Looks to me like you had enough <cy>shi\"... ; +0x90, 0x1002e1df4\nSUB             X0, X29, #-var_38; this                                ; +0x98, 0x1002e1dfc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x9c, 0x1002e1e00\nMOV             W20, #0xB                                              ; +0xa0, 0x1002e1e04\nB               loc_1002E1EDC                                          ; +0xa4, 0x1002e1e08\nCMP             W8, #2                                                 ; +0xa8, 0x1002e1e0c\nB.EQ            loc_1002E1E8C                                          ; +0xac, 0x1002e1e10\nCMP             W8, #3                                                 ; +0xb0, 0x1002e1e14\nB.NE            loc_1002E1EDC                                          ; +0xb4, 0x1002e1e18\nADRL            X1, aSeeWhatIMeanD0; \"See what I mean?.<d010>.<d010>.<d010>\" ; +0xb8, 0x1002e1e1c\nB               loc_1002E1E40                                          ; +0xc0, 0x1002e1e24\nCMP             W8, #6                                                 ; +0xc4, 0x1002e1e28\nB.EQ            loc_1002E1EB4                                          ; +0xc8, 0x1002e1e2c\nCMP             W8, #7                                                 ; +0xcc, 0x1002e1e30\nB.NE            loc_1002E1EDC                                          ; +0xd0, 0x1002e1e34\nADRL            X1, aD010D010D010_0; \".<d010>.<d010>.<d010>\"           ; +0xd4, 0x1002e1e38\nSUB             X0, X29, #-var_38; this                                ; +0xdc, 0x1002e1e40\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xe0, 0x1002e1e44\nMOV             W20, #0xC                                              ; +0xe4, 0x1002e1e48\nB               loc_1002E1EDC                                          ; +0xe8, 0x1002e1e4c\nADRL            X1, aYouNeedACgMusi; \"You need a <cg>Music Unlocker</c> to pl\"... ; +0xec, 0x1002e1e50\nSUB             X0, X29, #-var_38; this                                ; +0xf4, 0x1002e1e58\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xf8, 0x1002e1e5c\nB               loc_1002E1EDC                                          ; +0xfc, 0x1002e1e60\nADRL            X1, aClShimGnawGlea; \"<cl>ShiM gNaw glEaM.<d010>.<d010>.<d010\"... ; +0x100, 0x1002e1e64\nSUB             X0, X29, #-var_38; this                                ; +0x108, 0x1002e1e6c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x10c, 0x1002e1e70\nADRL            X1, aDiamondShopkee; \"Diamond Shopkeeper\"              ; +0x110, 0x1002e1e74\nADD             X0, SP, #0x90+var_50; this                             ; +0x118, 0x1002e1e7c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x11c, 0x1002e1e80\nMOV             W20, #0x29 ; ')'                                       ; +0x120, 0x1002e1e84\nB               loc_1002E1ED8                                          ; +0x124, 0x1002e1e88\nADRL            X1, aClSparkleGnash; \"<cl>SpaRkle gnAsH Glorp sHiMmerRr crUnC\"... ; +0x128, 0x1002e1e8c\nSUB             X0, X29, #-var_38; this                                ; +0x130, 0x1002e1e94\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x134, 0x1002e1e98\nADRL            X1, aDiamondShopkee; \"Diamond Shopkeeper\"              ; +0x138, 0x1002e1e9c\nADD             X0, SP, #0x90+var_50; this                             ; +0x140, 0x1002e1ea4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x144, 0x1002e1ea8\nMOV             W20, #0x28 ; '('                                       ; +0x148, 0x1002e1eac\nB               loc_1002E1ED8                                          ; +0x14c, 0x1002e1eb0\nADRL            X1, aClShimmerD010D; \"<cl>ShiMmer.<d010>.<d010>.<d010> sHim.<\"... ; +0x150, 0x1002e1eb4\nSUB             X0, X29, #-var_38; this                                ; +0x158, 0x1002e1ebc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x15c, 0x1002e1ec0\nADRL            X1, aDiamondShopkee; \"Diamond Shopkeeper\"              ; +0x160, 0x1002e1ec4\nADD             X0, SP, #0x90+var_50; this                             ; +0x168, 0x1002e1ecc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x16c, 0x1002e1ed0\nMOV             W20, #0x2A ; '*'                                       ; +0x170, 0x1002e1ed4\nMOV             W21, #4                                                ; +0x174, 0x1002e1ed8\nLDRSB           W8, [SP,#0x90+var_50.__r_.__value_+0x17]               ; +0x178, 0x1002e1edc\nTBNZ            W8, #0x1F, loc_1002E1EF8                               ; +0x17c, 0x1002e1ee0\nLDR             Q0, [SP,#0x90+var_50]                                  ; +0x180, 0x1002e1ee4\nSTR             Q0, [SP,#0x90+__dst]                                   ; +0x184, 0x1002e1ee8\nLDR             X8, [SP,#0x50]                                         ; +0x188, 0x1002e1eec\nSTR             X8, [SP,#0x90+var_60]                                  ; +0x18c, 0x1002e1ef0\nB               loc_1002E1F04                                          ; +0x190, 0x1002e1ef4\nLDP             X1, X2, [SP,#0x90+var_50]; __src                       ; +0x194, 0x1002e1ef8\nADD             X0, SP, #0x90+__dst; __dst                             ; +0x198, 0x1002e1efc\nBL              sub_1000097D0                                          ; +0x19c, 0x1002e1f00\nLDURSB          W8, [X29,#var_38.__r_.__value_+0x17]                   ; +0x1a0, 0x1002e1f04\nTBNZ            W8, #0x1F, loc_1002E1F20                               ; +0x1a4, 0x1002e1f08\nLDUR            Q0, [X29,#var_38]                                      ; +0x1a8, 0x1002e1f0c\nSTR             Q0, [SP,#0x90+__p]                                     ; +0x1ac, 0x1002e1f10\nLDUR            X8, [X29,#-0x28]                                       ; +0x1b0, 0x1002e1f14\nSTR             X8, [SP,#0x90+var_80]                                  ; +0x1b4, 0x1002e1f18\nB               loc_1002E1F2C                                          ; +0x1b8, 0x1002e1f1c\nLDP             X1, X2, [X29,#var_38]; __src                           ; +0x1bc, 0x1002e1f20\nMOV             X0, SP; __dst                                          ; +0x1c0, 0x1002e1f24\nBL              sub_1000097D0                                          ; +0x1c4, 0x1002e1f28\nADD             X0, SP, #0x90+__dst                                    ; +0x1c8, 0x1002e1f2c\nMOV             X1, SP                                                 ; +0x1cc, 0x1002e1f30\nFMOV            S0, #1.0                                               ; +0x1d0, 0x1002e1f34\nMOV             X2, X20                                                ; +0x1d4, 0x1002e1f38\nMOV             W3, #0                                                 ; +0x1d8, 0x1002e1f3c\nMOV             W4, #0xFFFFFF                                          ; +0x1dc, 0x1002e1f40\nBL              DialogObject__create                                   ; +0x1e0, 0x1002e1f44\nMOV             X1, X21                                                ; +0x1e4, 0x1002e1f48\nBL              DialogLayer__create                                    ; +0x1e8, 0x1002e1f4c\nMOV             X20, X0                                                ; +0x1ec, 0x1002e1f50\nLDRSB           W8, [SP,#0x90+var_80+7]                                ; +0x1f0, 0x1002e1f54\nTBZ             W8, #0x1F, loc_1002E1F64                               ; +0x1f4, 0x1002e1f58\nLDR             X0, [SP,#0x90+__p]; __p                                ; +0x1f8, 0x1002e1f5c\nBL              __ZdlPv; operator delete(void *)                       ; +0x1fc, 0x1002e1f60\nLDRSB           W8, [SP,#0x90+var_60+7]                                ; +0x200, 0x1002e1f64\nTBZ             W8, #0x1F, loc_1002E1F74                               ; +0x204, 0x1002e1f68\nLDR             X0, [SP,#0x90+__dst]; __p                              ; +0x208, 0x1002e1f6c\nBL              __ZdlPv; operator delete(void *)                       ; +0x20c, 0x1002e1f70\nMOV             X0, X20                                                ; +0x210, 0x1002e1f74\nBL              DialogLayer__addToMainScene                            ; +0x214, 0x1002e1f78\nMOV             X0, X20                                                ; +0x218, 0x1002e1f7c\nMOV             W1, #0                                                 ; +0x21c, 0x1002e1f80\nBL              DialogLayer__updateChatPlacement                       ; +0x220, 0x1002e1f84\nMOV             X0, X20                                                ; +0x224, 0x1002e1f88\nMOV             W1, #1                                                 ; +0x228, 0x1002e1f8c\nBL              DialogLayer__animateIn                                 ; +0x22c, 0x1002e1f90\nLDR             W8, [X19,#0x420]                                       ; +0x230, 0x1002e1f94\nCMP             W8, #6                                                 ; +0x234, 0x1002e1f98\nCSINC           W8, WZR, W8, GT                                        ; +0x238, 0x1002e1f9c\nSTR             W8, [X19,#0x420]                                       ; +0x23c, 0x1002e1fa0\nLDRSB           W8, [SP,#0x90+var_50.__r_.__value_+0x17]               ; +0x240, 0x1002e1fa4\nTBZ             W8, #0x1F, loc_1002E1FB4                               ; +0x244, 0x1002e1fa8\nLDR             X0, [SP,#0x90+var_50]; __p                             ; +0x248, 0x1002e1fac\nBL              __ZdlPv; operator delete(void *)                       ; +0x24c, 0x1002e1fb0\nLDURSB          W8, [X29,#var_38.__r_.__value_+0x17]                   ; +0x250, 0x1002e1fb4\nTBZ             W8, #0x1F, loc_1002E1FC4                               ; +0x254, 0x1002e1fb8\nLDUR            X0, [X29,#var_38]; __p                                 ; +0x258, 0x1002e1fbc\nBL              __ZdlPv; operator delete(void *)                       ; +0x25c, 0x1002e1fc0\nLDP             X29, X30, [SP,#0x90+var_s0]                            ; +0x260, 0x1002e1fc4\nLDP             X20, X19, [SP,#0x90+var_10]                            ; +0x264, 0x1002e1fc8\nLDP             X22, X21, [SP,#0x90+var_20]                            ; +0x268, 0x1002e1fcc\nADD             SP, SP, #0xA0                                          ; +0x26c, 0x1002e1fd0\nRET                                                                    ; +0x270, 0x1002e1fd4", "xrefs": ["GameOptionsLayer::onPracticeMusicSync @ 0x1002e1d24"], "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"}