{"type": "func", "start": 4298550816, "end": 4298551117, "name": "GJGarageLayer::updatePlayerColors", "pseudocode": "// \n// GJGarageLayer::updatePlayerColors from 0x10036ae20 to 0x10036af4d (301 bytes)\n// \n// 4 xrefs:\n// > GJGarageLayer::init @ 0x100369d35\n// > GJGarageLayer::playerColorChanged @ 0x10036ed3a\n// > GJGarageLayer::playerColorChanged @ 0x10036ed63\n// > sub_10036ED70 @ 0x10036eda3\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 GJGarageLayer::updatePlayerColors(GJGarageLayer *a1)\n{\n  __int64 v1; // rax\n  SimplePlayer *m_playerObject; // r14\n  SimplePlayer *v3; // r14\n  GameManager *v4; // r15\n  GameManager *v5; // rax\n  GameManager *v6; // r15\n  GameManager *v7; // rax\n  GameManager *v8; // rax\n  SimplePlayer *v9; // r14\n  GameManager *v10; // r15\n  GameManager *v11; // rax\n  _QWORD v12[4]; // [rsp+0h] [rbp-20h] BYREF\n  cocos2d::ccColor3B v13; // 0:eax.3\n\n  v12[0] = v1;\n  m_playerObject = a1->m_playerObject;\n  m_playerObject->m_hasGlowOutline = GameManager::sharedState()->m_playerGlow;\n  v3 = a1->m_playerObject;\n  v4 = GameManager::sharedState();\n  v5 = GameManager::sharedState();\n  *(cocos2d::ccColor3B *)v12 = GameManager::colorForIdx(v4, v5->m_playerColor.random - v5->m_playerColor.seed);\n  v6 = GameManager::sharedState();\n  v7 = GameManager::sharedState();\n  *(cocos2d::ccColor3B *)((char *)v12 + 4) = GameManager::colorForIdx(\n                                               v6,\n                                               v7->m_playerColor2.random - v7->m_playerColor2.seed);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD *))v3->m_firstLayer->setColor)(v3->m_firstLayer, v12);\n  ((void (__fastcall *)(cocos2d::CCSprite *, char *))v3->m_secondLayer->setColor)(v3->m_secondLayer, (char *)v12 + 4);\n  SimplePlayer::updateColors(v3);\n  v8 = GameManager::sharedState();\n  v9 = a1->m_playerObject;\n  if ( v8->m_playerGlowColor.random >= v8->m_playerGlowColor.seed )\n  {\n    v10 = GameManager::sharedState();\n    v11 = GameManager::sharedState();\n    v13 = GameManager::colorForIdx(v10, v11->m_playerGlowColor.random - v11->m_playerGlowColor.seed);\n    v9->m_hasCustomGlowColor = 1;\n    v9->m_glowColor = v13;\n    v9 = a1->m_playerObject;\n  }\n  else\n  {\n    v9->m_hasCustomGlowColor = 0;\n  }\n  SimplePlayer::updateColors(v9);\n}", "assembly": "; \n; GJGarageLayer::updatePlayerColors from 0x10036ae20 to 0x10036af4d (301 bytes)\n; \n; 4 xrefs:\n; > GJGarageLayer::init @ 0x100369d35\n; > GJGarageLayer::playerColorChanged @ 0x10036ed3a\n; > GJGarageLayer::playerColorChanged @ 0x10036ed63\n; > sub_10036ED70 @ 0x10036eda3\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, 0x10036ae20\nmov     rbp, rsp                                                       ; +0x1, 0x10036ae21\npush    r15                                                            ; +0x4, 0x10036ae24\npush    r14                                                            ; +0x6, 0x10036ae26\npush    rbx                                                            ; +0x8, 0x10036ae28\npush    rax                                                            ; +0x9, 0x10036ae29\nmov     rbx, rdi                                                       ; +0xa, 0x10036ae2a\nmov     r14, [rdi+1D8h]                                                ; +0xd, 0x10036ae2d\ncall    GameManager__sharedState                                       ; +0x14, 0x10036ae34\nmovzx   eax, byte ptr [rax+368h]                                       ; +0x19, 0x10036ae39\nmov     [r14+294h], al                                                 ; +0x20, 0x10036ae40\nmov     r14, [rbx+1D8h]                                                ; +0x27, 0x10036ae47\ncall    GameManager__sharedState                                       ; +0x2e, 0x10036ae4e\nmov     r15, rax                                                       ; +0x33, 0x10036ae53\ncall    GameManager__sharedState                                       ; +0x36, 0x10036ae56\nmov     esi, [rax+304h]                                                ; +0x3b, 0x10036ae5b\nsub     esi, [rax+308h]                                                ; +0x41, 0x10036ae61\nmov     rdi, r15                                                       ; +0x47, 0x10036ae67\ncall    GameManager__colorForIdx                                       ; +0x4a, 0x10036ae6a\nmov     [rbp+var_20], ax                                               ; +0x4f, 0x10036ae6f\nshr     eax, 10h                                                       ; +0x53, 0x10036ae73\nmov     [rbp+var_1E], al                                               ; +0x56, 0x10036ae76\ncall    GameManager__sharedState                                       ; +0x59, 0x10036ae79\nmov     r15, rax                                                       ; +0x5e, 0x10036ae7e\ncall    GameManager__sharedState                                       ; +0x61, 0x10036ae81\nmov     esi, [rax+310h]                                                ; +0x66, 0x10036ae86\nsub     esi, [rax+314h]                                                ; +0x6c, 0x10036ae8c\nmov     rdi, r15                                                       ; +0x72, 0x10036ae92\ncall    GameManager__colorForIdx                                       ; +0x75, 0x10036ae95\nmov     [rbp+var_1C], ax                                               ; +0x7a, 0x10036ae9a\nshr     eax, 10h                                                       ; +0x7e, 0x10036ae9e\nmov     [rbp+var_1A], al                                               ; +0x81, 0x10036aea1\nmov     rdi, [r14+258h]                                                ; +0x84, 0x10036aea4\nmov     rax, [rdi]                                                     ; +0x8b, 0x10036aeab\nlea     rsi, [rbp+var_20]                                              ; +0x8e, 0x10036aeae\ncall    qword ptr [rax+3B0h]                                           ; +0x92, 0x10036aeb2\nmov     rdi, [r14+260h]                                                ; +0x98, 0x10036aeb8\nmov     rax, [rdi]                                                     ; +0x9f, 0x10036aebf\nlea     rsi, [rbp+var_1C]                                              ; +0xa2, 0x10036aec2\ncall    qword ptr [rax+3B0h]                                           ; +0xa6, 0x10036aec6\nmov     rdi, r14                                                       ; +0xac, 0x10036aecc\ncall    SimplePlayer__updateColors                                     ; +0xaf, 0x10036aecf\ncall    GameManager__sharedState                                       ; +0xb4, 0x10036aed4\nmov     ecx, [rax+31Ch]                                                ; +0xb9, 0x10036aed9\nmov     r14, [rbx+1D8h]                                                ; +0xbf, 0x10036aedf\ncmp     ecx, [rax+320h]                                                ; +0xc6, 0x10036aee6\njge     short loc_10036AEF8                                            ; +0xcc, 0x10036aeec\nmov     byte ptr [r14+29Ch], 0                                         ; +0xce, 0x10036aeee\njmp     short loc_10036AF3A                                            ; +0xd6, 0x10036aef6\ncall    GameManager__sharedState                                       ; +0xd8, 0x10036aef8\nmov     r15, rax                                                       ; +0xdd, 0x10036aefd\ncall    GameManager__sharedState                                       ; +0xe0, 0x10036af00\nmov     esi, [rax+31Ch]                                                ; +0xe5, 0x10036af05\nsub     esi, [rax+320h]                                                ; +0xeb, 0x10036af0b\nmov     rdi, r15                                                       ; +0xf1, 0x10036af11\ncall    GameManager__colorForIdx                                       ; +0xf4, 0x10036af14\nmov     byte ptr [r14+29Ch], 1                                         ; +0xf9, 0x10036af19\nmov     [r14+29Dh], ax                                                 ; +0x101, 0x10036af21\nshr     eax, 10h                                                       ; +0x109, 0x10036af29\nmov     [r14+29Fh], al                                                 ; +0x10c, 0x10036af2c\nmov     r14, [rbx+1D8h]                                                ; +0x113, 0x10036af33\nmov     rdi, r14                                                       ; +0x11a, 0x10036af3a\ncall    SimplePlayer__updateColors                                     ; +0x11d, 0x10036af3d\nadd     rsp, 8                                                         ; +0x122, 0x10036af42\npop     rbx                                                            ; +0x126, 0x10036af46\npop     r14                                                            ; +0x127, 0x10036af47\npop     r15                                                            ; +0x129, 0x10036af49\npop     rbp                                                            ; +0x12b, 0x10036af4b\nretn                                                                   ; +0x12c, 0x10036af4c", "xrefs": ["GJGarageLayer::init @ 0x100369d35", "GJGarageLayer::playerColorChanged @ 0x10036ed3a", "GJGarageLayer::playerColorChanged @ 0x10036ed63", "sub_10036ED70 @ 0x10036eda3"], "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"}