{"type": "func", "start": 4297813552, "end": 4297814173, "name": "GJDifficultySprite::updateFeatureState", "pseudocode": "// \n// GJDifficultySprite::updateFeatureState from 0x1002b6e30 to 0x1002b709d (621 bytes)\n// \n// 4 xrefs:\n// > RateStarsLayer::onToggleCoins @ 0x10028c5a3\n// > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e19\n// > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e24\n// > GJRateLevelLayer::onFeature @ 0x1005066d7\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  GJFeatureState m_featureState; // r14d\n  unsigned int v4; // r14d\n  const char *data; // rdi\n  cocos2d::CCSprite *v6; // r14\n  __int64 v7; // rax\n  cocos2d::CCParticleSystem *v8; // r14\n  __int64 v9; // rax\n  float v10; // [rsp+0h] [rbp-50h] BYREF\n  _QWORD v11[2]; // [rsp+8h] [rbp-48h] BYREF\n  void *__p; // [rsp+18h] [rbp-38h]\n  std::string v13; // [rsp+20h] [rbp-30h] BYREF\n  float v14; // [rsp+3Ch] [rbp-14h]\n\n  if ( a1->m_featureState != a2 )\n  {\n    a1->m_featureState = a2;\n    ((void (__fastcall *)(GJDifficultySprite *))a1->removeAllChildren)(a1);\n    m_featureState = a1->m_featureState;\n    if ( m_featureState )\n    {\n      v13.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x1Au);\n      v13.__r_.__value_.__r.__words[0] = 27;\n      v13.__r_.__value_.__l.__size_ = 23;\n      strcpy(v13.__r_.__value_.__l.__data_, \"GJ_featuredCoin_001.png\");\n      v4 = m_featureState - 2;\n      if ( v4 < 3 )\n        std::string::assign(&v13, (const std::string::value_type *)&unk_100819190 + *((int *)&unk_100819190 + v4));\n      if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )\n        data = v13.__r_.__value_.__l.__data_;\n      else\n        data = v13.__r_.__value_.__s.__data_;\n      v6 = cocos2d::CCSprite::createWithSpriteFrameName(data);\n      ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v6, 4294967294LL);\n      v14 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n      v7 = ((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n      sub_10028CBE0((float *)v11, v14 * 0.5, *(float *)(v7 + 4) * 0.5);\n      ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD *))v6->setPosition)(v6, v11);\n      if ( a1->m_featureState == Mythic )\n      {\n        __p = operator new(0xB0u);\n        v11[0] = 177;\n        v11[1] = 170;\n        strcpy(\n          (char *)__p,\n          \"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a0a0a0a4a1a0a0a0a0a1a0a1a0a1a0a1a1a0a0a0a0a0.784314a0a1a0a1a0a0.27a0a0.2\"\n          \"7a0a0a0a0a0a0a0a0a2a1a0a0a0a0a0a0a0.25a0a0a0a0a0a0a0a0a0a0a0\");\n        v8 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString(v11, 0, 0);\n        ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCParticleSystem *, __int64))a1->addChild_0)(\n          a1,\n          v8,\n          0xFFFFFFFFLL);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->setScale)(v8, 0.89999998);\n        cocos2d::CCParticleSystem::resetSystem(v8);\n        v14 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n        v9 = ((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n        sub_10028CBE0(&v10, v14 * 0.5, 0.5 * *(float *)(v9 + 4));\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float *))v8->setPosition)(v8, &v10);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->update)(v8, 0.15000001);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->update)(v8, 0.15000001);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->update)(v8, 0.15000001);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->update)(v8, 0.15000001);\n        ((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v8->update)(v8, 0.15000001);\n        if ( (v11[0] & 1) != 0 )\n          operator delete(__p);\n      }\n      if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )\n        operator delete(v13.__r_.__value_.__l.__data_);\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateFeatureState from 0x1002b6e30 to 0x1002b709d (621 bytes)\n; \n; 4 xrefs:\n; > RateStarsLayer::onToggleCoins @ 0x10028c5a3\n; > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e19\n; > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e24\n; > GJRateLevelLayer::onFeature @ 0x1005066d7\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    rbp                                                            ; +0x0, 0x1002b6e30\nmov     rbp, rsp                                                       ; +0x1, 0x1002b6e31\npush    r14                                                            ; +0x4, 0x1002b6e34\npush    rbx                                                            ; +0x6, 0x1002b6e36\nsub     rsp, 40h                                                       ; +0x7, 0x1002b6e37\ncmp     [rdi+254h], esi                                                ; +0xb, 0x1002b6e3b\njz      loc_1002B7094                                                  ; +0x11, 0x1002b6e41\nmov     rbx, rdi                                                       ; +0x17, 0x1002b6e47\nmov     [rdi+254h], esi                                                ; +0x1a, 0x1002b6e4a\nmov     rax, [rdi]                                                     ; +0x20, 0x1002b6e50\ncall    qword ptr [rax+230h]                                           ; +0x23, 0x1002b6e53\nmov     r14d, [rbx+254h]                                               ; +0x29, 0x1002b6e59\ntest    r14d, r14d                                                     ; +0x30, 0x1002b6e60\njz      loc_1002B7094                                                  ; +0x33, 0x1002b6e63\nmov     edi, 1Ah; __sz                                                 ; +0x39, 0x1002b6e69\ncall    __Znwm; operator new(ulong)                                    ; +0x3e, 0x1002b6e6e\nmov     qword ptr [rbp+var_30.__r_.__value_+10h], rax                  ; +0x43, 0x1002b6e73\nmov     qword ptr [rbp+var_30.__r_.__value_], 1Bh                      ; +0x47, 0x1002b6e77\nmov     qword ptr [rbp+var_30.__r_.__value_+8], 17h                    ; +0x4f, 0x1002b6e7f\nmov     rcx, 676E702E3130305Fh                                         ; +0x57, 0x1002b6e87\nmov     [rax+0Fh], rcx                                                 ; +0x61, 0x1002b6e91\nmovups  xmm0, xmmword ptr cs:aGjFeaturedcoin; \"GJ_featuredCoin_001.png\" ; +0x65, 0x1002b6e95\nmovups  xmmword ptr [rax], xmm0                                        ; +0x6c, 0x1002b6e9c\nmov     byte ptr [rax+17h], 0                                          ; +0x6f, 0x1002b6e9f\nadd     r14d, 0FFFFFFFEh                                               ; +0x73, 0x1002b6ea3\ncmp     r14d, 3                                                        ; +0x77, 0x1002b6ea7\njnb     short loc_1002B6EC7                                            ; +0x7b, 0x1002b6eab\nmov     eax, r14d                                                      ; +0x7d, 0x1002b6ead\nlea     rcx, unk_100819190                                             ; +0x80, 0x1002b6eb0\nmovsxd  rsi, dword ptr [rcx+rax*4]                                     ; +0x87, 0x1002b6eb7\nadd     rsi, rcx; __s                                                  ; +0x8b, 0x1002b6ebb\nlea     rdi, [rbp+var_30]; this                                        ; +0x8e, 0x1002b6ebe\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x92, 0x1002b6ec2\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x97, 0x1002b6ec7\njz      short loc_1002B6ED3                                            ; +0x9b, 0x1002b6ecb\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]                  ; +0x9d, 0x1002b6ecd\njmp     short loc_1002B6ED7                                            ; +0xa1, 0x1002b6ed1\nlea     rdi, [rbp+var_30.__r_.__value_+1]                              ; +0xa3, 0x1002b6ed3\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0xa7, 0x1002b6ed7\nmov     r14, rax                                                       ; +0xac, 0x1002b6edc\nmov     rax, [rbx]                                                     ; +0xaf, 0x1002b6edf\nmov     rdi, rbx                                                       ; +0xb2, 0x1002b6ee2\nmov     rsi, r14                                                       ; +0xb5, 0x1002b6ee5\nmov     edx, 0FFFFFFFEh                                                ; +0xb8, 0x1002b6ee8\ncall    qword ptr [rax+1C0h]                                           ; +0xbd, 0x1002b6eed\nmov     rax, [rbx]                                                     ; +0xc3, 0x1002b6ef3\nmov     rdi, rbx                                                       ; +0xc6, 0x1002b6ef6\ncall    qword ptr [rax+138h]                                           ; +0xc9, 0x1002b6ef9\nmovss   xmm0, dword ptr [rax]                                          ; +0xcf, 0x1002b6eff\nmovss   [rbp+var_14], xmm0                                             ; +0xd3, 0x1002b6f03\nmov     rax, [rbx]                                                     ; +0xd8, 0x1002b6f08\nmov     rdi, rbx                                                       ; +0xdb, 0x1002b6f0b\ncall    qword ptr [rax+138h]                                           ; +0xde, 0x1002b6f0e\nmovss   xmm2, cs:dword_100814FA8                                       ; +0xe4, 0x1002b6f14\nmovss   xmm0, [rbp+var_14]                                             ; +0xec, 0x1002b6f1c\nmulss   xmm0, xmm2                                                     ; +0xf1, 0x1002b6f21\nmovss   xmm1, dword ptr [rax+4]                                        ; +0xf5, 0x1002b6f25\nmulss   xmm1, xmm2                                                     ; +0xfa, 0x1002b6f2a\nlea     rdi, [rbp+var_48]                                              ; +0xfe, 0x1002b6f2e\ncall    sub_10028CBE0                                                  ; +0x102, 0x1002b6f32\nmov     rax, [r14]                                                     ; +0x107, 0x1002b6f37\nlea     rsi, [rbp+var_48]                                              ; +0x10a, 0x1002b6f3a\nmov     rdi, r14                                                       ; +0x10e, 0x1002b6f3e\ncall    qword ptr [rax+0B8h]                                           ; +0x111, 0x1002b6f41\ncmp     dword ptr [rbx+254h], 4                                        ; +0x117, 0x1002b6f47\njnz     loc_1002B7085                                                  ; +0x11e, 0x1002b6f4e\nmov     edi, 0B0h; __sz                                                ; +0x124, 0x1002b6f54\ncall    __Znwm; operator new(ulong)                                    ; +0x129, 0x1002b6f59\nmov     r14, rax                                                       ; +0x12e, 0x1002b6f5e\nmov     [rbp+__p], rax                                                 ; +0x131, 0x1002b6f61\nmov     [rbp+var_48], 0B1h                                             ; +0x135, 0x1002b6f65\nmov     [rbp+var_40], 0AAh                                             ; +0x13d, 0x1002b6f6d\nlea     rsi, a30a1a13a02a20a; \"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a\"... ; +0x145, 0x1002b6f75\nmov     edx, 0AAh; __n                                                 ; +0x14c, 0x1002b6f7c\nmov     rdi, rax; __dst                                                ; +0x151, 0x1002b6f81\ncall    _memcpy                                                        ; +0x154, 0x1002b6f84\nmov     byte ptr [r14+0AAh], 0                                         ; +0x159, 0x1002b6f89\nlea     rdi, [rbp+var_48]                                              ; +0x161, 0x1002b6f91\nxor     esi, esi                                                       ; +0x165, 0x1002b6f95\nxor     edx, edx                                                       ; +0x167, 0x1002b6f97\ncall    GameToolbox__particleFromString                                ; +0x169, 0x1002b6f99\nmov     r14, rax                                                       ; +0x16e, 0x1002b6f9e\nmov     rax, [rbx]                                                     ; +0x171, 0x1002b6fa1\nmov     rdi, rbx                                                       ; +0x174, 0x1002b6fa4\nmov     rsi, r14                                                       ; +0x177, 0x1002b6fa7\nmov     edx, 0FFFFFFFFh                                                ; +0x17a, 0x1002b6faa\ncall    qword ptr [rax+1C0h]                                           ; +0x17f, 0x1002b6faf\nmov     rax, [r14]                                                     ; +0x185, 0x1002b6fb5\nmovss   xmm0, cs:dword_100815210                                       ; +0x188, 0x1002b6fb8\nmov     rdi, r14                                                       ; +0x190, 0x1002b6fc0\ncall    qword ptr [rax+0A0h]                                           ; +0x193, 0x1002b6fc3\nmov     rdi, r14                                                       ; +0x199, 0x1002b6fc9\ncall    cocos2d__CCParticleSystem__resetSystem                         ; +0x19c, 0x1002b6fcc\nmov     rax, [rbx]                                                     ; +0x1a1, 0x1002b6fd1\nmov     rdi, rbx                                                       ; +0x1a4, 0x1002b6fd4\ncall    qword ptr [rax+138h]                                           ; +0x1a7, 0x1002b6fd7\nmovss   xmm0, dword ptr [rax]                                          ; +0x1ad, 0x1002b6fdd\nmovss   [rbp+var_14], xmm0                                             ; +0x1b1, 0x1002b6fe1\nmov     rax, [rbx]                                                     ; +0x1b6, 0x1002b6fe6\nmov     rdi, rbx                                                       ; +0x1b9, 0x1002b6fe9\ncall    qword ptr [rax+138h]                                           ; +0x1bc, 0x1002b6fec\nmovss   xmm1, cs:dword_100814FA8                                       ; +0x1c2, 0x1002b6ff2\nmovss   xmm0, [rbp+var_14]                                             ; +0x1ca, 0x1002b6ffa\nmulss   xmm0, xmm1                                                     ; +0x1cf, 0x1002b6fff\nmulss   xmm1, dword ptr [rax+4]                                        ; +0x1d3, 0x1002b7003\nlea     rdi, [rbp+var_50]                                              ; +0x1d8, 0x1002b7008\ncall    sub_10028CBE0                                                  ; +0x1dc, 0x1002b700c\nmov     rax, [r14]                                                     ; +0x1e1, 0x1002b7011\nlea     rsi, [rbp+var_50]                                              ; +0x1e4, 0x1002b7014\nmov     rdi, r14                                                       ; +0x1e8, 0x1002b7018\ncall    qword ptr [rax+0B8h]                                           ; +0x1eb, 0x1002b701b\nmov     rax, [r14]                                                     ; +0x1f1, 0x1002b7021\nmovss   xmm0, cs:dword_100815D24                                       ; +0x1f4, 0x1002b7024\nmov     rdi, r14                                                       ; +0x1fc, 0x1002b702c\ncall    qword ptr [rax+28h]                                            ; +0x1ff, 0x1002b702f\nmov     rax, [r14]                                                     ; +0x202, 0x1002b7032\nmovss   xmm0, cs:dword_100815D24                                       ; +0x205, 0x1002b7035\nmov     rdi, r14                                                       ; +0x20d, 0x1002b703d\ncall    qword ptr [rax+28h]                                            ; +0x210, 0x1002b7040\nmov     rax, [r14]                                                     ; +0x213, 0x1002b7043\nmovss   xmm0, cs:dword_100815D24                                       ; +0x216, 0x1002b7046\nmov     rdi, r14                                                       ; +0x21e, 0x1002b704e\ncall    qword ptr [rax+28h]                                            ; +0x221, 0x1002b7051\nmov     rax, [r14]                                                     ; +0x224, 0x1002b7054\nmovss   xmm0, cs:dword_100815D24                                       ; +0x227, 0x1002b7057\nmov     rdi, r14                                                       ; +0x22f, 0x1002b705f\ncall    qword ptr [rax+28h]                                            ; +0x232, 0x1002b7062\nmov     rax, [r14]                                                     ; +0x235, 0x1002b7065\nmovss   xmm0, cs:dword_100815D24                                       ; +0x238, 0x1002b7068\nmov     rdi, r14                                                       ; +0x240, 0x1002b7070\ncall    qword ptr [rax+28h]                                            ; +0x243, 0x1002b7073\ntest    byte ptr [rbp+var_48], 1                                       ; +0x246, 0x1002b7076\njz      short loc_1002B7085                                            ; +0x24a, 0x1002b707a\nmov     rdi, [rbp+__p]; __p                                            ; +0x24c, 0x1002b707c\ncall    __ZdlPv; operator delete(void *)                               ; +0x250, 0x1002b7080\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x255, 0x1002b7085\njz      short loc_1002B7094                                            ; +0x259, 0x1002b7089\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0x25b, 0x1002b708b\ncall    __ZdlPv; operator delete(void *)                               ; +0x25f, 0x1002b708f\nadd     rsp, 40h                                                       ; +0x264, 0x1002b7094\npop     rbx                                                            ; +0x268, 0x1002b7098\npop     r14                                                            ; +0x269, 0x1002b7099\npop     rbp                                                            ; +0x26b, 0x1002b709b\nretn                                                                   ; +0x26c, 0x1002b709c", "xrefs": ["RateStarsLayer::onToggleCoins @ 0x10028c5a3", "GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e19", "GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002b6e24", "GJRateLevelLayer::onFeature @ 0x1005066d7"], "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"}