{"type": "func", "start": 5371482448, "end": 5371482734, "name": "GJDifficultySprite::updateDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::updateDifficultyFrame from 0x1402a5150 to 0x1402a526e (286 bytes)\n// \n// 4 xrefs:\n// > GJRateLevelLayer::selectRating @ 0x1402f6aa2\n// > LevelInfoLayer::updateLabelValues @ 0x1402ffb19\n// > RateStarsLayer::selectRating @ 0x1403caaf2\n// > <???> @ 0x1406d2078\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\n// Hidden C++ exception states: #wind=1\nvoid GJDifficultySprite::updateDifficultyFrame(GJDifficultySprite *a1, int a2, GJDifficultyName a3)\n{\n  float v3; // xmm0_4\n  void **DifficultyFrame; // rax\n  __int64 v6; // rcx\n  const char *v7; // rsi\n  GJDifficultySprite_vtbl *v8; // rbx\n  cocos2d::CCSpriteFrameCache *v9; // rax\n  struct cocos2d::CCSpriteFrame *v10; // rax\n  const cocos2d::CCSize *v11; // rax\n  unsigned int i; // ebx\n  struct cocos2d::CCObject *v13; // rax\n  char v14; // [rsp+20h] [rbp-58h] BYREF\n  void *Src[4]; // [rsp+28h] [rbp-50h] BYREF\n\n  DifficultyFrame = GJDifficultySprite::getDifficultyFrame(Src, a2, a3);\n  v7 = (const char *)DifficultyFrame;\n  if ( (unsigned __int64)DifficultyFrame[3] > 0xF )\n    v7 = (const char *)*DifficultyFrame;\n  v8 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v9 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6);\n  v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v7);\n  v8->setDisplayFrame(a1, v10);\n  sub_14003A830((__int64)Src);\n  if ( a1->m_pChildren )\n  {\n    a1->getContentSize(a1);\n    v11 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(v3, v11->width * 0.5);\n    for ( i = 0; i < cocos2d::CCArray::count(a1->m_pChildren); ++i )\n    {\n      v13 = cocos2d::CCArray::objectAtIndex(a1->m_pChildren, i);\n      v13->__vftable[2].encodeWithCoder(v13, (DS_Dictionary *)&v14);\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateDifficultyFrame from 0x1402a5150 to 0x1402a526e (286 bytes)\n; \n; 4 xrefs:\n; > GJRateLevelLayer::selectRating @ 0x1402f6aa2\n; > LevelInfoLayer::updateLabelValues @ 0x1402ffb19\n; > RateStarsLayer::selectRating @ 0x1403caaf2\n; > <???> @ 0x1406d2078\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    rbx                                                            ; +0x0, 0x1402a5150\npush    rsi                                                            ; +0x2, 0x1402a5152\npush    rdi                                                            ; +0x3, 0x1402a5153\nsub     rsp, 60h                                                       ; +0x4, 0x1402a5154\nmovaps  [rsp+78h+var_28], xmm6                                         ; +0x8, 0x1402a5158\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x1402a515d\nxor     rax, rsp                                                       ; +0x14, 0x1402a5164\nmov     [rsp+78h+var_30], rax                                          ; +0x17, 0x1402a5167\nmov     rdi, rcx                                                       ; +0x1c, 0x1402a516c\nlea     rcx, [rsp+78h+Src]; Src                                        ; +0x1f, 0x1402a516f\ncall    GJDifficultySprite__getDifficultyFrame                         ; +0x24, 0x1402a5174\nmov     rsi, rax                                                       ; +0x29, 0x1402a5179\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x2c, 0x1402a517c\njbe     short loc_1402A5186                                            ; +0x31, 0x1402a5181\nmov     rsi, [rax]                                                     ; +0x33, 0x1402a5183\nmov     rbx, [rdi]                                                     ; +0x36, 0x1402a5186\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x39, 0x1402a5189\nmov     rcx, rax                                                       ; +0x3f, 0x1402a518f\nmov     rdx, rsi                                                       ; +0x42, 0x1402a5192\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0x45, 0x1402a5195\nmov     rdx, rax                                                       ; +0x4b, 0x1402a519b\nmov     rcx, rdi                                                       ; +0x4e, 0x1402a519e\ncall    qword ptr [rbx+3E0h]                                           ; +0x51, 0x1402a51a1\nnop                                                                    ; +0x57, 0x1402a51a7\nlea     rcx, [rsp+78h+Src]                                             ; +0x58, 0x1402a51a8\ncall    sub_14003A830                                                  ; +0x5d, 0x1402a51ad\ncmp     qword ptr [rdi+0D0h], 0                                        ; +0x62, 0x1402a51b2\njz      loc_1402A5254                                                  ; +0x6a, 0x1402a51ba\nmov     rax, [rdi]                                                     ; +0x70, 0x1402a51c0\nmov     rcx, rdi                                                       ; +0x73, 0x1402a51c3\ncall    qword ptr [rax+130h]                                           ; +0x76, 0x1402a51c6\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x7c, 0x1402a51cc\nmov     rax, [rdi]                                                     ; +0x81, 0x1402a51d1\nmov     rcx, rdi                                                       ; +0x84, 0x1402a51d4\ncall    qword ptr [rax+130h]                                           ; +0x87, 0x1402a51d7\nmulss   xmm6, cs:dword_140622B08                                       ; +0x8d, 0x1402a51dd\nmovss   xmm1, dword ptr [rax]                                          ; +0x95, 0x1402a51e5\nmulss   xmm1, cs:dword_140622B08                                       ; +0x99, 0x1402a51e9\nmovaps  xmm2, xmm6                                                     ; +0xa1, 0x1402a51f1\nlea     rcx, [rsp+78h+var_58]                                          ; +0xa4, 0x1402a51f4\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xa9, 0x1402a51f9\nxor     ebx, ebx                                                       ; +0xaf, 0x1402a51ff\nmov     rcx, [rdi+0D0h]                                                ; +0xb1, 0x1402a5201\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xb8, 0x1402a5208\ntest    eax, eax                                                       ; +0xbe, 0x1402a520e\njz      short loc_1402A5254                                            ; +0xc0, 0x1402a5210\nnop     dword ptr [rax+00h]                                            ; +0xc2, 0x1402a5212\nnop     word ptr [rax+rax+00000000h]                                   ; +0xc6, 0x1402a5216\nmov     edx, ebx                                                       ; +0xd0, 0x1402a5220\nmov     rcx, [rdi+0D0h]                                                ; +0xd2, 0x1402a5222\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xd9, 0x1402a5229\nmov     r8, [rax]                                                      ; +0xdf, 0x1402a522f\nlea     rdx, [rsp+78h+var_58]                                          ; +0xe2, 0x1402a5232\nmov     rcx, rax                                                       ; +0xe7, 0x1402a5237\ncall    qword ptr [r8+0B8h]                                            ; +0xea, 0x1402a523a\ninc     ebx                                                            ; +0xf1, 0x1402a5241\nmov     rcx, [rdi+0D0h]                                                ; +0xf3, 0x1402a5243\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xfa, 0x1402a524a\ncmp     ebx, eax                                                       ; +0x100, 0x1402a5250\njb      short loc_1402A5220                                            ; +0x102, 0x1402a5252\nmov     rcx, [rsp+78h+var_30]                                          ; +0x104, 0x1402a5254\nxor     rcx, rsp; StackCookie                                          ; +0x109, 0x1402a5259\ncall    __security_check_cookie                                        ; +0x10c, 0x1402a525c\nmovaps  xmm6, [rsp+78h+var_28]                                         ; +0x111, 0x1402a5261\nadd     rsp, 60h                                                       ; +0x116, 0x1402a5266\npop     rdi                                                            ; +0x11a, 0x1402a526a\npop     rsi                                                            ; +0x11b, 0x1402a526b\npop     rbx                                                            ; +0x11c, 0x1402a526c\nretn                                                                   ; +0x11d, 0x1402a526d", "xrefs": ["GJRateLevelLayer::selectRating @ 0x1402f6aa2", "LevelInfoLayer::updateLabelValues @ 0x1402ffb19", "RateStarsLayer::selectRating @ 0x1403caaf2", "<???> @ 0x1406d2078"], "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"}