{"type": "func", "start": 4298005048, "end": 4298005568, "name": "GJDifficultySprite::updateFeatureState", "pseudocode": "// \n// GJDifficultySprite::updateFeatureState from 0x1002e5a38 to 0x1002e5c40 (520 bytes)\n// \n// 3 xrefs:\n// > RateStarsLayer::onFeature @ 0x100080998\n// > GJRateLevelLayer::onFeature @ 0x1001b17e0\n// > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002e5a30\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 GJDifficultySprite::updateFeatureState(GJDifficultySprite *a1, GJFeatureState a2)\n{\n  unsigned __int32 v3; // w8\n  std::string *v4; // x0\n  cocos2d::CCSprite *v5; // x20\n  float v6; // s8\n  __int64 v7; // x0\n  __n128 v8; // q0\n  __n128 v9; // q1\n  cocos2d::CCParticleSystemQuad *v10; // x20\n  float v11; // s8\n  __int64 v12; // x0\n  __n128 v13; // q0\n  __n128 v14; // q1\n  int v15; // w19\n  int v16; // [xsp+8h] [xbp-58h] BYREF\n  void *__p[2]; // [xsp+10h] [xbp-50h] BYREF\n  char v18; // [xsp+27h] [xbp-39h]\n  std::string v19; // [xsp+28h] [xbp-38h] BYREF\n\n  if ( a1->m_featureState != a2 )\n  {\n    a1->m_featureState = a2;\n    ((void (__fastcall *)(GJDifficultySprite *))a1->removeAllChildren)(a1);\n    if ( a1->m_featureState )\n    {\n      sub_100009900(&v19, \"GJ_featuredCoin_001.png\");\n      v3 = a1->m_featureState - 2;\n      if ( v3 < 3 )\n        std::string::assign(&v19, off_1007E55D8[v3]);\n      if ( (v19.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n        v4 = &v19;\n      else\n        v4 = (std::string *)v19.__r_.__value_.__r.__words[0];\n      v5 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v4);\n      ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v5, 4294967294LL);\n      v6 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n      v7 = ((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n      v8.n128_f32[0] = v6 * 0.5;\n      v9.n128_f32[0] = *(float *)(v7 + 4) * 0.5;\n      sub_100022980(v8, v9, __p);\n      ((void (__fastcall *)(cocos2d::CCSprite *, void **))v5->setPosition)(v5, __p);\n      if ( a1->m_featureState == Mythic )\n      {\n        sub_100009900(\n          __p,\n          \"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a0a0a0a4a1a0a0a0a0a1a0a1a0a1a0a1a1a0a0a0a0a0.784314a0a1a0a1a0a0.27a0a0.2\"\n          \"7a0a0a0a0a0a0a0a0a2a1a0a0a0a0a0a0a0.25a0a0a0a0a0a0a0a0a0a0a0\");\n        v10 = GameToolbox::particleFromString((__int64)__p, nullptr, 0);\n        ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCParticleSystemQuad *, __int64))a1->addChild_0)(\n          a1,\n          v10,\n          0xFFFFFFFFLL);\n        ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v10->setScale)(v10, 0.9);\n        cocos2d::CCParticleSystem::resetSystem(v10);\n        v11 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n        v12 = ((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n        v13.n128_f32[0] = v11 * 0.5;\n        v14.n128_f32[0] = *(float *)(v12 + 4) * 0.5;\n        sub_100022980(v13, v14, &v16);\n        ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, int *))v10->setPosition)(v10, &v16);\n        v15 = 5;\n        do\n        {\n          ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v10->update)(v10, 0.15);\n          --v15;\n        }\n        while ( v15 );\n        if ( v18 < 0 )\n          operator delete(__p[0]);\n      }\n      if ( SHIBYTE(v19.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(v19.__r_.__value_.__l.__data_);\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateFeatureState from 0x1002e5a38 to 0x1002e5c40 (520 bytes)\n; \n; 3 xrefs:\n; > RateStarsLayer::onFeature @ 0x100080998\n; > GJRateLevelLayer::onFeature @ 0x1001b17e0\n; > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002e5a30\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, #0x70                                          ; +0x0, 0x1002e5a38\nSTP             D9, D8, [SP,#0x60+var_20]                              ; +0x4, 0x1002e5a3c\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x1002e5a40\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x1002e5a44\nADD             X29, SP, #0x60                                         ; +0x10, 0x1002e5a48\nLDR             W8, [X0,#0x254]                                        ; +0x14, 0x1002e5a4c\nCMP             W8, W1                                                 ; +0x18, 0x1002e5a50\nB.EQ            loc_1002E5C2C                                          ; +0x1c, 0x1002e5a54\nMOV             X19, X0                                                ; +0x20, 0x1002e5a58\nSTR             W1, [X0,#0x254]                                        ; +0x24, 0x1002e5a5c\nLDR             X8, [X0]                                               ; +0x28, 0x1002e5a60\nLDR             X8, [X8,#0x230]                                        ; +0x2c, 0x1002e5a64\nBLR             X8                                                     ; +0x30, 0x1002e5a68\nLDR             W8, [X19,#0x254]                                       ; +0x34, 0x1002e5a6c\nCBZ             W8, loc_1002E5C2C                                      ; +0x38, 0x1002e5a70\nADRL            X1, aGjFeaturedcoin; \"GJ_featuredCoin_001.png\"         ; +0x3c, 0x1002e5a74\nADD             X20, SP, #0x60+var_38                                  ; +0x44, 0x1002e5a7c\nADD             X0, SP, #0x60+var_38; int                              ; +0x48, 0x1002e5a80\nBL              sub_100009900                                          ; +0x4c, 0x1002e5a84\nLDR             W8, [X19,#0x254]                                       ; +0x50, 0x1002e5a88\nSUB             W8, W8, #2                                             ; +0x54, 0x1002e5a8c\nCMP             W8, #3                                                 ; +0x58, 0x1002e5a90\nB.CS            loc_1002E5AAC                                          ; +0x5c, 0x1002e5a94\nADRL            X9, off_1007E55D8; \"GJ_epicCoin_001.png\"               ; +0x60, 0x1002e5a98\nLDR             X1, [X9,W8,UXTW#3]; __s                                ; +0x68, 0x1002e5aa0\nADD             X0, SP, #0x60+var_38; this                             ; +0x6c, 0x1002e5aa4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x70, 0x1002e5aa8\nLDRSB           W8, [SP,#0x60+var_38.__r_.__value_+0x17]               ; +0x74, 0x1002e5aac\nLDR             X9, [SP,#0x60+var_38]                                  ; +0x78, 0x1002e5ab0\nCMP             W8, #0                                                 ; +0x7c, 0x1002e5ab4\nCSEL            X0, X9, X20, LT                                        ; +0x80, 0x1002e5ab8\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x84, 0x1002e5abc\nMOV             X20, X0                                                ; +0x88, 0x1002e5ac0\nLDR             X8, [X19]                                              ; +0x8c, 0x1002e5ac4\nLDR             X8, [X8,#0x1C0]                                        ; +0x90, 0x1002e5ac8\nMOV             X0, X19                                                ; +0x94, 0x1002e5acc\nMOV             X1, X20                                                ; +0x98, 0x1002e5ad0\nMOV             W2, #0xFFFFFFFE                                        ; +0x9c, 0x1002e5ad4\nBLR             X8                                                     ; +0xa0, 0x1002e5ad8\nLDR             X8, [X19]                                              ; +0xa4, 0x1002e5adc\nLDR             X8, [X8,#0x138]                                        ; +0xa8, 0x1002e5ae0\nMOV             X0, X19                                                ; +0xac, 0x1002e5ae4\nBLR             X8                                                     ; +0xb0, 0x1002e5ae8\nLDR             S8, [X0]                                               ; +0xb4, 0x1002e5aec\nLDR             X8, [X19]                                              ; +0xb8, 0x1002e5af0\nLDR             X8, [X8,#0x138]                                        ; +0xbc, 0x1002e5af4\nMOV             X0, X19                                                ; +0xc0, 0x1002e5af8\nBLR             X8                                                     ; +0xc4, 0x1002e5afc\nFMOV            S1, #0.5                                               ; +0xc8, 0x1002e5b00\nFMUL            S0, S8, S1                                             ; +0xcc, 0x1002e5b04\nLDR             S2, [X0,#4]                                            ; +0xd0, 0x1002e5b08\nFMUL            S1, S2, S1                                             ; +0xd4, 0x1002e5b0c\nADD             X0, SP, #0x60+__p                                      ; +0xd8, 0x1002e5b10\nBL              sub_100022980                                          ; +0xdc, 0x1002e5b14\nLDR             X8, [X20]                                              ; +0xe0, 0x1002e5b18\nLDR             X8, [X8,#0xB8]                                         ; +0xe4, 0x1002e5b1c\nADD             X1, SP, #0x60+__p                                      ; +0xe8, 0x1002e5b20\nMOV             X0, X20                                                ; +0xec, 0x1002e5b24\nBLR             X8                                                     ; +0xf0, 0x1002e5b28\nLDR             W8, [X19,#0x254]                                       ; +0xf4, 0x1002e5b2c\nCMP             W8, #4                                                 ; +0xf8, 0x1002e5b30\nB.NE            loc_1002E5C1C                                          ; +0xfc, 0x1002e5b34\nADRL            X1, a30a1a13a02a20a; \"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a\"... ; +0x100, 0x1002e5b38\nADD             X0, SP, #0x60+__p; int                                 ; +0x108, 0x1002e5b40\nBL              sub_100009900                                          ; +0x10c, 0x1002e5b44\nADD             X0, SP, #0x60+__p                                      ; +0x110, 0x1002e5b48\nMOV             X1, #0                                                 ; +0x114, 0x1002e5b4c\nMOV             W2, #0                                                 ; +0x118, 0x1002e5b50\nBL              GameToolbox__particleFromString                        ; +0x11c, 0x1002e5b54\nMOV             X20, X0                                                ; +0x120, 0x1002e5b58\nLDR             X8, [X19]                                              ; +0x124, 0x1002e5b5c\nLDR             X8, [X8,#0x1C0]                                        ; +0x128, 0x1002e5b60\nMOV             X0, X19                                                ; +0x12c, 0x1002e5b64\nMOV             X1, X20                                                ; +0x130, 0x1002e5b68\nMOV             W2, #0xFFFFFFFF                                        ; +0x134, 0x1002e5b6c\nBLR             X8                                                     ; +0x138, 0x1002e5b70\nLDR             X8, [X20]                                              ; +0x13c, 0x1002e5b74\nLDR             X8, [X8,#0xA0]                                         ; +0x140, 0x1002e5b78\nADRP            X9, #dword_100635564@PAGE                              ; +0x144, 0x1002e5b7c\nLDR             S0, [X9,#dword_100635564@PAGEOFF]                      ; +0x148, 0x1002e5b80\nMOV             X0, X20                                                ; +0x14c, 0x1002e5b84\nBLR             X8                                                     ; +0x150, 0x1002e5b88\nMOV             X0, X20                                                ; +0x154, 0x1002e5b8c\nBL              cocos2d__CCParticleSystem__resetSystem                 ; +0x158, 0x1002e5b90\nLDR             X8, [X19]                                              ; +0x15c, 0x1002e5b94\nLDR             X8, [X8,#0x138]                                        ; +0x160, 0x1002e5b98\nMOV             X0, X19                                                ; +0x164, 0x1002e5b9c\nBLR             X8                                                     ; +0x168, 0x1002e5ba0\nLDR             S8, [X0]                                               ; +0x16c, 0x1002e5ba4\nLDR             X8, [X19]                                              ; +0x170, 0x1002e5ba8\nLDR             X8, [X8,#0x138]                                        ; +0x174, 0x1002e5bac\nMOV             X0, X19                                                ; +0x178, 0x1002e5bb0\nBLR             X8                                                     ; +0x17c, 0x1002e5bb4\nFMOV            S1, #0.5                                               ; +0x180, 0x1002e5bb8\nFMUL            S0, S8, S1                                             ; +0x184, 0x1002e5bbc\nLDR             S2, [X0,#4]                                            ; +0x188, 0x1002e5bc0\nFMUL            S1, S2, S1                                             ; +0x18c, 0x1002e5bc4\nADD             X0, SP, #0x60+var_58                                   ; +0x190, 0x1002e5bc8\nBL              sub_100022980                                          ; +0x194, 0x1002e5bcc\nLDR             X8, [X20]                                              ; +0x198, 0x1002e5bd0\nLDR             X8, [X8,#0xB8]                                         ; +0x19c, 0x1002e5bd4\nADD             X1, SP, #0x60+var_58                                   ; +0x1a0, 0x1002e5bd8\nMOV             X0, X20                                                ; +0x1a4, 0x1002e5bdc\nBLR             X8                                                     ; +0x1a8, 0x1002e5be0\nMOV             W19, #5                                                ; +0x1ac, 0x1002e5be4\nADRP            X8, #dword_100635778@PAGE                              ; +0x1b0, 0x1002e5be8\nLDR             S8, [X8,#dword_100635778@PAGEOFF]                      ; +0x1b4, 0x1002e5bec\nLDR             X8, [X20]                                              ; +0x1b8, 0x1002e5bf0\nLDR             X8, [X8,#0x28]                                         ; +0x1bc, 0x1002e5bf4\nMOV             X0, X20                                                ; +0x1c0, 0x1002e5bf8\nFMOV            S0, S8                                                 ; +0x1c4, 0x1002e5bfc\nBLR             X8                                                     ; +0x1c8, 0x1002e5c00\nSUBS            W19, W19, #1                                           ; +0x1cc, 0x1002e5c04\nB.NE            loc_1002E5BF0                                          ; +0x1d0, 0x1002e5c08\nLDRSB           W8, [SP,#0x60+var_39]                                  ; +0x1d4, 0x1002e5c0c\nTBZ             W8, #0x1F, loc_1002E5C1C                               ; +0x1d8, 0x1002e5c10\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x1dc, 0x1002e5c14\nBL              __ZdlPv; operator delete(void *)                       ; +0x1e0, 0x1002e5c18\nLDRSB           W8, [SP,#0x60+var_38.__r_.__value_+0x17]               ; +0x1e4, 0x1002e5c1c\nTBZ             W8, #0x1F, loc_1002E5C2C                               ; +0x1e8, 0x1002e5c20\nLDR             X0, [SP,#0x60+var_38]; __p                             ; +0x1ec, 0x1002e5c24\nBL              __ZdlPv; operator delete(void *)                       ; +0x1f0, 0x1002e5c28\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x1f4, 0x1002e5c2c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x1f8, 0x1002e5c30\nLDP             D9, D8, [SP,#0x60+var_20]                              ; +0x1fc, 0x1002e5c34\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x200, 0x1002e5c38\nRET                                                                    ; +0x204, 0x1002e5c3c", "xrefs": ["RateStarsLayer::onFeature @ 0x100080998", "GJRateLevelLayer::onFeature @ 0x1001b17e0", "GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002e5a30"], "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"}