{"type": "func", "start": 4202380, "end": 4202690, "name": "GJGarageLayer::updateRate", "pseudocode": "// \n// GJGarageLayer::updateRate from 0x401f8c to 0x4020c2 (310 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'GJGarageLayer::updateRate @ 0x4020d4\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 GJGarageLayer::updateRate(GJGarageLayer *a1)\n{\n  cocos2d::CCNode *m_unknown; // r0\n  cocos2d::CCString *v3; // r0\n  const char *CString; // r9\n  cocos2d::CCString *v5; // r0\n  const char *v6; // r6\n  cocos2d::CCSprite *m_supporter; // r5\n  void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r8\n  cocos2d::CCSpriteFrameCache *v9; // r0\n  cocos2d::CCSpriteFrame *v10; // r0\n  cocos2d::CCSprite *v11; // r6\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8\n  cocos2d::CCSprite *v13; // r0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2\n  void (__fastcall *v15)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2\n  cocos2d::CCPoint v16; // [sp+4h] [bp-10h] BYREF\n\n  if ( GameManager::sharedState()->m_ratedGame && a1->m_supporter )\n  {\n    v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"player_%02d_001.png\",\n                                &byte_9[4]);\n    CString = cocos2d::CCString::getCString(v3);\n    v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"player_%02d_2_001.png\",\n                                &byte_9[4]);\n    v6 = cocos2d::CCString::getCString(v5);\n    a1->m_supporter->removeAllChildrenWithCleanup(a1->m_supporter, 1);\n    m_supporter = a1->m_supporter;\n    setDisplayFrame = m_supporter->setDisplayFrame;\n    v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, CString);\n    setDisplayFrame(m_supporter, v10);\n    v11 = cocos2d::CCSprite::createWithSpriteFrameName(v6);\n    a1->m_supporter->addChild_0(a1->m_supporter, v11, -1);\n    setPosition = v11->setPosition;\n    cocos2d::CCPoint::CCPoint(\n      &v16,\n      a1->m_supporter->m_obRect.size.width * 0.5,\n      a1->m_supporter->m_obRect.size.height * 0.5);\n    setPosition(v11, &v16);\n    v13 = a1->m_supporter;\n    setColor = v13->setColor;\n    LOWORD(v16.x) = -20561;\n    BYTE2(v16.x) = -81;\n    setColor(v13, (const cocos2d::ccColor3B *)&v16);\n    v15 = v11->setColor;\n    LOWORD(v16.x) = -1;\n    BYTE2(v16.x) = -1;\n    v15(v11, (const cocos2d::ccColor3B *)&v16);\n    GameManager::sharedState()->m_gameRateDelegate1 = nullptr;\n  }\n  if ( GameManager::sharedState()->m_clickedFacebook )\n  {\n    m_unknown = a1->m_unknown;\n    if ( m_unknown )\n    {\n      m_unknown->removeAllChildrenWithCleanup(m_unknown, 1);\n      GameManager::sharedState()->m_gameRateDelegate1 = nullptr;\n    }\n  }\n}", "assembly": "; \n; GJGarageLayer::updateRate from 0x401f8c to 0x4020c2 (310 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'GJGarageLayer::updateRate @ 0x4020d4\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-R9,LR}                                             ; +0x0, 0x401f8c\nSUB             SP, SP, #0x14                                          ; +0x4, 0x401f90\nLDR             R7, =(__stack_chk_guard_ptr - 0x401F9A)                ; +0x6, 0x401f92\nMOV             R4, R0                                                 ; +0x8, 0x401f94\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xa, 0x401f96\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xc, 0x401f98\nLDR             R3, [R7]                                               ; +0xe, 0x401f9a\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x10, 0x401f9c\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x12, 0x401f9e\nLDRB.W          R3, [R0,#0x1B0]                                        ; +0x16, 0x401fa2\nCBZ             R3, loc_401FAE                                         ; +0x1a, 0x401fa6\nLDR.W           R3, [R4,#0x16C]                                        ; +0x1c, 0x401fa8\nCBNZ            R3, loc_401FD8                                         ; +0x20, 0x401fac\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x22, 0x401fae\nLDRB.W          R3, [R0,#0x1B1]                                        ; +0x26, 0x401fb2\nCMP             R3, #0                                                 ; +0x2a, 0x401fb6\nBEQ             loc_4020B0                                             ; +0x2c, 0x401fb8\nLDR.W           R0, [R4,#0x168]                                        ; +0x2e, 0x401fba\nCMP             R0, #0                                                 ; +0x32, 0x401fbe\nBEQ             loc_4020B0                                             ; +0x34, 0x401fc0\nLDR             R3, [R0]                                               ; +0x36, 0x401fc2\nMOVS            R1, #1                                                 ; +0x38, 0x401fc4\nLDR.W           R3, [R3,#0x11C]                                        ; +0x3a, 0x401fc6\nBLX             R3                                                     ; +0x3e, 0x401fca\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x40, 0x401fcc\nMOVS            R3, #0                                                 ; +0x44, 0x401fd0\nSTR.W           R3, [R0,#0x2A8]                                        ; +0x46, 0x401fd2\nB               loc_4020B0                                             ; +0x4a, 0x401fd6\nLDR             R0, =(aPlayer02d001Pn - 0x401FE0); \"player_%02d_001.png\" ; +0x4c, 0x401fd8\nMOVS            R1, #(byte_9+4); char *                                ; +0x4e, 0x401fda\nADD             R0, PC; \"player_%02d_001.png\"                          ; +0x50, 0x401fdc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x52, 0x401fde\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x56, 0x401fe2\nMOVS            R1, #(byte_9+4); char *                                ; +0x5a, 0x401fe6\nMOV             R9, R0                                                 ; +0x5c, 0x401fe8\nLDR             R0, =(aPlayer02d2001P - 0x401FF0); \"player_%02d_2_001.png\" ; +0x5e, 0x401fea\nADD             R0, PC; \"player_%02d_2_001.png\"                        ; +0x60, 0x401fec\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x62, 0x401fee\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x66, 0x401ff2\nMOVS            R1, #1                                                 ; +0x6a, 0x401ff6\nMOV             R6, R0                                                 ; +0x6c, 0x401ff8\nLDR.W           R0, [R4,#0x16C]                                        ; +0x6e, 0x401ffa\nLDR             R3, [R0]                                               ; +0x72, 0x401ffe\nLDR.W           R3, [R3,#0x11C]                                        ; +0x74, 0x402000\nBLX             R3                                                     ; +0x78, 0x402004\nLDR.W           R5, [R4,#0x16C]                                        ; +0x7a, 0x402006\nLDR             R3, [R5]                                               ; +0x7e, 0x40200a\nLDR.W           R8, [R3,#0x23C]                                        ; +0x80, 0x40200c\nBL              _ZN7cocos2d18CCSpriteFrameCache22sharedSpriteFrameCacheEv; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x84, 0x402010\nMOV             R1, R9; char *                                         ; +0x88, 0x402014\nBL              _ZN7cocos2d18CCSpriteFrameCache17spriteFrameByNameEPKc; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const*) ; +0x8a, 0x402016\nMOV             R1, R0                                                 ; +0x8e, 0x40201a\nMOV             R0, R5                                                 ; +0x90, 0x40201c\nBLX             R8                                                     ; +0x92, 0x40201e\nMOV             R0, R6; this                                           ; +0x94, 0x402020\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x96, 0x402022\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x9a, 0x402026\nADD             R5, SP, #0x14+var_10                                   ; +0x9e, 0x40202a\nMOV             R6, R0                                                 ; +0xa0, 0x40202c\nLDR.W           R0, [R4,#0x16C]                                        ; +0xa2, 0x40202e\nMOV             R1, R6                                                 ; +0xa6, 0x402032\nLDR             R3, [R0]                                               ; +0xa8, 0x402034\nLDR.W           R3, [R3,#0xE0]                                         ; +0xaa, 0x402036\nBLX             R3                                                     ; +0xae, 0x40203a\nLDR             R3, [R6]                                               ; +0xb0, 0x40203c\nVMOV.F32        S15, #0.5                                              ; +0xb2, 0x40203e\nMOV             R0, R5; this                                           ; +0xb6, 0x402042\nLDR.W           R8, [R3,#0x5C]                                         ; +0xb8, 0x402044\nLDR.W           R3, [R4,#0x16C]                                        ; +0xbc, 0x402048\nVLDR            S14, [R3,#0x15C]                                       ; +0xc0, 0x40204c\nVLDR            S13, [R3,#0x158]                                       ; +0xc4, 0x402050\nVMUL.F32        S13, S13, S15                                          ; +0xc8, 0x402054\nVMUL.F32        S15, S14, S15                                          ; +0xcc, 0x402058\nVMOV            R1, S13; float                                         ; +0xd0, 0x40205c\nVMOV            R2, S15; float                                         ; +0xd4, 0x402060\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xd8, 0x402064\nMOV             R0, R6                                                 ; +0xdc, 0x402068\nMOV             R1, R5                                                 ; +0xde, 0x40206a\nBLX             R8                                                     ; +0xe0, 0x40206c\nLDR.W           R0, [R4,#0x16C]                                        ; +0xe2, 0x40206e\nMOV             R1, R5                                                 ; +0xe6, 0x402072\nLDR             R3, [R0]                                               ; +0xe8, 0x402074\nLDR.W           R2, [R3,#0x1D8]                                        ; +0xea, 0x402076\nMOVS            R3, #0xAF                                              ; +0xee, 0x40207a\nSTRB.W          R3, [SP,#0x14+var_10]                                  ; +0xf0, 0x40207c\nSTRB.W          R3, [SP,#0x14+var_F]                                   ; +0xf4, 0x402080\nSTRB.W          R3, [SP,#0x14+var_E]                                   ; +0xf8, 0x402084\nBLX             R2                                                     ; +0xfc, 0x402088\nLDR             R3, [R6]                                               ; +0xfe, 0x40208a\nMOV             R0, R6                                                 ; +0x100, 0x40208c\nMOV             R1, R5                                                 ; +0x102, 0x40208e\nLDR.W           R2, [R3,#0x1D8]                                        ; +0x104, 0x402090\nMOVS            R3, #0xFF                                              ; +0x108, 0x402094\nSTRB.W          R3, [SP,#0x14+var_10]                                  ; +0x10a, 0x402096\nSTRB.W          R3, [SP,#0x14+var_F]                                   ; +0x10e, 0x40209a\nSTRB.W          R3, [SP,#0x14+var_E]                                   ; +0x112, 0x40209e\nBLX             R2                                                     ; +0x116, 0x4020a2\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x118, 0x4020a4\nMOVS            R3, #0                                                 ; +0x11c, 0x4020a8\nSTR.W           R3, [R0,#0x2A8]                                        ; +0x11e, 0x4020aa\nB               loc_401FAE                                             ; +0x122, 0x4020ae\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x124, 0x4020b0\nLDR             R3, [R7]                                               ; +0x126, 0x4020b2\nCMP             R2, R3                                                 ; +0x128, 0x4020b4\nBEQ             loc_4020BC                                             ; +0x12a, 0x4020b6\nBLX             __stack_chk_fail                                       ; +0x12c, 0x4020b8\nADD             SP, SP, #0x14                                          ; +0x130, 0x4020bc\nPOP.W           {R4-R9,PC}                                             ; +0x132, 0x4020be", "xrefs": ["`non-virtual thunk to'GJGarageLayer::updateRate @ 0x4020d4"], "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"}