{"type": "func", "start": 4298004668, "end": 4298004960, "name": "GJDifficultySprite::updateDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::updateDifficultyFrame from 0x1002e58bc to 0x1002e59e0 (292 bytes)\n// \n// 3 xrefs:\n// > LevelInfoLayer::updateLabelValues @ 0x100029908\n// > RateStarsLayer::selectRating @ 0x100080980\n// > GJRateLevelLayer::selectRating @ 0x1001b17b8\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::updateDifficultyFrame(GJDifficultySprite *a1, int a2, GJDifficultyName a3)\n{\n  cocos2d::CCSpriteFrameCache *v6; // x22\n  std::string *p_p; // x1\n  cocos2d::CCSpriteFrame *v8; // x0\n  float v9; // s8\n  __n128 v10; // q1\n  __n128 v11; // q0\n  unsigned int v12; // w20\n  __int64 v13; // x0\n  std::string __p; // [xsp+8h] [xbp-58h] BYREF\n\n  v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  GJDifficultySprite::getDifficultyFrame(a2, a3, &__p);\n  if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n    p_p = &__p;\n  else\n    p_p = (std::string *)__p.__r_.__value_.__r.__words[0];\n  v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, (const char *)p_p);\n  ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v8);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n  if ( a1->m_pChildren )\n  {\n    v9 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1) * 0.5;\n    v10.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1) + 4) * 0.5;\n    v11.n128_f32[0] = v9;\n    sub_100022980(v11, v10, &__p);\n    if ( (unsigned int)sub_10024A36C((__int64)a1->m_pChildren) )\n    {\n      v12 = 0;\n      do\n      {\n        v13 = sub_10024A388((__int64)a1->m_pChildren, v12);\n        (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v13 + 184LL))(v13, &__p);\n        ++v12;\n      }\n      while ( v12 < (unsigned int)sub_10024A36C((__int64)a1->m_pChildren) );\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateDifficultyFrame from 0x1002e58bc to 0x1002e59e0 (292 bytes)\n; \n; 3 xrefs:\n; > LevelInfoLayer::updateLabelValues @ 0x100029908\n; > RateStarsLayer::selectRating @ 0x100080980\n; > GJRateLevelLayer::selectRating @ 0x1001b17b8\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, 0x1002e58bc\nSTP             D9, D8, [SP,#0x60+var_40]                              ; +0x4, 0x1002e58c0\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1002e58c4\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1002e58c8\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1002e58cc\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1002e58d0\nADD             X29, SP, #0x60                                         ; +0x18, 0x1002e58d4\nMOV             X20, X2                                                ; +0x1c, 0x1002e58d8\nMOV             X21, X1                                                ; +0x20, 0x1002e58dc\nMOV             X19, X0                                                ; +0x24, 0x1002e58e0\nBL              cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache    ; +0x28, 0x1002e58e4\nMOV             X22, X0                                                ; +0x2c, 0x1002e58e8\nADD             X23, SP, #0x60+__p                                     ; +0x30, 0x1002e58ec\nADD             X8, SP, #0x60+__p                                      ; +0x34, 0x1002e58f0\nMOV             X0, X21                                                ; +0x38, 0x1002e58f4\nMOV             X1, X20                                                ; +0x3c, 0x1002e58f8\nBL              GJDifficultySprite__getDifficultyFrame                 ; +0x40, 0x1002e58fc\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x44, 0x1002e5900\nLDR             X9, [SP,#0x60+__p]                                     ; +0x48, 0x1002e5904\nCMP             W8, #0                                                 ; +0x4c, 0x1002e5908\nCSEL            X1, X9, X23, LT                                        ; +0x50, 0x1002e590c\nMOV             X0, X22                                                ; +0x54, 0x1002e5910\nBL              cocos2d__CCSpriteFrameCache__spriteFrameByName         ; +0x58, 0x1002e5914\nMOV             X1, X0                                                 ; +0x5c, 0x1002e5918\nLDR             X8, [X19]                                              ; +0x60, 0x1002e591c\nLDR             X8, [X8,#0x478]                                        ; +0x64, 0x1002e5920\nMOV             X0, X19                                                ; +0x68, 0x1002e5924\nBLR             X8                                                     ; +0x6c, 0x1002e5928\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x70, 0x1002e592c\nTBZ             W8, #0x1F, loc_1002E593C                               ; +0x74, 0x1002e5930\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x78, 0x1002e5934\nBL              __ZdlPv; operator delete(void *)                       ; +0x7c, 0x1002e5938\nLDR             X8, [X19,#0xD0]                                        ; +0x80, 0x1002e593c\nCBZ             X8, loc_1002E59C4                                      ; +0x84, 0x1002e5940\nLDR             X8, [X19]                                              ; +0x88, 0x1002e5944\nLDR             X8, [X8,#0x138]                                        ; +0x8c, 0x1002e5948\nMOV             X0, X19                                                ; +0x90, 0x1002e594c\nBLR             X8                                                     ; +0x94, 0x1002e5950\nLDR             S0, [X0]                                               ; +0x98, 0x1002e5954\nFMOV            S9, #0.5                                               ; +0x9c, 0x1002e5958\nFMUL            S8, S0, S9                                             ; +0xa0, 0x1002e595c\nLDR             X8, [X19]                                              ; +0xa4, 0x1002e5960\nLDR             X8, [X8,#0x138]                                        ; +0xa8, 0x1002e5964\nMOV             X0, X19                                                ; +0xac, 0x1002e5968\nBLR             X8                                                     ; +0xb0, 0x1002e596c\nLDR             S0, [X0,#4]                                            ; +0xb4, 0x1002e5970\nFMUL            S1, S0, S9                                             ; +0xb8, 0x1002e5974\nADD             X0, SP, #0x60+__p                                      ; +0xbc, 0x1002e5978\nFMOV            S0, S8                                                 ; +0xc0, 0x1002e597c\nBL              sub_100022980                                          ; +0xc4, 0x1002e5980\nLDR             X0, [X19,#0xD0]                                        ; +0xc8, 0x1002e5984\nBL              sub_10024A36C                                          ; +0xcc, 0x1002e5988\nCBZ             W0, loc_1002E59C4                                      ; +0xd0, 0x1002e598c\nMOV             W20, #0                                                ; +0xd4, 0x1002e5990\nLDR             X0, [X19,#0xD0]                                        ; +0xd8, 0x1002e5994\nMOV             X1, X20                                                ; +0xdc, 0x1002e5998\nBL              sub_10024A388                                          ; +0xe0, 0x1002e599c\nLDR             X8, [X0]                                               ; +0xe4, 0x1002e59a0\nLDR             X8, [X8,#0xB8]                                         ; +0xe8, 0x1002e59a4\nADD             X1, SP, #0x60+__p                                      ; +0xec, 0x1002e59a8\nBLR             X8                                                     ; +0xf0, 0x1002e59ac\nADD             W20, W20, #1                                           ; +0xf4, 0x1002e59b0\nLDR             X0, [X19,#0xD0]                                        ; +0xf8, 0x1002e59b4\nBL              sub_10024A36C                                          ; +0xfc, 0x1002e59b8\nCMP             W20, W0                                                ; +0x100, 0x1002e59bc\nB.CC            loc_1002E5994                                          ; +0x104, 0x1002e59c0\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x108, 0x1002e59c4\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x10c, 0x1002e59c8\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x110, 0x1002e59cc\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x114, 0x1002e59d0\nLDP             D9, D8, [SP,#0x60+var_40]                              ; +0x118, 0x1002e59d4\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x11c, 0x1002e59d8\nRET                                                                    ; +0x120, 0x1002e59dc", "xrefs": ["LevelInfoLayer::updateLabelValues @ 0x100029908", "RateStarsLayer::selectRating @ 0x100080980", "GJRateLevelLayer::selectRating @ 0x1001b17b8"], "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"}