{"type": "func", "start": 4299431764, "end": 4299431984, "name": "MenuGameLayer::getBGColor", "pseudocode": "// \n// MenuGameLayer::getBGColor from 0x100441f54 to 0x100442030 (220 bytes)\n// \n// 2 xrefs:\n// > MenuGameLayer::init @ 0x100441c4c\n// > MenuGameLayer::updateColor @ 0x1004422a0\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:05:12 +0000\n// \n\n__int64 __fastcall MenuGameLayer::getBGColor(__int64 a1, int a2)\n{\n  int v2; // w19\n  __int64 v3; // x0\n\n  while ( a2 > 3 )\n  {\n    if ( a2 <= 5 )\n    {\n      if ( a2 == 4 )\n        v2 = 10;\n      else\n        v2 = 11;\n      goto LABEL_20;\n    }\n    if ( a2 == 6 )\n    {\n      v2 = 1;\n      goto LABEL_20;\n    }\n    if ( a2 == 7 )\n    {\n      v2 = 3;\n      goto LABEL_20;\n    }\nLABEL_13:\n    if ( a2 <= 0 )\n      a2 = -(-a2 & 7);\n    else\n      a2 &= 7u;\n  }\n  if ( a2 > 1 )\n  {\n    if ( a2 == 2 )\n      v2 = 8;\n    else\n      v2 = 9;\n    goto LABEL_20;\n  }\n  if ( a2 )\n  {\n    if ( a2 == 1 )\n    {\n      v2 = 7;\nLABEL_20:\n      v3 = GameManager::sharedState();\n      return GameManager::colorForIdx(v3, v2);\n    }\n    goto LABEL_13;\n  }\n  return 16737792;\n}", "assembly": "; \n; MenuGameLayer::getBGColor from 0x100441f54 to 0x100442030 (220 bytes)\n; \n; 2 xrefs:\n; > MenuGameLayer::init @ 0x100441c4c\n; > MenuGameLayer::updateColor @ 0x1004422a0\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:05:12 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100441f54\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100441f58\nADD             X29, SP, #0x10                                         ; +0x8, 0x100441f5c\nCMP             W1, #3                                                 ; +0xc, 0x100441f60\nB.GT            loc_100441F80                                          ; +0x10, 0x100441f64\nCMP             W1, #1                                                 ; +0x14, 0x100441f68\nB.GT            loc_100441F9C                                          ; +0x18, 0x100441f6c\nCBZ             W1, loc_10044201C                                      ; +0x1c, 0x100441f70\nCMP             W1, #1                                                 ; +0x20, 0x100441f74\nB.NE            loc_100441FC0                                          ; +0x24, 0x100441f78\nB               loc_100441FEC                                          ; +0x28, 0x100441f7c\nCMP             W1, #5                                                 ; +0x2c, 0x100441f80\nB.GT            loc_100441FB0                                          ; +0x30, 0x100441f84\nCMP             W1, #4                                                 ; +0x34, 0x100441f88\nB.EQ            loc_100442004                                          ; +0x38, 0x100441f8c\nCMP             W1, #5                                                 ; +0x3c, 0x100441f90\nB.NE            loc_100441FC0                                          ; +0x40, 0x100441f94\nB               loc_100441FDC                                          ; +0x44, 0x100441f98\nCMP             W1, #2                                                 ; +0x48, 0x100441f9c\nB.EQ            loc_100441FFC                                          ; +0x4c, 0x100441fa0\nCMP             W1, #3                                                 ; +0x50, 0x100441fa4\nB.NE            loc_100441FC0                                          ; +0x54, 0x100441fa8\nB               loc_100441FE4                                          ; +0x58, 0x100441fac\nCMP             W1, #6                                                 ; +0x5c, 0x100441fb0\nB.EQ            loc_100441FF4                                          ; +0x60, 0x100441fb4\nCMP             W1, #7                                                 ; +0x64, 0x100441fb8\nB.EQ            loc_100441FD4                                          ; +0x68, 0x100441fbc\nNEGS            W8, W1                                                 ; +0x6c, 0x100441fc0\nAND             W8, W8, #7                                             ; +0x70, 0x100441fc4\nAND             W9, W1, #7                                             ; +0x74, 0x100441fc8\nCSNEG           W1, W9, W8, MI                                         ; +0x78, 0x100441fcc\nB               loc_100441F60                                          ; +0x7c, 0x100441fd0\nMOV             W19, #3                                                ; +0x80, 0x100441fd4\nB               loc_100442008                                          ; +0x84, 0x100441fd8\nMOV             W19, #0xB                                              ; +0x88, 0x100441fdc\nB               loc_100442008                                          ; +0x8c, 0x100441fe0\nMOV             W19, #9                                                ; +0x90, 0x100441fe4\nB               loc_100442008                                          ; +0x94, 0x100441fe8\nMOV             W19, #7                                                ; +0x98, 0x100441fec\nB               loc_100442008                                          ; +0x9c, 0x100441ff0\nMOV             W19, #1                                                ; +0xa0, 0x100441ff4\nB               loc_100442008                                          ; +0xa4, 0x100441ff8\nMOV             W19, #8                                                ; +0xa8, 0x100441ffc\nB               loc_100442008                                          ; +0xac, 0x100442000\nMOV             W19, #0xA                                              ; +0xb0, 0x100442004\nBL              GameManager__sharedState                               ; +0xb4, 0x100442008\nMOV             X1, X19                                                ; +0xb8, 0x10044200c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xbc, 0x100442010\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xc0, 0x100442014\nB               GameManager__colorForIdx                               ; +0xc4, 0x100442018\nMOV             W0, #0xFF6600                                          ; +0xc8, 0x10044201c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xd0, 0x100442024\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xd4, 0x100442028\nRET                                                                    ; +0xd8, 0x10044202c", "xrefs": ["MenuGameLayer::init @ 0x100441c4c", "MenuGameLayer::updateColor @ 0x1004422a0"], "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"}