{"type": "func", "start": 5372380288, "end": 5372380668, "name": "GJGarageLayer::updatePlayerColors", "pseudocode": "// \n// GJGarageLayer::updatePlayerColors from 0x140380480 to 0x1403805fc (380 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::init @ 0x14037c2b6\n// > GJGarageLayer::playerColorChanged @ 0x140380479\n// > <???> @ 0x1409228ec\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:05 +0000\n// \n\n// Hidden C++ exception states: #wind=8\ndouble __fastcall GJGarageLayer::updatePlayerColors(__int64 a1)\n{\n  __int64 v2; // rbp\n  int v3; // ebx\n  char *v4; // rdi\n  char *v5; // rax\n  __int64 v6; // rbx\n  __int64 v7; // rcx\n  int v8; // r8d\n  char *v9; // rax\n  __int64 v10; // rdx\n  void *v12; // [rsp+40h] [rbp+8h] BYREF\n  char v13; // [rsp+48h] [rbp+10h] BYREF\n  void *v14; // [rsp+50h] [rbp+18h] BYREF\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v12 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  *(_BYTE *)(*(_QWORD *)(a1 + 472) + 660LL) = *(_BYTE *)(v2 + 944);\n  v3 = *(_DWORD *)(v2 + 844) - *(_DWORD *)(v2 + 848);\n  v4 = GameManager::colorForIdx(v2, (char *)&v12, *(_DWORD *)(v2 + 856) - *(_DWORD *)(v2 + 860));\n  v5 = GameManager::colorForIdx(v2, &v13, v3);\n  v6 = *(_QWORD *)(a1 + 472);\n  (**(void (__fastcall ***)(__int64, char *))(*(_QWORD *)(v6 + 600) + 320LL))(*(_QWORD *)(v6 + 600) + 320LL, v5);\n  (**(void (__fastcall ***)(__int64, char *))(*(_QWORD *)(v6 + 608) + 320LL))(*(_QWORD *)(v6 + 608) + 320LL, v4);\n  SimplePlayer::updateColors(v6);\n  v7 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v14 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v7 = qword_14090BFD0;\n  }\n  v8 = *(_DWORD *)(v7 + 868) - *(_DWORD *)(v7 + 872);\n  if ( v8 < 0 )\n  {\n    *(_BYTE *)(*(_QWORD *)(a1 + 472) + 668LL) = 0;\n  }\n  else\n  {\n    v9 = GameManager::colorForIdx(v7, (char *)&v14, v8);\n    v10 = *(_QWORD *)(a1 + 472);\n    *(_BYTE *)(v10 + 668) = 1;\n    *(_WORD *)(v10 + 669) = *(_WORD *)v9;\n    *(_BYTE *)(v10 + 671) = v9[2];\n  }\n  return SimplePlayer::updateColors(*(_QWORD *)(a1 + 472));\n}", "assembly": "; \n; GJGarageLayer::updatePlayerColors from 0x140380480 to 0x1403805fc (380 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::init @ 0x14037c2b6\n; > GJGarageLayer::playerColorChanged @ 0x140380479\n; > <???> @ 0x1409228ec\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:05 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x140380480\npush    rbp                                                            ; +0x5, 0x140380485\npush    rsi                                                            ; +0x6, 0x140380486\npush    rdi                                                            ; +0x7, 0x140380487\nsub     rsp, 20h                                                       ; +0x8, 0x140380488\nmov     rsi, rcx                                                       ; +0xc, 0x14038048c\nmov     rbp, cs:qword_14090BFD0                                        ; +0xf, 0x14038048f\ntest    rbp, rbp                                                       ; +0x16, 0x140380496\njnz     short loc_1403804CD                                            ; +0x19, 0x140380499\nmov     ecx, 6E8h; Size                                                ; +0x1b, 0x14038049b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x20, 0x1403804a0\nmov     [rsp+38h+arg_0], rax                                           ; +0x25, 0x1403804a5\nmov     rcx, rax                                                       ; +0x2a, 0x1403804aa\ncall    GameManager__GameManager                                       ; +0x2d, 0x1403804ad\nnop                                                                    ; +0x32, 0x1403804b2\nmov     cs:qword_14090BFD0, rax                                        ; +0x33, 0x1403804b3\nmov     rcx, [rax]                                                     ; +0x3a, 0x1403804ba\nmov     rdx, [rcx+48h]                                                 ; +0x3d, 0x1403804bd\nmov     rcx, rax                                                       ; +0x41, 0x1403804c1\ncall    rdx                                                            ; +0x44, 0x1403804c4\nmov     rbp, cs:qword_14090BFD0                                        ; +0x46, 0x1403804c6\nmov     rcx, [rsi+1D8h]                                                ; +0x4d, 0x1403804cd\nmovzx   eax, byte ptr [rbp+3B0h]                                       ; +0x54, 0x1403804d4\nmov     [rcx+294h], al                                                 ; +0x5b, 0x1403804db\nmov     ebx, [rbp+34Ch]                                                ; +0x61, 0x1403804e1\nsub     ebx, [rbp+350h]                                                ; +0x67, 0x1403804e7\nmov     r8d, [rbp+358h]                                                ; +0x6d, 0x1403804ed\nsub     r8d, [rbp+35Ch]                                                ; +0x74, 0x1403804f4\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x7b, 0x1403804fb\nmov     rcx, rbp                                                       ; +0x80, 0x140380500\ncall    GameManager__colorForIdx                                       ; +0x83, 0x140380503\nmov     rdi, rax                                                       ; +0x88, 0x140380508\nmov     r8d, ebx                                                       ; +0x8b, 0x14038050b\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x8e, 0x14038050e\nmov     rcx, rbp                                                       ; +0x93, 0x140380513\ncall    GameManager__colorForIdx                                       ; +0x96, 0x140380516\nmov     rbx, [rsi+1D8h]                                                ; +0x9b, 0x14038051b\nmov     rcx, [rbx+258h]                                                ; +0xa2, 0x140380522\nadd     rcx, 140h                                                      ; +0xa9, 0x140380529\nmov     rdx, [rcx]                                                     ; +0xb0, 0x140380530\nmov     r8, [rdx]                                                      ; +0xb3, 0x140380533\nmov     rdx, rax                                                       ; +0xb6, 0x140380536\ncall    r8                                                             ; +0xb9, 0x140380539\nmov     rcx, [rbx+260h]                                                ; +0xbc, 0x14038053c\nadd     rcx, 140h                                                      ; +0xc3, 0x140380543\nmov     rax, [rcx]                                                     ; +0xca, 0x14038054a\nmov     rdx, rdi                                                       ; +0xcd, 0x14038054d\ncall    qword ptr [rax]                                                ; +0xd0, 0x140380550\nmov     rcx, rbx                                                       ; +0xd2, 0x140380552\ncall    SimplePlayer__updateColors                                     ; +0xd5, 0x140380555\nmov     rcx, cs:qword_14090BFD0                                        ; +0xda, 0x14038055a\ntest    rcx, rcx                                                       ; +0xe1, 0x140380561\njnz     short loc_140380598                                            ; +0xe4, 0x140380564\nmov     ecx, 6E8h; Size                                                ; +0xe6, 0x140380566\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xeb, 0x14038056b\nmov     [rsp+38h+arg_10], rax                                          ; +0xf0, 0x140380570\nmov     rcx, rax                                                       ; +0xf5, 0x140380575\ncall    GameManager__GameManager                                       ; +0xf8, 0x140380578\nnop                                                                    ; +0xfd, 0x14038057d\nmov     cs:qword_14090BFD0, rax                                        ; +0xfe, 0x14038057e\nmov     rcx, [rax]                                                     ; +0x105, 0x140380585\nmov     rdx, [rcx+48h]                                                 ; +0x108, 0x140380588\nmov     rcx, rax                                                       ; +0x10c, 0x14038058c\ncall    rdx                                                            ; +0x10f, 0x14038058f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x111, 0x140380591\nmov     r8d, [rcx+364h]                                                ; +0x118, 0x140380598\nsub     r8d, [rcx+368h]                                                ; +0x11f, 0x14038059f\njs      short loc_1403805D6                                            ; +0x126, 0x1403805a6\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x128, 0x1403805a8\ncall    GameManager__colorForIdx                                       ; +0x12d, 0x1403805ad\nmov     rdx, [rsi+1D8h]                                                ; +0x132, 0x1403805b2\nmov     byte ptr [rdx+29Ch], 1                                         ; +0x139, 0x1403805b9\nmovzx   ecx, word ptr [rax]                                            ; +0x140, 0x1403805c0\nmov     [rdx+29Dh], cx                                                 ; +0x143, 0x1403805c3\nmovzx   eax, byte ptr [rax+2]                                          ; +0x14a, 0x1403805ca\nmov     [rdx+29Fh], al                                                 ; +0x14e, 0x1403805ce\njmp     short loc_1403805E4                                            ; +0x154, 0x1403805d4\nmov     rax, [rsi+1D8h]                                                ; +0x156, 0x1403805d6\nmov     byte ptr [rax+29Ch], 0                                         ; +0x15d, 0x1403805dd\nmov     rcx, [rsi+1D8h]                                                ; +0x164, 0x1403805e4\nmov     rbx, [rsp+38h+arg_18]                                          ; +0x16b, 0x1403805eb\nadd     rsp, 20h                                                       ; +0x170, 0x1403805f0\npop     rdi                                                            ; +0x174, 0x1403805f4\npop     rsi                                                            ; +0x175, 0x1403805f5\npop     rbp                                                            ; +0x176, 0x1403805f6\njmp     SimplePlayer__updateColors                                     ; +0x177, 0x1403805f7", "xrefs": ["GJGarageLayer::init @ 0x14037c2b6", "GJGarageLayer::playerColorChanged @ 0x140380479", "<???> @ 0x1409228ec"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}