{"type": "func", "start": 4298110136, "end": 4298110400, "name": "GameObject::colorForMode", "pseudocode": "// \n// GameObject::colorForMode from 0x1002ff4b8 to 0x1002ff5c0 (264 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::updateVisibility @ 0x100145760\n// > PlayLayer::updateVisibility @ 0x100145830\n// > PlayLayer::manualUpdateObjectColors @ 0x100146fc8\n// > PlayLayer::manualUpdateObjectColors @ 0x100146fec\n// > GameObject::updateMainColor @ 0x1002ff47c\n// > GameObject::updateSecondaryColor @ 0x1002ff674\n// \n// This function is hookable on this platform (idp: arm, 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:03:04 +0000\n// \n\n_BYTE *__fastcall GameObject::colorForMode(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        __n128 a4,\n        double a5,\n        double a6,\n        float a7)\n{\n  int v7; // w20\n  __int64 v9; // x0\n  char v10; // w9\n  char v11; // w8\n  __int64 v12; // x0\n  char v13; // w8\n  _BYTE *v14; // x20\n  __int64 v15; // x8\n  int v16; // w0\n\n  v7 = a3;\n  if ( (int)a2 < 1 )\n  {\n    *(_BYTE *)(a1 + 639) = -1;\n    *(_WORD *)(a1 + 637) = -1;\n  }\n  else\n  {\n    v9 = sub_1002FF6B0(a1, a2, a3, a4);\n    v10 = *(_BYTE *)(v9 + 2);\n    *(_WORD *)(a1 + 637) = *(_WORD *)v9;\n    *(_BYTE *)(a1 + 639) = v10;\n  }\n  if ( *(__int16 *)(a1 + 1184) >= 1 )\n  {\n    if ( (v7 & 1) != 0 )\n    {\n      v11 = *(_BYTE *)(a1 + 1038) ^ 1;\n    }\n    else\n    {\n      if ( *(_DWORD *)(a1 + 660) == 1012 )\n        goto LABEL_13;\n      v11 = 0;\n    }\n    v12 = sub_1002FF784(a1, a1 + 637, v11 & 1);\n    v13 = *(_BYTE *)(v12 + 2);\n    *(_WORD *)(a1 + 637) = *(_WORD *)v12;\n    *(_BYTE *)(a1 + 639) = v13;\n  }\n  if ( !v7 )\n  {\nLABEL_13:\n    if ( *(_BYTE *)(a1 + 665) == 1 )\n    {\n      v14 = (_BYTE *)(a1 + 637);\n      v15 = *(_QWORD *)(a1 + 1104);\n      goto LABEL_15;\n    }\n    return (_BYTE *)(a1 + 637);\n  }\n  if ( *(_BYTE *)(a1 + 664) != 1 )\n    return (_BYTE *)(a1 + 637);\n  v14 = (_BYTE *)(a1 + 637);\n  v15 = *(_QWORD *)(a1 + 1096);\nLABEL_15:\n  v16 = sub_10004A1F8(v14, *(_QWORD *)(v15 + 16), *(_QWORD *)(v15 + 24), a4.n128_f64[0], a5, a6, a7);\n  *(_WORD *)v14 = v16;\n  *(_BYTE *)(a1 + 639) = BYTE2(v16);\n  return v14;\n}", "assembly": "; \n; GameObject::colorForMode from 0x1002ff4b8 to 0x1002ff5c0 (264 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::updateVisibility @ 0x100145760\n; > PlayLayer::updateVisibility @ 0x100145830\n; > PlayLayer::manualUpdateObjectColors @ 0x100146fc8\n; > PlayLayer::manualUpdateObjectColors @ 0x100146fec\n; > GameObject::updateMainColor @ 0x1002ff47c\n; > GameObject::updateSecondaryColor @ 0x1002ff674\n; \n; This function is hookable on this platform (idp: arm, 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:03:04 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1002ff4b8\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1002ff4bc\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1002ff4c0\nADD             X29, SP, #0x20                                         ; +0xc, 0x1002ff4c4\nMOV             X20, X2                                                ; +0x10, 0x1002ff4c8\nMOV             X19, X0                                                ; +0x14, 0x1002ff4cc\nCMP             W1, #1                                                 ; +0x18, 0x1002ff4d0\nB.LT            loc_1002FF4FC                                          ; +0x1c, 0x1002ff4d4\nMOV             X0, X19                                                ; +0x20, 0x1002ff4d8\nMOV             X2, X20                                                ; +0x24, 0x1002ff4dc\nBL              sub_1002FF6B0                                          ; +0x28, 0x1002ff4e0\nADD             X8, X19, #0x27D                                        ; +0x2c, 0x1002ff4e4\nLDRB            W9, [X0,#2]                                            ; +0x30, 0x1002ff4e8\nLDRH            W10, [X0]                                              ; +0x34, 0x1002ff4ec\nSTRH            W10, [X8]                                              ; +0x38, 0x1002ff4f0\nSTRB            W9, [X19,#0x27F]                                       ; +0x3c, 0x1002ff4f4\nB               loc_1002FF50C                                          ; +0x40, 0x1002ff4f8\nADD             X8, X19, #0x27D                                        ; +0x44, 0x1002ff4fc\nMOV             W9, #0xFFFFFFFF                                        ; +0x48, 0x1002ff500\nSTRB            W9, [X19,#0x27F]                                       ; +0x4c, 0x1002ff504\nSTRH            W9, [X8]                                               ; +0x50, 0x1002ff508\nLDRSH           W8, [X19,#0x4A0]                                       ; +0x54, 0x1002ff50c\nCMP             W8, #1                                                 ; +0x58, 0x1002ff510\nB.LT            loc_1002FF55C                                          ; +0x5c, 0x1002ff514\nTBZ             W20, #0, loc_1002FF528                                 ; +0x60, 0x1002ff518\nLDRB            W8, [X19,#0x40E]                                       ; +0x64, 0x1002ff51c\nEOR             W8, W8, #1                                             ; +0x68, 0x1002ff520\nB               loc_1002FF538                                          ; +0x6c, 0x1002ff524\nLDR             W8, [X19,#0x294]                                       ; +0x70, 0x1002ff528\nCMP             W8, #0x3F4                                             ; +0x74, 0x1002ff52c\nB.EQ            loc_1002FF578                                          ; +0x78, 0x1002ff530\nMOV             W8, #0                                                 ; +0x7c, 0x1002ff534\nADD             X21, X19, #0x27D                                       ; +0x80, 0x1002ff538\nAND             W2, W8, #1                                             ; +0x84, 0x1002ff53c\nMOV             X0, X19                                                ; +0x88, 0x1002ff540\nMOV             X1, X21                                                ; +0x8c, 0x1002ff544\nBL              sub_1002FF784                                          ; +0x90, 0x1002ff548\nLDRB            W8, [X0,#2]                                            ; +0x94, 0x1002ff54c\nLDRH            W9, [X0]                                               ; +0x98, 0x1002ff550\nSTRH            W9, [X21]                                              ; +0x9c, 0x1002ff554\nSTRB            W8, [X19,#0x27F]                                       ; +0xa0, 0x1002ff558\nCBZ             W20, loc_1002FF578                                     ; +0xa4, 0x1002ff55c\nLDRB            W8, [X19,#0x298]                                       ; +0xa8, 0x1002ff560\nCMP             W8, #1                                                 ; +0xac, 0x1002ff564\nB.NE            loc_1002FF5A8                                          ; +0xb0, 0x1002ff568\nADD             X20, X19, #0x27D                                       ; +0xb4, 0x1002ff56c\nLDR             X8, [X19,#0x448]                                       ; +0xb8, 0x1002ff570\nB               loc_1002FF58C                                          ; +0xbc, 0x1002ff574\nLDRB            W8, [X19,#0x299]                                       ; +0xc0, 0x1002ff578\nCMP             W8, #1                                                 ; +0xc4, 0x1002ff57c\nB.NE            loc_1002FF5A8                                          ; +0xc8, 0x1002ff580\nADD             X20, X19, #0x27D                                       ; +0xcc, 0x1002ff584\nLDR             X8, [X19,#0x450]                                       ; +0xd0, 0x1002ff588\nLDP             X1, X2, [X8,#0x10]                                     ; +0xd4, 0x1002ff58c\nMOV             X0, X20                                                ; +0xd8, 0x1002ff590\nBL              sub_10004A1F8                                          ; +0xdc, 0x1002ff594\nSTRH            W0, [X20]                                              ; +0xe0, 0x1002ff598\nLSR             W8, W0, #0x10                                          ; +0xe4, 0x1002ff59c\nSTRB            W8, [X19,#0x27F]                                       ; +0xe8, 0x1002ff5a0\nB               loc_1002FF5AC                                          ; +0xec, 0x1002ff5a4\nADD             X20, X19, #0x27D                                       ; +0xf0, 0x1002ff5a8\nMOV             X0, X20                                                ; +0xf4, 0x1002ff5ac\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xf8, 0x1002ff5b0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xfc, 0x1002ff5b4\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x100, 0x1002ff5b8\nRET                                                                    ; +0x104, 0x1002ff5bc", "xrefs": ["PlayLayer::updateVisibility @ 0x100145760", "PlayLayer::updateVisibility @ 0x100145830", "PlayLayer::manualUpdateObjectColors @ 0x100146fc8", "PlayLayer::manualUpdateObjectColors @ 0x100146fec", "GameObject::updateMainColor @ 0x1002ff47c", "GameObject::updateSecondaryColor @ 0x1002ff674"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}