{"type": "func", "start": 5371296384, "end": 5371296755, "name": "GJGarageLayer::updatePlayerColors", "pseudocode": "// \n// GJGarageLayer::updatePlayerColors from 0x140277a80 to 0x140277bf3 (371 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::init @ 0x140273b1f\n// > GJGarageLayer::playerColorChanged @ 0x140277a79\n// > <???> @ 0x1406d0fd4\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=8\nvoid GJGarageLayer::updatePlayerColors(GJGarageLayer *a1)\n{\n  __int64 v2; // rbp\n  int v3; // ebx\n  cocos2d::ccColor3B *v4; // rdi\n  cocos2d::ccColor3B *v5; // rax\n  SimplePlayer *m_playerObject; // rbx\n  __int64 v7; // rcx\n  int v8; // r8d\n  cocos2d::ccColor3B *v9; // rax\n  SimplePlayer *v10; // rdx\n  void *v11; // [rsp+40h] [rbp+8h] BYREF\n  char v12; // [rsp+48h] [rbp+10h] BYREF\n  void *v13; // [rsp+50h] [rbp+18h] BYREF\n\n  v2 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v11 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v11);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  a1->m_playerObject->m_hasGlowOutline = *(_BYTE *)(v2 + 904);\n  v3 = *(_DWORD *)(v2 + 804) - *(_DWORD *)(v2 + 808);\n  v4 = GameManager::colorForIdx(\n         (cocos2d::ccColor3B *)v2,\n         (GameManager *)&v11,\n         *(_DWORD *)(v2 + 816) - *(_DWORD *)(v2 + 820));\n  v5 = GameManager::colorForIdx((cocos2d::ccColor3B *)v2, (GameManager *)&v12, v3);\n  m_playerObject = a1->m_playerObject;\n  m_playerObject->m_firstLayer->setColor(&m_playerObject->m_firstLayer->cocos2d::CCRGBAProtocol, v5);\n  m_playerObject->m_secondLayer->setColor(&m_playerObject->m_secondLayer->cocos2d::CCRGBAProtocol, v4);\n  SimplePlayer::updateColors(m_playerObject);\n  v7 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v13 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v7 = qword_1406C2ED8;\n  }\n  v8 = *(_DWORD *)(v7 + 828) - *(_DWORD *)(v7 + 832);\n  if ( v8 < 0 )\n  {\n    a1->m_playerObject->m_hasCustomGlowColor = 0;\n  }\n  else\n  {\n    v9 = GameManager::colorForIdx((cocos2d::ccColor3B *)v7, (GameManager *)&v13, v8);\n    v10 = a1->m_playerObject;\n    v10->m_hasCustomGlowColor = 1;\n    v10->m_glowColor = *v9;\n  }\n  SimplePlayer::updateColors(a1->m_playerObject);\n}", "assembly": "; \n; GJGarageLayer::updatePlayerColors from 0x140277a80 to 0x140277bf3 (371 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::init @ 0x140273b1f\n; > GJGarageLayer::playerColorChanged @ 0x140277a79\n; > <???> @ 0x1406d0fd4\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140277a80\npush    rbp                                                            ; +0x5, 0x140277a85\npush    rsi                                                            ; +0x6, 0x140277a86\npush    rdi                                                            ; +0x7, 0x140277a87\nsub     rsp, 20h                                                       ; +0x8, 0x140277a88\nmov     rsi, rcx                                                       ; +0xc, 0x140277a8c\nmov     rbp, cs:qword_1406C2ED8                                        ; +0xf, 0x140277a8f\ntest    rbp, rbp                                                       ; +0x16, 0x140277a96\njnz     short loc_140277ACA                                            ; +0x19, 0x140277a99\nmov     ecx, 668h; Size                                                ; +0x1b, 0x140277a9b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x20, 0x140277aa0\nmov     [rsp+38h+arg_0], rax                                           ; +0x25, 0x140277aa5\nmov     rcx, rax                                                       ; +0x2a, 0x140277aaa\ncall    sub_14017AB00                                                  ; +0x2d, 0x140277aad\nnop                                                                    ; +0x32, 0x140277ab2\nmov     cs:qword_1406C2ED8, rax                                        ; +0x33, 0x140277ab3\nmov     rdx, [rax]                                                     ; +0x3a, 0x140277aba\nmov     rcx, rax                                                       ; +0x3d, 0x140277abd\ncall    qword ptr [rdx+48h]                                            ; +0x40, 0x140277ac0\nmov     rbp, cs:qword_1406C2ED8                                        ; +0x43, 0x140277ac3\nmov     rcx, [rsi+1D8h]                                                ; +0x4a, 0x140277aca\nmovzx   eax, byte ptr [rbp+388h]                                       ; +0x51, 0x140277ad1\nmov     [rcx+294h], al                                                 ; +0x58, 0x140277ad8\nmov     r8d, [rbp+330h]                                                ; +0x5e, 0x140277ade\nsub     r8d, [rbp+334h]                                                ; +0x65, 0x140277ae5\nmov     ebx, [rbp+324h]                                                ; +0x6c, 0x140277aec\nsub     ebx, [rbp+328h]                                                ; +0x72, 0x140277af2\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x78, 0x140277af8\nmov     rcx, rbp                                                       ; +0x7d, 0x140277afd\ncall    GameManager__colorForIdx                                       ; +0x80, 0x140277b00\nmov     rdi, rax                                                       ; +0x85, 0x140277b05\nmov     r8d, ebx                                                       ; +0x88, 0x140277b08\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x8b, 0x140277b0b\nmov     rcx, rbp                                                       ; +0x90, 0x140277b10\ncall    GameManager__colorForIdx                                       ; +0x93, 0x140277b13\nmov     rbx, [rsi+1D8h]                                                ; +0x98, 0x140277b18\nmov     rcx, [rbx+258h]                                                ; +0x9f, 0x140277b1f\nadd     rcx, 140h                                                      ; +0xa6, 0x140277b26\nmov     r8, [rcx]                                                      ; +0xad, 0x140277b2d\nmov     rdx, rax                                                       ; +0xb0, 0x140277b30\ncall    qword ptr [r8]                                                 ; +0xb3, 0x140277b33\nmov     rcx, [rbx+260h]                                                ; +0xb6, 0x140277b36\nadd     rcx, 140h                                                      ; +0xbd, 0x140277b3d\nmov     rax, [rcx]                                                     ; +0xc4, 0x140277b44\nmov     rdx, rdi                                                       ; +0xc7, 0x140277b47\ncall    qword ptr [rax]                                                ; +0xca, 0x140277b4a\nmov     rcx, rbx                                                       ; +0xcc, 0x140277b4c\ncall    SimplePlayer__updateColors                                     ; +0xcf, 0x140277b4f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xd4, 0x140277b54\ntest    rcx, rcx                                                       ; +0xdb, 0x140277b5b\njnz     short loc_140277B8F                                            ; +0xde, 0x140277b5e\nmov     ecx, 668h; Size                                                ; +0xe0, 0x140277b60\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe5, 0x140277b65\nmov     [rsp+38h+arg_10], rax                                          ; +0xea, 0x140277b6a\nmov     rcx, rax                                                       ; +0xef, 0x140277b6f\ncall    sub_14017AB00                                                  ; +0xf2, 0x140277b72\nnop                                                                    ; +0xf7, 0x140277b77\nmov     cs:qword_1406C2ED8, rax                                        ; +0xf8, 0x140277b78\nmov     rdx, [rax]                                                     ; +0xff, 0x140277b7f\nmov     rcx, rax                                                       ; +0x102, 0x140277b82\ncall    qword ptr [rdx+48h]                                            ; +0x105, 0x140277b85\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x108, 0x140277b88\nmov     r8d, [rcx+33Ch]                                                ; +0x10f, 0x140277b8f\nsub     r8d, [rcx+340h]                                                ; +0x116, 0x140277b96\njs      short loc_140277BCD                                            ; +0x11d, 0x140277b9d\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x11f, 0x140277b9f\ncall    GameManager__colorForIdx                                       ; +0x124, 0x140277ba4\nmov     rdx, [rsi+1D8h]                                                ; +0x129, 0x140277ba9\nmov     byte ptr [rdx+29Ch], 1                                         ; +0x130, 0x140277bb0\nmovzx   ecx, word ptr [rax]                                            ; +0x137, 0x140277bb7\nmov     [rdx+29Dh], cx                                                 ; +0x13a, 0x140277bba\nmovzx   eax, byte ptr [rax+2]                                          ; +0x141, 0x140277bc1\nmov     [rdx+29Fh], al                                                 ; +0x145, 0x140277bc5\njmp     short loc_140277BDB                                            ; +0x14b, 0x140277bcb\nmov     rax, [rsi+1D8h]                                                ; +0x14d, 0x140277bcd\nmov     byte ptr [rax+29Ch], 0                                         ; +0x154, 0x140277bd4\nmov     rcx, [rsi+1D8h]                                                ; +0x15b, 0x140277bdb\nmov     rbx, [rsp+38h+arg_18]                                          ; +0x162, 0x140277be2\nadd     rsp, 20h                                                       ; +0x167, 0x140277be7\npop     rdi                                                            ; +0x16b, 0x140277beb\npop     rsi                                                            ; +0x16c, 0x140277bec\npop     rbp                                                            ; +0x16d, 0x140277bed\njmp     SimplePlayer__updateColors                                     ; +0x16e, 0x140277bee", "xrefs": ["GJGarageLayer::init @ 0x140273b1f", "GJGarageLayer::playerColorChanged @ 0x140277a79", "<???> @ 0x1406d0fd4"], "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"}