{"type": "func", "start": 4297739952, "end": 4297740573, "name": "GJDifficultySprite::updateFeatureState", "pseudocode": "// \n// GJDifficultySprite::updateFeatureState from 0x1002a4eb0 to 0x1002a511d (621 bytes)\n// \n// 6 xrefs:\n// > RateStarsLayer::onFeature @ 0x100277a33\n// > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4e99\n// > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4ea4\n// > GJRateLevelLayer::onFeature @ 0x100505397\n// > sub_100963A90 @ 0x100963ab3\n// > sub_100976F40 @ 0x1009770d0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:27:55 +0000\n// \n\nvoid __fastcall GJDifficultySprite::updateFeatureState(_DWORD *a1, int a2)\n{\n  int v3; // r14d\n  unsigned int v4; // r14d\n  std::string::pointer data; // rdi\n  char *v6; // r14\n  __int64 v7; // rax\n  __int64 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[149] != a2 )\n  {\n    a1[149] = a2;\n    (*(void (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 576LL))(a1);\n    v3 = a1[149];\n    if ( v3 )\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 = v3 - 2;\n      if ( v4 < 3 )\n        std::string::assign(&v13, (const std::string::value_type *)&unk_100A076A4 + *((int *)&unk_100A076A4 + 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((__int64)data, 6.120263902060389e257);\n      (*(void (__fastcall **)(_DWORD *, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v6, 4294967294LL);\n      v14 = *(float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);\n      v7 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);\n      sub_100278250((float *)v11, v14 * 0.5, *(float *)(v7 + 4) * 0.5);\n      (*(void (__fastcall **)(char *, _QWORD *))(*(_QWORD *)v6 + 184LL))(v6, v11);\n      if ( a1[149] == 4 )\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 = GameToolbox::particleFromString(v11, 0, 0);\n        (*(void (__fastcall **)(_DWORD *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8, 0xFFFFFFFFLL);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 160LL))(v8, 0.89999998);\n        cocos2d::CCParticleSystem::resetSystem(v8);\n        v14 = *(float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);\n        v9 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);\n        sub_100278250(&v10, v14 * 0.5, 0.5 * *(float *)(v9 + 4));\n        (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v8 + 184LL))(v8, &v10);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 40LL))(v8, 0.15000001);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 40LL))(v8, 0.15000001);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 40LL))(v8, 0.15000001);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 40LL))(v8, 0.15000001);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 40LL))(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 0x1002a4eb0 to 0x1002a511d (621 bytes)\n; \n; 6 xrefs:\n; > RateStarsLayer::onFeature @ 0x100277a33\n; > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4e99\n; > GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4ea4\n; > GJRateLevelLayer::onFeature @ 0x100505397\n; > sub_100963A90 @ 0x100963ab3\n; > sub_100976F40 @ 0x1009770d0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:27:55 +0000\n; \npush    rbp                                                            ; +0x0, 0x1002a4eb0\nmov     rbp, rsp                                                       ; +0x1, 0x1002a4eb1\npush    r14                                                            ; +0x4, 0x1002a4eb4\npush    rbx                                                            ; +0x6, 0x1002a4eb6\nsub     rsp, 40h                                                       ; +0x7, 0x1002a4eb7\ncmp     [rdi+254h], esi                                                ; +0xb, 0x1002a4ebb\njz      loc_1002A5114                                                  ; +0x11, 0x1002a4ec1\nmov     rbx, rdi                                                       ; +0x17, 0x1002a4ec7\nmov     [rdi+254h], esi                                                ; +0x1a, 0x1002a4eca\nmov     rax, [rdi]                                                     ; +0x20, 0x1002a4ed0\ncall    qword ptr [rax+240h]                                           ; +0x23, 0x1002a4ed3\nmov     r14d, [rbx+254h]                                               ; +0x29, 0x1002a4ed9\ntest    r14d, r14d                                                     ; +0x30, 0x1002a4ee0\njz      loc_1002A5114                                                  ; +0x33, 0x1002a4ee3\nmov     edi, 1Ah; __sz                                                 ; +0x39, 0x1002a4ee9\ncall    __Znwm; operator new(ulong)                                    ; +0x3e, 0x1002a4eee\nmov     qword ptr [rbp+var_30.__r_.__value_+10h], rax                  ; +0x43, 0x1002a4ef3\nmov     qword ptr [rbp+var_30.__r_.__value_], 1Bh                      ; +0x47, 0x1002a4ef7\nmov     qword ptr [rbp+var_30.__r_.__value_+8], 17h                    ; +0x4f, 0x1002a4eff\nmov     rcx, 676E702E3130305Fh                                         ; +0x57, 0x1002a4f07\nmov     [rax+0Fh], rcx                                                 ; +0x61, 0x1002a4f11\nmovups  xmm0, xmmword ptr cs:aGjFeaturedcoin; \"GJ_featuredCoin_001.png\" ; +0x65, 0x1002a4f15\nmovups  xmmword ptr [rax], xmm0                                        ; +0x6c, 0x1002a4f1c\nmov     byte ptr [rax+17h], 0                                          ; +0x6f, 0x1002a4f1f\nadd     r14d, 0FFFFFFFEh                                               ; +0x73, 0x1002a4f23\ncmp     r14d, 3                                                        ; +0x77, 0x1002a4f27\njnb     short loc_1002A4F47                                            ; +0x7b, 0x1002a4f2b\nmov     eax, r14d                                                      ; +0x7d, 0x1002a4f2d\nlea     rcx, unk_100A076A4                                             ; +0x80, 0x1002a4f30\nmovsxd  rsi, dword ptr [rcx+rax*4]                                     ; +0x87, 0x1002a4f37\nadd     rsi, rcx; __s                                                  ; +0x8b, 0x1002a4f3b\nlea     rdi, [rbp+var_30]; this                                        ; +0x8e, 0x1002a4f3e\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x92, 0x1002a4f42\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x97, 0x1002a4f47\njz      short loc_1002A4F53                                            ; +0x9b, 0x1002a4f4b\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]                  ; +0x9d, 0x1002a4f4d\njmp     short loc_1002A4F57                                            ; +0xa1, 0x1002a4f51\nlea     rdi, [rbp+var_30.__r_.__value_+1]                              ; +0xa3, 0x1002a4f53\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0xa7, 0x1002a4f57\nmov     r14, rax                                                       ; +0xac, 0x1002a4f5c\nmov     rax, [rbx]                                                     ; +0xaf, 0x1002a4f5f\nmov     rdi, rbx                                                       ; +0xb2, 0x1002a4f62\nmov     rsi, r14                                                       ; +0xb5, 0x1002a4f65\nmov     edx, 0FFFFFFFEh                                                ; +0xb8, 0x1002a4f68\ncall    qword ptr [rax+1D0h]                                           ; +0xbd, 0x1002a4f6d\nmov     rax, [rbx]                                                     ; +0xc3, 0x1002a4f73\nmov     rdi, rbx                                                       ; +0xc6, 0x1002a4f76\ncall    qword ptr [rax+148h]                                           ; +0xc9, 0x1002a4f79\nmovss   xmm0, dword ptr [rax]                                          ; +0xcf, 0x1002a4f7f\nmovss   [rbp+var_14], xmm0                                             ; +0xd3, 0x1002a4f83\nmov     rax, [rbx]                                                     ; +0xd8, 0x1002a4f88\nmov     rdi, rbx                                                       ; +0xdb, 0x1002a4f8b\ncall    qword ptr [rax+148h]                                           ; +0xde, 0x1002a4f8e\nmovss   xmm2, cs:dword_100A03578                                       ; +0xe4, 0x1002a4f94\nmovss   xmm0, [rbp+var_14]                                             ; +0xec, 0x1002a4f9c\nmulss   xmm0, xmm2                                                     ; +0xf1, 0x1002a4fa1\nmovss   xmm1, dword ptr [rax+4]                                        ; +0xf5, 0x1002a4fa5\nmulss   xmm1, xmm2                                                     ; +0xfa, 0x1002a4faa\nlea     rdi, [rbp+var_48]                                              ; +0xfe, 0x1002a4fae\ncall    sub_100278250                                                  ; +0x102, 0x1002a4fb2\nmov     rax, [r14]                                                     ; +0x107, 0x1002a4fb7\nlea     rsi, [rbp+var_48]                                              ; +0x10a, 0x1002a4fba\nmov     rdi, r14                                                       ; +0x10e, 0x1002a4fbe\ncall    qword ptr [rax+0B8h]                                           ; +0x111, 0x1002a4fc1\ncmp     dword ptr [rbx+254h], 4                                        ; +0x117, 0x1002a4fc7\njnz     loc_1002A5105                                                  ; +0x11e, 0x1002a4fce\nmov     edi, 0B0h; __sz                                                ; +0x124, 0x1002a4fd4\ncall    __Znwm; operator new(ulong)                                    ; +0x129, 0x1002a4fd9\nmov     r14, rax                                                       ; +0x12e, 0x1002a4fde\nmov     [rbp+__p], rax                                                 ; +0x131, 0x1002a4fe1\nmov     [rbp+var_48], 0B1h                                             ; +0x135, 0x1002a4fe5\nmov     [rbp+var_40], 0AAh                                             ; +0x13d, 0x1002a4fed\nlea     rsi, a30a1a13a02a20a; \"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a\"... ; +0x145, 0x1002a4ff5\nmov     edx, 0AAh; __n                                                 ; +0x14c, 0x1002a4ffc\nmov     rdi, rax; __dst                                                ; +0x151, 0x1002a5001\ncall    _memcpy                                                        ; +0x154, 0x1002a5004\nmov     byte ptr [r14+0AAh], 0                                         ; +0x159, 0x1002a5009\nlea     rdi, [rbp+var_48]                                              ; +0x161, 0x1002a5011\nxor     esi, esi                                                       ; +0x165, 0x1002a5015\nxor     edx, edx                                                       ; +0x167, 0x1002a5017\ncall    GameToolbox__particleFromString                                ; +0x169, 0x1002a5019\nmov     r14, rax                                                       ; +0x16e, 0x1002a501e\nmov     rax, [rbx]                                                     ; +0x171, 0x1002a5021\nmov     rdi, rbx                                                       ; +0x174, 0x1002a5024\nmov     rsi, r14                                                       ; +0x177, 0x1002a5027\nmov     edx, 0FFFFFFFFh                                                ; +0x17a, 0x1002a502a\ncall    qword ptr [rax+1D0h]                                           ; +0x17f, 0x1002a502f\nmov     rax, [r14]                                                     ; +0x185, 0x1002a5035\nmovss   xmm0, cs:dword_100A03780                                       ; +0x188, 0x1002a5038\nmov     rdi, r14                                                       ; +0x190, 0x1002a5040\ncall    qword ptr [rax+0A0h]                                           ; +0x193, 0x1002a5043\nmov     rdi, r14                                                       ; +0x199, 0x1002a5049\ncall    cocos2d__CCParticleSystem__resetSystem                         ; +0x19c, 0x1002a504c\nmov     rax, [rbx]                                                     ; +0x1a1, 0x1002a5051\nmov     rdi, rbx                                                       ; +0x1a4, 0x1002a5054\ncall    qword ptr [rax+148h]                                           ; +0x1a7, 0x1002a5057\nmovss   xmm0, dword ptr [rax]                                          ; +0x1ad, 0x1002a505d\nmovss   [rbp+var_14], xmm0                                             ; +0x1b1, 0x1002a5061\nmov     rax, [rbx]                                                     ; +0x1b6, 0x1002a5066\nmov     rdi, rbx                                                       ; +0x1b9, 0x1002a5069\ncall    qword ptr [rax+148h]                                           ; +0x1bc, 0x1002a506c\nmovss   xmm1, cs:dword_100A03578                                       ; +0x1c2, 0x1002a5072\nmovss   xmm0, [rbp+var_14]                                             ; +0x1ca, 0x1002a507a\nmulss   xmm0, xmm1                                                     ; +0x1cf, 0x1002a507f\nmulss   xmm1, dword ptr [rax+4]                                        ; +0x1d3, 0x1002a5083\nlea     rdi, [rbp+var_50]                                              ; +0x1d8, 0x1002a5088\ncall    sub_100278250                                                  ; +0x1dc, 0x1002a508c\nmov     rax, [r14]                                                     ; +0x1e1, 0x1002a5091\nlea     rsi, [rbp+var_50]                                              ; +0x1e4, 0x1002a5094\nmov     rdi, r14                                                       ; +0x1e8, 0x1002a5098\ncall    qword ptr [rax+0B8h]                                           ; +0x1eb, 0x1002a509b\nmov     rax, [r14]                                                     ; +0x1f1, 0x1002a50a1\nmovss   xmm0, cs:dword_100A04130                                       ; +0x1f4, 0x1002a50a4\nmov     rdi, r14                                                       ; +0x1fc, 0x1002a50ac\ncall    qword ptr [rax+28h]                                            ; +0x1ff, 0x1002a50af\nmov     rax, [r14]                                                     ; +0x202, 0x1002a50b2\nmovss   xmm0, cs:dword_100A04130                                       ; +0x205, 0x1002a50b5\nmov     rdi, r14                                                       ; +0x20d, 0x1002a50bd\ncall    qword ptr [rax+28h]                                            ; +0x210, 0x1002a50c0\nmov     rax, [r14]                                                     ; +0x213, 0x1002a50c3\nmovss   xmm0, cs:dword_100A04130                                       ; +0x216, 0x1002a50c6\nmov     rdi, r14                                                       ; +0x21e, 0x1002a50ce\ncall    qword ptr [rax+28h]                                            ; +0x221, 0x1002a50d1\nmov     rax, [r14]                                                     ; +0x224, 0x1002a50d4\nmovss   xmm0, cs:dword_100A04130                                       ; +0x227, 0x1002a50d7\nmov     rdi, r14                                                       ; +0x22f, 0x1002a50df\ncall    qword ptr [rax+28h]                                            ; +0x232, 0x1002a50e2\nmov     rax, [r14]                                                     ; +0x235, 0x1002a50e5\nmovss   xmm0, cs:dword_100A04130                                       ; +0x238, 0x1002a50e8\nmov     rdi, r14                                                       ; +0x240, 0x1002a50f0\ncall    qword ptr [rax+28h]                                            ; +0x243, 0x1002a50f3\ntest    byte ptr [rbp+var_48], 1                                       ; +0x246, 0x1002a50f6\njz      short loc_1002A5105                                            ; +0x24a, 0x1002a50fa\nmov     rdi, [rbp+__p]; __p                                            ; +0x24c, 0x1002a50fc\ncall    __ZdlPv; operator delete(void *)                               ; +0x250, 0x1002a5100\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x255, 0x1002a5105\njz      short loc_1002A5114                                            ; +0x259, 0x1002a5109\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0x25b, 0x1002a510b\ncall    __ZdlPv; operator delete(void *)                               ; +0x25f, 0x1002a510f\nadd     rsp, 40h                                                       ; +0x264, 0x1002a5114\npop     rbx                                                            ; +0x268, 0x1002a5118\npop     r14                                                            ; +0x269, 0x1002a5119\npop     rbp                                                            ; +0x26b, 0x1002a511b\nretn                                                                   ; +0x26c, 0x1002a511c", "xrefs": ["RateStarsLayer::onFeature @ 0x100277a33", "GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4e99", "GJDifficultySprite::updateFeatureStateFromLevel @ 0x1002a4ea4", "GJRateLevelLayer::onFeature @ 0x100505397", "sub_100963A90 @ 0x100963ab3", "sub_100976F40 @ 0x1009770d0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}