{"type": "func", "start": 4206864, "end": 4207116, "name": "GJGarageLayer::updatePlayerColors", "pseudocode": "// \n// GJGarageLayer::updatePlayerColors from 0x403110 to 0x40320c (252 bytes)\n// \n// 2 xrefs:\n// > GJGarageLayer::playerColorChanged @ 0x40322a\n// > GJGarageLayer::init @ 0x407488\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::updatePlayerColors(GJGarageLayer *a1)\n{\n  SimplePlayer *m_playerObject; // r6\n  GameManager *v3; // r0\n  SimplePlayer *v4; // r7\n  GameManager *v5; // r6\n  GameManager *v6; // r0\n  GameManager *v7; // r6\n  GameManager *v8; // r0\n  GameManager *v9; // r0\n  SimplePlayer *v10; // r7\n  GameManager *v11; // r8\n  GameManager *v12; // r0\n  cocos2d::ccColor3B v13; // [sp+4h] [bp-Ch] BYREF\n  cocos2d::ccColor3B v14; // [sp+8h] [bp-8h] BYREF\n\n  m_playerObject = a1->m_playerObject;\n  v3 = GameManager::sharedState();\n  v4 = a1->m_playerObject;\n  m_playerObject->m_hasGlowOutline = v3->m_playerGlow;\n  v5 = GameManager::sharedState();\n  v6 = GameManager::sharedState();\n  v13 = GameManager::colorForIdx(v5, v6->m_playerColor.random - v6->m_playerColor.seed);\n  v7 = GameManager::sharedState();\n  v8 = GameManager::sharedState();\n  v14 = GameManager::colorForIdx(v7, v8->m_playerColor2.random - v8->m_playerColor2.seed);\n  SimplePlayer::setColors(v4, &v13, &v14);\n  v9 = GameManager::sharedState();\n  if ( v9->m_playerGlowColor.random - v9->m_playerGlowColor.seed < 0 )\n  {\n    SimplePlayer::disableCustomGlowColor(a1->m_playerObject);\n  }\n  else\n  {\n    v10 = a1->m_playerObject;\n    v11 = GameManager::sharedState();\n    v12 = GameManager::sharedState();\n    v14 = GameManager::colorForIdx(v11, v12->m_playerGlowColor.random - v12->m_playerGlowColor.seed);\n    SimplePlayer::enableCustomGlowColor(v10, &v14);\n  }\n  SimplePlayer::updateColors(a1->m_playerObject);\n}", "assembly": "; \n; GJGarageLayer::updatePlayerColors from 0x403110 to 0x40320c (252 bytes)\n; \n; 2 xrefs:\n; > GJGarageLayer::playerColorChanged @ 0x40322a\n; > GJGarageLayer::init @ 0x407488\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          {R0-R8,LR}                                             ; +0x0, 0x403110\nMOV             R5, R0                                                 ; +0x4, 0x403114\nLDR             R4, =(__stack_chk_guard_ptr - 0x403120)                ; +0x6, 0x403116\nLDR.W           R6, [R0,#0x15C]                                        ; +0x8, 0x403118\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xc, 0x40311c\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xe, 0x40311e\nLDR             R3, [R4]                                               ; +0x10, 0x403120\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x12, 0x403122\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x403124\nLDR.W           R7, [R5,#0x15C]                                        ; +0x18, 0x403128\nLDRB.W          R3, [R0,#0x290]                                        ; +0x1c, 0x40312c\nSTRB.W          R3, [R6,#0x21C]                                        ; +0x20, 0x403130\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x24, 0x403134\nMOV             R6, R0                                                 ; +0x28, 0x403138\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2a, 0x40313a\nLDR.W           R3, [R0,#0x230]                                        ; +0x2e, 0x40313e\nLDR.W           R1, [R0,#0x22C]                                        ; +0x32, 0x403142\nMOV             R0, R6; this                                           ; +0x36, 0x403146\nSUBS            R1, R1, R3; int                                        ; +0x38, 0x403148\nBL              _ZN11GameManager11colorForIdxEi; GameManager::colorForIdx(int) ; +0x3a, 0x40314a\nUBFX.W          R3, R0, #8, #8                                         ; +0x3e, 0x40314e\nSTRB.W          R0, [SP,#0x10+var_C]                                   ; +0x42, 0x403152\nSTRB.W          R3, [SP,#0x10+var_B]                                   ; +0x46, 0x403156\nUBFX.W          R0, R0, #0x10, #8; this                                ; +0x4a, 0x40315a\nSTRB.W          R0, [SP,#0x10+var_A]                                   ; +0x4e, 0x40315e\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x52, 0x403162\nMOV             R6, R0                                                 ; +0x56, 0x403166\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x58, 0x403168\nLDR.W           R3, [R0,#0x23C]                                        ; +0x5c, 0x40316c\nLDR.W           R1, [R0,#0x238]                                        ; +0x60, 0x403170\nMOV             R0, R6; this                                           ; +0x64, 0x403174\nADD             R6, SP, #0x10+var_8                                    ; +0x66, 0x403176\nSUBS            R1, R1, R3; int                                        ; +0x68, 0x403178\nBL              _ZN11GameManager11colorForIdxEi; GameManager::colorForIdx(int) ; +0x6a, 0x40317a\nMOV             R2, R6                                                 ; +0x6e, 0x40317e\nADD             R1, SP, #0x10+var_C                                    ; +0x70, 0x403180\nUBFX.W          R3, R0, #8, #8                                         ; +0x72, 0x403182\nSTRB.W          R0, [SP,#0x10+var_8]                                   ; +0x76, 0x403186\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x7a, 0x40318a\nSTRB.W          R0, [SP,#0x10+var_6]                                   ; +0x7e, 0x40318e\nMOV             R0, R7                                                 ; +0x82, 0x403192\nSTRB.W          R3, [SP,#0x10+var_7]                                   ; +0x84, 0x403194\nBL              _ZN12SimplePlayer9setColorsERKN7cocos2d10_ccColor3BES3_; SimplePlayer::setColors(cocos2d::_ccColor3B const&,cocos2d::_ccColor3B const&) ; +0x88, 0x403198\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x8c, 0x40319c\nLDR.W           R3, [R0,#0x244]                                        ; +0x90, 0x4031a0\nLDR.W           R2, [R0,#0x248]                                        ; +0x94, 0x4031a4\nSUBS            R3, R3, R2                                             ; +0x98, 0x4031a8\nCMP             R3, #0                                                 ; +0x9a, 0x4031aa\nBLT             loc_4031EA                                             ; +0x9c, 0x4031ac\nLDR.W           R7, [R5,#0x15C]                                        ; +0x9e, 0x4031ae\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xa2, 0x4031b2\nMOV             R8, R0                                                 ; +0xa6, 0x4031b6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xa8, 0x4031b8\nLDR.W           R3, [R0,#0x248]                                        ; +0xac, 0x4031bc\nLDR.W           R1, [R0,#0x244]                                        ; +0xb0, 0x4031c0\nMOV             R0, R8; this                                           ; +0xb4, 0x4031c4\nSUBS            R1, R1, R3; int                                        ; +0xb6, 0x4031c6\nBL              _ZN11GameManager11colorForIdxEi; GameManager::colorForIdx(int) ; +0xb8, 0x4031c8\nMOV             R1, R6                                                 ; +0xbc, 0x4031cc\nUBFX.W          R3, R0, #8, #8                                         ; +0xbe, 0x4031ce\nSTRB.W          R0, [SP,#0x10+var_8]                                   ; +0xc2, 0x4031d2\nUBFX.W          R0, R0, #0x10, #8                                      ; +0xc6, 0x4031d6\nSTRB.W          R0, [SP,#0x10+var_6]                                   ; +0xca, 0x4031da\nMOV             R0, R7                                                 ; +0xce, 0x4031de\nSTRB.W          R3, [SP,#0x10+var_7]                                   ; +0xd0, 0x4031e0\nBL              _ZN12SimplePlayer21enableCustomGlowColorERKN7cocos2d10_ccColor3BE; SimplePlayer::enableCustomGlowColor(cocos2d::_ccColor3B const&) ; +0xd4, 0x4031e4\nB               loc_4031F2                                             ; +0xd8, 0x4031e8\nLDR.W           R0, [R5,#0x15C]; this                                  ; +0xda, 0x4031ea\nBL              _ZN12SimplePlayer22disableCustomGlowColorEv; SimplePlayer::disableCustomGlowColor(void) ; +0xde, 0x4031ee\nLDR.W           R0, [R5,#0x15C]; this                                  ; +0xe2, 0x4031f2\nBL              _ZN12SimplePlayer12updateColorsEv; SimplePlayer::updateColors(void) ; +0xe6, 0x4031f6\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xea, 0x4031fa\nLDR             R3, [R4]                                               ; +0xec, 0x4031fc\nCMP             R2, R3                                                 ; +0xee, 0x4031fe\nBEQ             loc_403206                                             ; +0xf0, 0x403200\nBLX             __stack_chk_fail                                       ; +0xf2, 0x403202\nADD             SP, SP, #0x10                                          ; +0xf6, 0x403206\nPOP.W           {R4-R8,PC}                                             ; +0xf8, 0x403208", "xrefs": ["GJGarageLayer::playerColorChanged @ 0x40322a", "GJGarageLayer::init @ 0x407488"], "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"}