{"type": "func", "start": 4297813168, "end": 4297813439, "name": "GJDifficultySprite::updateDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::updateDifficultyFrame from 0x1002b6cb0 to 0x1002b6dbf (271 bytes)\n// \n// 3 xrefs:\n// > RateStarsLayer::selectRating @ 0x10028c574\n// > LevelInfoLayer::updateLabelValues @ 0x1002c3224\n// > GJRateLevelLayer::selectRating @ 0x1005066a4\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  double v3; // xmm0_8\n  cocos2d::CCSpriteFrameCache *v5; // r14\n  const char *data; // rsi\n  cocos2d::CCSpriteFrame *v7; // rax\n  __int64 v8; // rax\n  unsigned int v9; // r14d\n  __int64 v10; // rax\n  std::string v11; // [rsp+0h] [rbp-40h] BYREF\n  float v12; // [rsp+1Ch] [rbp-24h]\n\n  v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  GJDifficultySprite::getDifficultyFrame(&v11, a2, a3, v3);\n  if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )\n    data = v11.__r_.__value_.__l.__data_;\n  else\n    data = v11.__r_.__value_.__s.__data_;\n  v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, data);\n  ((void (__fastcall *)(GJDifficultySprite *, cocos2d::CCSpriteFrame *))a1->setDisplayFrame)(a1, v7);\n  if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(v11.__r_.__value_.__l.__data_);\n  if ( a1->m_pChildren )\n  {\n    v12 = *(float *)((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1) * 0.5;\n    v8 = ((__int64 (__fastcall *)(GJDifficultySprite *))a1->getContentSize)(a1);\n    sub_10028CBE0((float *)&v11, v12, 0.5 * *(float *)(v8 + 4));\n    if ( (unsigned int)sub_100720070(a1->m_pChildren) )\n    {\n      v9 = 0;\n      do\n      {\n        v10 = sub_1007200C0(a1->m_pChildren, v9);\n        (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v10 + 184LL))(v10, &v11);\n        ++v9;\n      }\n      while ( v9 < (unsigned int)sub_100720070(a1->m_pChildren) );\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateDifficultyFrame from 0x1002b6cb0 to 0x1002b6dbf (271 bytes)\n; \n; 3 xrefs:\n; > RateStarsLayer::selectRating @ 0x10028c574\n; > LevelInfoLayer::updateLabelValues @ 0x1002c3224\n; > GJRateLevelLayer::selectRating @ 0x1005066a4\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, 0x1002b6cb0\nmov     rbp, rsp                                                       ; +0x1, 0x1002b6cb1\npush    r15                                                            ; +0x4, 0x1002b6cb4\npush    r14                                                            ; +0x6, 0x1002b6cb6\npush    r12                                                            ; +0x8, 0x1002b6cb8\npush    rbx                                                            ; +0xa, 0x1002b6cba\nsub     rsp, 20h                                                       ; +0xb, 0x1002b6cbb\nmov     r15d, edx                                                      ; +0xf, 0x1002b6cbf\nmov     r12d, esi                                                      ; +0x12, 0x1002b6cc2\nmov     rbx, rdi                                                       ; +0x15, 0x1002b6cc5\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x18, 0x1002b6cc8\nmov     r14, rax                                                       ; +0x1d, 0x1002b6ccd\nlea     rdi, [rbp+var_40]; this                                        ; +0x20, 0x1002b6cd0\nmov     esi, r12d                                                      ; +0x24, 0x1002b6cd4\nmov     edx, r15d                                                      ; +0x27, 0x1002b6cd7\ncall    GJDifficultySprite__getDifficultyFrame                         ; +0x2a, 0x1002b6cda\ntest    byte ptr [rbp+var_40.__r_.__value_], 1                         ; +0x2f, 0x1002b6cdf\njz      short loc_1002B6CEB                                            ; +0x33, 0x1002b6ce3\nmov     rsi, qword ptr [rbp+var_40.__r_.__value_+10h]                  ; +0x35, 0x1002b6ce5\njmp     short loc_1002B6CEF                                            ; +0x39, 0x1002b6ce9\nlea     rsi, [rbp+var_40.__r_.__value_+1]                              ; +0x3b, 0x1002b6ceb\nmov     rdi, r14                                                       ; +0x3f, 0x1002b6cef\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x42, 0x1002b6cf2\nmov     rcx, [rbx]                                                     ; +0x47, 0x1002b6cf7\nmov     rdi, rbx                                                       ; +0x4a, 0x1002b6cfa\nmov     rsi, rax                                                       ; +0x4d, 0x1002b6cfd\ncall    qword ptr [rcx+478h]                                           ; +0x50, 0x1002b6d00\ntest    byte ptr [rbp+var_40.__r_.__value_], 1                         ; +0x56, 0x1002b6d06\njz      short loc_1002B6D15                                            ; +0x5a, 0x1002b6d0a\nmov     rdi, qword ptr [rbp+var_40.__r_.__value_+10h]; __p             ; +0x5c, 0x1002b6d0c\ncall    __ZdlPv; operator delete(void *)                               ; +0x60, 0x1002b6d10\ncmp     qword ptr [rbx+0D0h], 0                                        ; +0x65, 0x1002b6d15\njz      loc_1002B6DB2                                                  ; +0x6d, 0x1002b6d1d\nmov     rax, [rbx]                                                     ; +0x73, 0x1002b6d23\nmov     rdi, rbx                                                       ; +0x76, 0x1002b6d26\ncall    qword ptr [rax+138h]                                           ; +0x79, 0x1002b6d29\nmovss   xmm1, dword ptr [rax]                                          ; +0x7f, 0x1002b6d2f\nmulss   xmm1, cs:dword_100814FA8                                       ; +0x83, 0x1002b6d33\nmovss   [rbp+var_24], xmm1                                             ; +0x8b, 0x1002b6d3b\nmov     rax, [rbx]                                                     ; +0x90, 0x1002b6d40\nmov     rdi, rbx                                                       ; +0x93, 0x1002b6d43\ncall    qword ptr [rax+138h]                                           ; +0x96, 0x1002b6d46\nmovss   xmm1, cs:dword_100814FA8                                       ; +0x9c, 0x1002b6d4c\nmulss   xmm1, dword ptr [rax+4]                                        ; +0xa4, 0x1002b6d54\nlea     rdi, [rbp+var_40]                                              ; +0xa9, 0x1002b6d59\nmovss   xmm0, [rbp+var_24]                                             ; +0xad, 0x1002b6d5d\ncall    sub_10028CBE0                                                  ; +0xb2, 0x1002b6d62\nmov     rdi, [rbx+0D0h]                                                ; +0xb7, 0x1002b6d67\ncall    sub_100720070                                                  ; +0xbe, 0x1002b6d6e\ntest    eax, eax                                                       ; +0xc3, 0x1002b6d73\njz      short loc_1002B6DB2                                            ; +0xc5, 0x1002b6d75\nxor     r14d, r14d                                                     ; +0xc7, 0x1002b6d77\nlea     r15, [rbp+var_40]                                              ; +0xca, 0x1002b6d7a\nxchg    ax, ax                                                         ; +0xce, 0x1002b6d7e\nmov     rdi, [rbx+0D0h]                                                ; +0xd0, 0x1002b6d80\nmov     esi, r14d                                                      ; +0xd7, 0x1002b6d87\ncall    sub_1007200C0                                                  ; +0xda, 0x1002b6d8a\nmov     rcx, [rax]                                                     ; +0xdf, 0x1002b6d8f\nmov     rdi, rax                                                       ; +0xe2, 0x1002b6d92\nmov     rsi, r15                                                       ; +0xe5, 0x1002b6d95\ncall    qword ptr [rcx+0B8h]                                           ; +0xe8, 0x1002b6d98\ninc     r14d                                                           ; +0xee, 0x1002b6d9e\nmov     rdi, [rbx+0D0h]                                                ; +0xf1, 0x1002b6da1\ncall    sub_100720070                                                  ; +0xf8, 0x1002b6da8\ncmp     r14d, eax                                                      ; +0xfd, 0x1002b6dad\njb      short loc_1002B6D80                                            ; +0x100, 0x1002b6db0\nadd     rsp, 20h                                                       ; +0x102, 0x1002b6db2\npop     rbx                                                            ; +0x106, 0x1002b6db6\npop     r12                                                            ; +0x107, 0x1002b6db7\npop     r14                                                            ; +0x109, 0x1002b6db9\npop     r15                                                            ; +0x10b, 0x1002b6dbb\npop     rbp                                                            ; +0x10d, 0x1002b6dbd\nretn                                                                   ; +0x10e, 0x1002b6dbe", "xrefs": ["RateStarsLayer::selectRating @ 0x10028c574", "LevelInfoLayer::updateLabelValues @ 0x1002c3224", "GJRateLevelLayer::selectRating @ 0x1005066a4"], "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"}