{"type": "func", "start": 4930692, "end": 4930890, "name": "GJDifficultySprite::updateDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::updateDifficultyFrame from 0x4b3c84 to 0x4b3d4a (198 bytes)\n// \n// 3 xrefs:\n// > LevelInfoLayer::updateLabelValues @ 0x3b2f68\n// > GJRateLevelLayer::selectRating @ 0x4532ec\n// > RateStarsLayer::selectRating @ 0x455820\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 GJDifficultySprite::updateDifficultyFrame(GJDifficultySprite *a1, int a2, GJDifficultyName a3)\n{\n  void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r5\n  cocos2d::CCSpriteFrameCache *v7; // r8\n  cocos2d::CCSpriteFrame *v8; // r0\n  unsigned int v9; // r5\n  float width; // s16\n  const cocos2d::CCSize *v11; // r0\n  int v12; // r0\n  cocos2d::CCPoint v13; // [sp+4h] [bp+0h] BYREF\n\n  setDisplayFrame = a1->setDisplayFrame;\n  v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  GJDifficultySprite::getDifficultyFrame((int)&v13, (const char *)a2, a3);\n  v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, (const char *)LODWORD(v13.x));\n  setDisplayFrame(a1, v8);\n  sub_774008(&v13);\n  if ( a1->m_pChildren )\n  {\n    v9 = 0;\n    width = a1->getContentSize(a1)->width;\n    v11 = a1->getContentSize(a1);\n    cocos2d::CCPoint::CCPoint(&v13, width * 0.5, v11->height * 0.5);\n    while ( v9 < cocos2d::CCArray::count(a1->m_pChildren) )\n    {\n      v12 = cocos2d::CCArray::objectAtIndex(a1->m_pChildren, v9++);\n      (*(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v12 + 92))(v12, &v13);\n    }\n  }\n}", "assembly": "; \n; GJDifficultySprite::updateDifficultyFrame from 0x4b3c84 to 0x4b3d4a (198 bytes)\n; \n; 3 xrefs:\n; > LevelInfoLayer::updateLabelValues @ 0x3b2f68\n; > GJRateLevelLayer::selectRating @ 0x4532ec\n; > RateStarsLayer::selectRating @ 0x455820\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.W          {R4-R10,LR}                                            ; +0x0, 0x4b3c84\nMOV             R10, R1                                                ; +0x4, 0x4b3c88\nLDR             R6, =(__stack_chk_guard_ptr - 0x4B3C98)                ; +0x6, 0x4b3c8a\nMOV             R9, R2                                                 ; +0x8, 0x4b3c8c\nVPUSH           {D8}                                                   ; +0xa, 0x4b3c8e\nMOV             R4, R0                                                 ; +0xe, 0x4b3c92\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4b3c94\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x4b3c96\nLDR             R3, [R6]                                               ; +0x14, 0x4b3c98\nSUB             SP, SP, #0x10                                          ; +0x16, 0x4b3c9a\nADD             R7, SP, #4                                             ; +0x18, 0x4b3c9c\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x1a, 0x4b3c9e\nLDR             R3, [R0]                                               ; +0x1c, 0x4b3ca0\nLDR.W           R5, [R3,#0x23C]                                        ; +0x1e, 0x4b3ca2\nBL              _ZN7cocos2d18CCSpriteFrameCache22sharedSpriteFrameCacheEv; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x22, 0x4b3ca6\nMOV             R1, R10                                                ; +0x26, 0x4b3caa\nMOV             R2, R9                                                 ; +0x28, 0x4b3cac\nMOV             R8, R0                                                 ; +0x2a, 0x4b3cae\nMOV             R0, R7                                                 ; +0x2c, 0x4b3cb0\nBL              _ZN18GJDifficultySprite18getDifficultyFrameEi16GJDifficultyName; GJDifficultySprite::getDifficultyFrame(int,GJDifficultyName) ; +0x2e, 0x4b3cb2\nMOV             R0, R8; this                                           ; +0x32, 0x4b3cb6\nLDR             R1, [SP,#0x10+var_C]; char *                           ; +0x34, 0x4b3cb8\nBL              _ZN7cocos2d18CCSpriteFrameCache17spriteFrameByNameEPKc; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const*) ; +0x36, 0x4b3cba\nMOV             R1, R0                                                 ; +0x3a, 0x4b3cbe\nMOV             R0, R4                                                 ; +0x3c, 0x4b3cc0\nBLX             R5                                                     ; +0x3e, 0x4b3cc2\nMOV             R0, R7                                                 ; +0x40, 0x4b3cc4\nBL              sub_774008                                             ; +0x42, 0x4b3cc6\nLDR.W           R3, [R4,#0xC0]                                         ; +0x46, 0x4b3cca\nCBZ             R3, loc_4B3D34                                         ; +0x4a, 0x4b3cce\nLDR             R3, [R4]                                               ; +0x4c, 0x4b3cd0\nMOV             R0, R4                                                 ; +0x4e, 0x4b3cd2\nVMOV.F32        S17, #0.5                                              ; +0x50, 0x4b3cd4\nMOVS            R5, #0                                                 ; +0x54, 0x4b3cd8\nLDR.W           R3, [R3,#0x9C]                                         ; +0x56, 0x4b3cda\nBLX             R3                                                     ; +0x5a, 0x4b3cde\nLDR             R3, [R4]                                               ; +0x5c, 0x4b3ce0\nLDR.W           R3, [R3,#0x9C]                                         ; +0x5e, 0x4b3ce2\nVLDR            S16, [R0]                                              ; +0x62, 0x4b3ce6\nMOV             R0, R4                                                 ; +0x66, 0x4b3cea\nBLX             R3                                                     ; +0x68, 0x4b3cec\nVMUL.F32        S16, S16, S17                                          ; +0x6a, 0x4b3cee\nVMOV            R1, S16; float                                         ; +0x6e, 0x4b3cf2\nVLDR            S15, [R0,#4]                                           ; +0x72, 0x4b3cf6\nMOV             R0, R7; this                                           ; +0x76, 0x4b3cfa\nVMUL.F32        S15, S15, S17                                          ; +0x78, 0x4b3cfc\nVMOV            R2, S15; float                                         ; +0x7c, 0x4b3d00\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x80, 0x4b3d04\nLDR.W           R0, [R4,#0xC0]; this                                   ; +0x84, 0x4b3d08\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x88, 0x4b3d0c\nCMP             R5, R0                                                 ; +0x8c, 0x4b3d10\nBCS             loc_4B3D34                                             ; +0x8e, 0x4b3d12\nMOV             R1, R5; unsigned int                                   ; +0x90, 0x4b3d14\nLDR.W           R0, [R4,#0xC0]; this                                   ; +0x92, 0x4b3d16\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x96, 0x4b3d1a\nMOV             R1, R7                                                 ; +0x9a, 0x4b3d1e\nADDS            R5, #1                                                 ; +0x9c, 0x4b3d20\nLDR             R3, [R0]                                               ; +0x9e, 0x4b3d22\nLDR             R3, [R3,#0x5C]                                         ; +0xa0, 0x4b3d24\nBLX             R3                                                     ; +0xa2, 0x4b3d26\nB               loc_4B3D08                                             ; +0xa4, 0x4b3d28\nMOV             R0, R7                                                 ; +0xa6, 0x4b3d2a\nBL              sub_774008                                             ; +0xa8, 0x4b3d2c\nBL              __cxa_end_cleanup                                      ; +0xac, 0x4b3d30\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xb0, 0x4b3d34\nLDR             R3, [R6]                                               ; +0xb2, 0x4b3d36\nCMP             R2, R3                                                 ; +0xb4, 0x4b3d38\nBEQ             loc_4B3D40                                             ; +0xb6, 0x4b3d3a\nBLX             __stack_chk_fail                                       ; +0xb8, 0x4b3d3c\nADD             SP, SP, #0x10                                          ; +0xbc, 0x4b3d40\nVPOP            {D8}                                                   ; +0xbe, 0x4b3d42\nPOP.W           {R4-R10,PC}                                            ; +0xc2, 0x4b3d46", "xrefs": ["LevelInfoLayer::updateLabelValues @ 0x3b2f68", "GJRateLevelLayer::selectRating @ 0x4532ec", "RateStarsLayer::selectRating @ 0x455820"], "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"}